Update auto-updated Java files
[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         // struct LDKCVec_u8Z TxOut_get_script_pubkey (struct LDKTxOut* thing)
155         export function TxOut_get_script_pubkey(thing: number): Uint8Array {
156                 if(!isWasmInitialized) {
157                         throw new Error("initializeWasm() must be awaited first!");
158                 }
159                 const nativeResponseValue = wasm.TxOut_get_script_pubkey(thing);
160                 return decodeArray(nativeResponseValue);
161         }
162         // uint64_t TxOut_get_value (struct LDKTxOut* thing)
163         export function TxOut_get_value(thing: number): number {
164                 if(!isWasmInitialized) {
165                         throw new Error("initializeWasm() must be awaited first!");
166                 }
167                 const nativeResponseValue = wasm.TxOut_get_value(thing);
168                 return nativeResponseValue;
169         }
170         public static native Uint8Array LDKCResult_SecretKeyErrorZ_get_ok(long arg);
171         public static native Secp256k1Error LDKCResult_SecretKeyErrorZ_get_err(long arg);
172         public static native Uint8Array LDKCResult_PublicKeyErrorZ_get_ok(long arg);
173         public static native Secp256k1Error LDKCResult_PublicKeyErrorZ_get_err(long arg);
174         public static native number LDKCResult_TxCreationKeysDecodeErrorZ_get_ok(long arg);
175         public static native number LDKCResult_TxCreationKeysDecodeErrorZ_get_err(long arg);
176         public static native number LDKCResult_ChannelPublicKeysDecodeErrorZ_get_ok(long arg);
177         public static native number LDKCResult_ChannelPublicKeysDecodeErrorZ_get_err(long arg);
178         public static native number LDKCResult_TxCreationKeysErrorZ_get_ok(long arg);
179         public static native Secp256k1Error LDKCResult_TxCreationKeysErrorZ_get_err(long arg);
180         public static class LDKCOption_u32Z {
181                 private LDKCOption_u32Z() {}
182                 export class Some extends LDKCOption_u32Z {
183                         public number some;
184                         Some(number some) { this.some = some; }
185                 }
186                 export class None extends LDKCOption_u32Z {
187                         None() { }
188                 }
189                 static native void init();
190         }
191         static { LDKCOption_u32Z.init(); }
192         public static native LDKCOption_u32Z LDKCOption_u32Z_ref_from_ptr(long ptr);
193         public static native number LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_ok(long arg);
194         public static native number LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(long arg);
195         public static native number LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_ok(long arg);
196         public static native number LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(long arg);
197         public static native number LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_ok(long arg);
198         public static native number LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_err(long arg);
199         public static native number LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_ok(long arg);
200         public static native number LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_err(long arg);
201         public static native number LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_ok(long arg);
202         public static native number LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(long arg);
203         public static native number LDKCResult_TrustedClosingTransactionNoneZ_get_ok(long arg);
204         public static native void LDKCResult_TrustedClosingTransactionNoneZ_get_err(long arg);
205         public static native number LDKCResult_CommitmentTransactionDecodeErrorZ_get_ok(long arg);
206         public static native number LDKCResult_CommitmentTransactionDecodeErrorZ_get_err(long arg);
207         public static native number LDKCResult_TrustedCommitmentTransactionNoneZ_get_ok(long arg);
208         public static native void LDKCResult_TrustedCommitmentTransactionNoneZ_get_err(long arg);
209         public static native Uint8Array[] LDKCResult_CVec_SignatureZNoneZ_get_ok(long arg);
210         public static native void LDKCResult_CVec_SignatureZNoneZ_get_err(long arg);
211         public static native number LDKCResult_ShutdownScriptDecodeErrorZ_get_ok(long arg);
212         public static native number LDKCResult_ShutdownScriptDecodeErrorZ_get_err(long arg);
213         public static native number LDKCResult_ShutdownScriptInvalidShutdownScriptZ_get_ok(long arg);
214         public static native number LDKCResult_ShutdownScriptInvalidShutdownScriptZ_get_err(long arg);
215         public static native void LDKCResult_NoneErrorZ_get_ok(long arg);
216         public static native IOError LDKCResult_NoneErrorZ_get_err(long arg);
217         public static native number LDKCResult_RouteHopDecodeErrorZ_get_ok(long arg);
218         public static native number LDKCResult_RouteHopDecodeErrorZ_get_err(long arg);
219         public static native number LDKCResult_RouteDecodeErrorZ_get_ok(long arg);
220         public static native number LDKCResult_RouteDecodeErrorZ_get_err(long arg);
221         public static native number LDKCResult_RouteParametersDecodeErrorZ_get_ok(long arg);
222         public static native number LDKCResult_RouteParametersDecodeErrorZ_get_err(long arg);
223         public static class LDKCOption_u64Z {
224                 private LDKCOption_u64Z() {}
225                 export class Some extends LDKCOption_u64Z {
226                         public number some;
227                         Some(number some) { this.some = some; }
228                 }
229                 export class None extends LDKCOption_u64Z {
230                         None() { }
231                 }
232                 static native void init();
233         }
234         static { LDKCOption_u64Z.init(); }
235         public static native LDKCOption_u64Z LDKCOption_u64Z_ref_from_ptr(long ptr);
236         public static native number LDKCResult_PayeeDecodeErrorZ_get_ok(long arg);
237         public static native number LDKCResult_PayeeDecodeErrorZ_get_err(long arg);
238         public static native number LDKCResult_RouteHintDecodeErrorZ_get_ok(long arg);
239         public static native number LDKCResult_RouteHintDecodeErrorZ_get_err(long arg);
240         public static native number LDKCResult_RouteHintHopDecodeErrorZ_get_ok(long arg);
241         public static native number LDKCResult_RouteHintHopDecodeErrorZ_get_err(long arg);
242         public static native number LDKCResult_RouteLightningErrorZ_get_ok(long arg);
243         public static native number LDKCResult_RouteLightningErrorZ_get_err(long arg);
244         public static native number LDKCResult_TxOutAccessErrorZ_get_ok(long arg);
245         public static native AccessError LDKCResult_TxOutAccessErrorZ_get_err(long arg);
246         // uintptr_t C2Tuple_usizeTransactionZ_get_a(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR tuple);
247         export function C2Tuple_usizeTransactionZ_get_a(tuple: number): number {
248                 if(!isWasmInitialized) {
249                         throw new Error("initializeWasm() must be awaited first!");
250                 }
251                 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_get_a(tuple);
252                 return nativeResponseValue;
253         }
254         // struct LDKTransaction C2Tuple_usizeTransactionZ_get_b(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR tuple);
255         export function C2Tuple_usizeTransactionZ_get_b(tuple: number): Uint8Array {
256                 if(!isWasmInitialized) {
257                         throw new Error("initializeWasm() must be awaited first!");
258                 }
259                 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_get_b(tuple);
260                 return decodeArray(nativeResponseValue);
261         }
262         public static native void LDKCResult_NoneChannelMonitorUpdateErrZ_get_ok(long arg);
263         public static native ChannelMonitorUpdateErr LDKCResult_NoneChannelMonitorUpdateErrZ_get_err(long arg);
264         public static class LDKMonitorEvent {
265                 private LDKMonitorEvent() {}
266                 export class HTLCEvent extends LDKMonitorEvent {
267                         public number htlc_event;
268                         HTLCEvent(number htlc_event) { this.htlc_event = htlc_event; }
269                 }
270                 export class CommitmentTxConfirmed extends LDKMonitorEvent {
271                         public number commitment_tx_confirmed;
272                         CommitmentTxConfirmed(number commitment_tx_confirmed) { this.commitment_tx_confirmed = commitment_tx_confirmed; }
273                 }
274                 export class UpdateCompleted extends LDKMonitorEvent {
275                         public number funding_txo;
276                         public number monitor_update_id;
277                         UpdateCompleted(number funding_txo, number monitor_update_id) { this.funding_txo = funding_txo; this.monitor_update_id = monitor_update_id; }
278                 }
279                 export class UpdateFailed extends LDKMonitorEvent {
280                         public number update_failed;
281                         UpdateFailed(number update_failed) { this.update_failed = update_failed; }
282                 }
283                 static native void init();
284         }
285         static { LDKMonitorEvent.init(); }
286         public static native LDKMonitorEvent LDKMonitorEvent_ref_from_ptr(long ptr);
287         public static class LDKCOption_C2Tuple_usizeTransactionZZ {
288                 private LDKCOption_C2Tuple_usizeTransactionZZ() {}
289                 export class Some extends LDKCOption_C2Tuple_usizeTransactionZZ {
290                         public number some;
291                         Some(number some) { this.some = some; }
292                 }
293                 export class None extends LDKCOption_C2Tuple_usizeTransactionZZ {
294                         None() { }
295                 }
296                 static native void init();
297         }
298         static { LDKCOption_C2Tuple_usizeTransactionZZ.init(); }
299         public static native LDKCOption_C2Tuple_usizeTransactionZZ LDKCOption_C2Tuple_usizeTransactionZZ_ref_from_ptr(long ptr);
300         public static class LDKClosureReason {
301                 private LDKClosureReason() {}
302                 export class CounterpartyForceClosed extends LDKClosureReason {
303                         public String peer_msg;
304                         CounterpartyForceClosed(String peer_msg) { this.peer_msg = peer_msg; }
305                 }
306                 export class HolderForceClosed extends LDKClosureReason {
307                         HolderForceClosed() { }
308                 }
309                 export class CooperativeClosure extends LDKClosureReason {
310                         CooperativeClosure() { }
311                 }
312                 export class CommitmentTxConfirmed extends LDKClosureReason {
313                         CommitmentTxConfirmed() { }
314                 }
315                 export class FundingTimedOut extends LDKClosureReason {
316                         FundingTimedOut() { }
317                 }
318                 export class ProcessingError extends LDKClosureReason {
319                         public String err;
320                         ProcessingError(String err) { this.err = err; }
321                 }
322                 export class DisconnectedPeer extends LDKClosureReason {
323                         DisconnectedPeer() { }
324                 }
325                 export class OutdatedChannelManager extends LDKClosureReason {
326                         OutdatedChannelManager() { }
327                 }
328                 static native void init();
329         }
330         static { LDKClosureReason.init(); }
331         public static native LDKClosureReason LDKClosureReason_ref_from_ptr(long ptr);
332         public static class LDKCOption_ClosureReasonZ {
333                 private LDKCOption_ClosureReasonZ() {}
334                 export class Some extends LDKCOption_ClosureReasonZ {
335                         public number some;
336                         Some(number some) { this.some = some; }
337                 }
338                 export class None extends LDKCOption_ClosureReasonZ {
339                         None() { }
340                 }
341                 static native void init();
342         }
343         static { LDKCOption_ClosureReasonZ.init(); }
344         public static native LDKCOption_ClosureReasonZ LDKCOption_ClosureReasonZ_ref_from_ptr(long ptr);
345         public static native number LDKCResult_COption_ClosureReasonZDecodeErrorZ_get_ok(long arg);
346         public static native number LDKCResult_COption_ClosureReasonZDecodeErrorZ_get_err(long arg);
347         public static class LDKNetworkUpdate {
348                 private LDKNetworkUpdate() {}
349                 export class ChannelUpdateMessage extends LDKNetworkUpdate {
350                         public number msg;
351                         ChannelUpdateMessage(number msg) { this.msg = msg; }
352                 }
353                 export class ChannelClosed extends LDKNetworkUpdate {
354                         public number short_channel_id;
355                         public boolean is_permanent;
356                         ChannelClosed(number short_channel_id, boolean is_permanent) { this.short_channel_id = short_channel_id; this.is_permanent = is_permanent; }
357                 }
358                 export class NodeFailure extends LDKNetworkUpdate {
359                         public Uint8Array node_id;
360                         public boolean is_permanent;
361                         NodeFailure(Uint8Array node_id, boolean is_permanent) { this.node_id = node_id; this.is_permanent = is_permanent; }
362                 }
363                 static native void init();
364         }
365         static { LDKNetworkUpdate.init(); }
366         public static native LDKNetworkUpdate LDKNetworkUpdate_ref_from_ptr(long ptr);
367         public static class LDKCOption_NetworkUpdateZ {
368                 private LDKCOption_NetworkUpdateZ() {}
369                 export class Some extends LDKCOption_NetworkUpdateZ {
370                         public number some;
371                         Some(number some) { this.some = some; }
372                 }
373                 export class None extends LDKCOption_NetworkUpdateZ {
374                         None() { }
375                 }
376                 static native void init();
377         }
378         static { LDKCOption_NetworkUpdateZ.init(); }
379         public static native LDKCOption_NetworkUpdateZ LDKCOption_NetworkUpdateZ_ref_from_ptr(long ptr);
380         public static class LDKSpendableOutputDescriptor {
381                 private LDKSpendableOutputDescriptor() {}
382                 export class StaticOutput extends LDKSpendableOutputDescriptor {
383                         public number outpoint;
384                         public number output;
385                         StaticOutput(number outpoint, number output) { this.outpoint = outpoint; this.output = output; }
386                 }
387                 export class DelayedPaymentOutput extends LDKSpendableOutputDescriptor {
388                         public number delayed_payment_output;
389                         DelayedPaymentOutput(number delayed_payment_output) { this.delayed_payment_output = delayed_payment_output; }
390                 }
391                 export class StaticPaymentOutput extends LDKSpendableOutputDescriptor {
392                         public number static_payment_output;
393                         StaticPaymentOutput(number static_payment_output) { this.static_payment_output = static_payment_output; }
394                 }
395                 static native void init();
396         }
397         static { LDKSpendableOutputDescriptor.init(); }
398         public static native LDKSpendableOutputDescriptor LDKSpendableOutputDescriptor_ref_from_ptr(long ptr);
399         public static class LDKPaymentPurpose {
400                 private LDKPaymentPurpose() {}
401                 export class InvoicePayment extends LDKPaymentPurpose {
402                         public Uint8Array payment_preimage;
403                         public Uint8Array payment_secret;
404                         InvoicePayment(Uint8Array payment_preimage, Uint8Array payment_secret) { this.payment_preimage = payment_preimage; this.payment_secret = payment_secret; }
405                 }
406                 export class SpontaneousPayment extends LDKPaymentPurpose {
407                         public Uint8Array spontaneous_payment;
408                         SpontaneousPayment(Uint8Array spontaneous_payment) { this.spontaneous_payment = spontaneous_payment; }
409                 }
410                 static native void init();
411         }
412         static { LDKPaymentPurpose.init(); }
413         public static native LDKPaymentPurpose LDKPaymentPurpose_ref_from_ptr(long ptr);
414         public static class LDKEvent {
415                 private LDKEvent() {}
416                 export class FundingGenerationReady extends LDKEvent {
417                         public Uint8Array temporary_channel_id;
418                         public number channel_value_satoshis;
419                         public Uint8Array output_script;
420                         public number user_channel_id;
421                         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; }
422                 }
423                 export class PaymentReceived extends LDKEvent {
424                         public Uint8Array payment_hash;
425                         public number amt;
426                         public number purpose;
427                         PaymentReceived(Uint8Array payment_hash, number amt, number purpose) { this.payment_hash = payment_hash; this.amt = amt; this.purpose = purpose; }
428                 }
429                 export class PaymentSent extends LDKEvent {
430                         public Uint8Array payment_id;
431                         public Uint8Array payment_preimage;
432                         public Uint8Array payment_hash;
433                         public number fee_paid_msat;
434                         PaymentSent(Uint8Array payment_id, Uint8Array payment_preimage, Uint8Array payment_hash, number fee_paid_msat) { this.payment_id = payment_id; this.payment_preimage = payment_preimage; this.payment_hash = payment_hash; this.fee_paid_msat = fee_paid_msat; }
435                 }
436                 export class PaymentPathFailed extends LDKEvent {
437                         public Uint8Array payment_id;
438                         public Uint8Array payment_hash;
439                         public boolean rejected_by_dest;
440                         public number network_update;
441                         public boolean all_paths_failed;
442                         public number[] path;
443                         public number short_channel_id;
444                         public number retry;
445                         PaymentPathFailed(Uint8Array payment_id, Uint8Array payment_hash, boolean rejected_by_dest, number network_update, boolean all_paths_failed, number[] path, number short_channel_id, number retry) { this.payment_id = payment_id; this.payment_hash = payment_hash; this.rejected_by_dest = rejected_by_dest; this.network_update = network_update; this.all_paths_failed = all_paths_failed; this.path = path; this.short_channel_id = short_channel_id; this.retry = retry; }
446                 }
447                 export class PaymentFailed extends LDKEvent {
448                         public Uint8Array payment_id;
449                         public Uint8Array payment_hash;
450                         PaymentFailed(Uint8Array payment_id, Uint8Array payment_hash) { this.payment_id = payment_id; this.payment_hash = payment_hash; }
451                 }
452                 export class PendingHTLCsForwardable extends LDKEvent {
453                         public number time_forwardable;
454                         PendingHTLCsForwardable(number time_forwardable) { this.time_forwardable = time_forwardable; }
455                 }
456                 export class SpendableOutputs extends LDKEvent {
457                         public number[] outputs;
458                         SpendableOutputs(number[] outputs) { this.outputs = outputs; }
459                 }
460                 export class PaymentForwarded extends LDKEvent {
461                         public number fee_earned_msat;
462                         public boolean claim_from_onchain_tx;
463                         PaymentForwarded(number fee_earned_msat, boolean claim_from_onchain_tx) { this.fee_earned_msat = fee_earned_msat; this.claim_from_onchain_tx = claim_from_onchain_tx; }
464                 }
465                 export class ChannelClosed extends LDKEvent {
466                         public Uint8Array channel_id;
467                         public number user_channel_id;
468                         public number reason;
469                         ChannelClosed(Uint8Array channel_id, number user_channel_id, number reason) { this.channel_id = channel_id; this.user_channel_id = user_channel_id; this.reason = reason; }
470                 }
471                 export class DiscardFunding extends LDKEvent {
472                         public Uint8Array channel_id;
473                         public Uint8Array transaction;
474                         DiscardFunding(Uint8Array channel_id, Uint8Array transaction) { this.channel_id = channel_id; this.transaction = transaction; }
475                 }
476                 export class PaymentPathSuccessful extends LDKEvent {
477                         public Uint8Array payment_id;
478                         public Uint8Array payment_hash;
479                         public number[] path;
480                         PaymentPathSuccessful(Uint8Array payment_id, Uint8Array payment_hash, number[] path) { this.payment_id = payment_id; this.payment_hash = payment_hash; this.path = path; }
481                 }
482                 static native void init();
483         }
484         static { LDKEvent.init(); }
485         public static native LDKEvent LDKEvent_ref_from_ptr(long ptr);
486         public static class LDKCOption_EventZ {
487                 private LDKCOption_EventZ() {}
488                 export class Some extends LDKCOption_EventZ {
489                         public number some;
490                         Some(number some) { this.some = some; }
491                 }
492                 export class None extends LDKCOption_EventZ {
493                         None() { }
494                 }
495                 static native void init();
496         }
497         static { LDKCOption_EventZ.init(); }
498         public static native LDKCOption_EventZ LDKCOption_EventZ_ref_from_ptr(long ptr);
499         public static native number LDKCResult_COption_EventZDecodeErrorZ_get_ok(long arg);
500         public static native number LDKCResult_COption_EventZDecodeErrorZ_get_err(long arg);
501         public static class LDKErrorAction {
502                 private LDKErrorAction() {}
503                 export class DisconnectPeer extends LDKErrorAction {
504                         public number msg;
505                         DisconnectPeer(number msg) { this.msg = msg; }
506                 }
507                 export class IgnoreError extends LDKErrorAction {
508                         IgnoreError() { }
509                 }
510                 export class IgnoreAndLog extends LDKErrorAction {
511                         public Level ignore_and_log;
512                         IgnoreAndLog(Level ignore_and_log) { this.ignore_and_log = ignore_and_log; }
513                 }
514                 export class IgnoreDuplicateGossip extends LDKErrorAction {
515                         IgnoreDuplicateGossip() { }
516                 }
517                 export class SendErrorMessage extends LDKErrorAction {
518                         public number msg;
519                         SendErrorMessage(number msg) { this.msg = msg; }
520                 }
521                 static native void init();
522         }
523         static { LDKErrorAction.init(); }
524         public static native LDKErrorAction LDKErrorAction_ref_from_ptr(long ptr);
525         public static class LDKMessageSendEvent {
526                 private LDKMessageSendEvent() {}
527                 export class SendAcceptChannel extends LDKMessageSendEvent {
528                         public Uint8Array node_id;
529                         public number msg;
530                         SendAcceptChannel(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
531                 }
532                 export class SendOpenChannel extends LDKMessageSendEvent {
533                         public Uint8Array node_id;
534                         public number msg;
535                         SendOpenChannel(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
536                 }
537                 export class SendFundingCreated extends LDKMessageSendEvent {
538                         public Uint8Array node_id;
539                         public number msg;
540                         SendFundingCreated(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
541                 }
542                 export class SendFundingSigned extends LDKMessageSendEvent {
543                         public Uint8Array node_id;
544                         public number msg;
545                         SendFundingSigned(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
546                 }
547                 export class SendFundingLocked extends LDKMessageSendEvent {
548                         public Uint8Array node_id;
549                         public number msg;
550                         SendFundingLocked(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
551                 }
552                 export class SendAnnouncementSignatures extends LDKMessageSendEvent {
553                         public Uint8Array node_id;
554                         public number msg;
555                         SendAnnouncementSignatures(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
556                 }
557                 export class UpdateHTLCs extends LDKMessageSendEvent {
558                         public Uint8Array node_id;
559                         public number updates;
560                         UpdateHTLCs(Uint8Array node_id, number updates) { this.node_id = node_id; this.updates = updates; }
561                 }
562                 export class SendRevokeAndACK extends LDKMessageSendEvent {
563                         public Uint8Array node_id;
564                         public number msg;
565                         SendRevokeAndACK(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
566                 }
567                 export class SendClosingSigned extends LDKMessageSendEvent {
568                         public Uint8Array node_id;
569                         public number msg;
570                         SendClosingSigned(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
571                 }
572                 export class SendShutdown extends LDKMessageSendEvent {
573                         public Uint8Array node_id;
574                         public number msg;
575                         SendShutdown(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
576                 }
577                 export class SendChannelReestablish extends LDKMessageSendEvent {
578                         public Uint8Array node_id;
579                         public number msg;
580                         SendChannelReestablish(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
581                 }
582                 export class BroadcastChannelAnnouncement extends LDKMessageSendEvent {
583                         public number msg;
584                         public number update_msg;
585                         BroadcastChannelAnnouncement(number msg, number update_msg) { this.msg = msg; this.update_msg = update_msg; }
586                 }
587                 export class BroadcastNodeAnnouncement extends LDKMessageSendEvent {
588                         public number msg;
589                         BroadcastNodeAnnouncement(number msg) { this.msg = msg; }
590                 }
591                 export class BroadcastChannelUpdate extends LDKMessageSendEvent {
592                         public number msg;
593                         BroadcastChannelUpdate(number msg) { this.msg = msg; }
594                 }
595                 export class SendChannelUpdate extends LDKMessageSendEvent {
596                         public Uint8Array node_id;
597                         public number msg;
598                         SendChannelUpdate(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
599                 }
600                 export class HandleError extends LDKMessageSendEvent {
601                         public Uint8Array node_id;
602                         public number action;
603                         HandleError(Uint8Array node_id, number action) { this.node_id = node_id; this.action = action; }
604                 }
605                 export class SendChannelRangeQuery extends LDKMessageSendEvent {
606                         public Uint8Array node_id;
607                         public number msg;
608                         SendChannelRangeQuery(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
609                 }
610                 export class SendShortIdsQuery extends LDKMessageSendEvent {
611                         public Uint8Array node_id;
612                         public number msg;
613                         SendShortIdsQuery(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
614                 }
615                 export class SendReplyChannelRange extends LDKMessageSendEvent {
616                         public Uint8Array node_id;
617                         public number msg;
618                         SendReplyChannelRange(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
619                 }
620                 static native void init();
621         }
622         static { LDKMessageSendEvent.init(); }
623         public static native LDKMessageSendEvent LDKMessageSendEvent_ref_from_ptr(long ptr);
624         public static native number LDKCResult_ScoringParametersDecodeErrorZ_get_ok(long arg);
625         public static native number LDKCResult_ScoringParametersDecodeErrorZ_get_err(long arg);
626         public static native number LDKCResult_ScorerDecodeErrorZ_get_ok(long arg);
627         public static native number LDKCResult_ScorerDecodeErrorZ_get_err(long arg);
628         public static native number LDKCResult_InitFeaturesDecodeErrorZ_get_ok(long arg);
629         public static native number LDKCResult_InitFeaturesDecodeErrorZ_get_err(long arg);
630         public static native number LDKCResult_ChannelFeaturesDecodeErrorZ_get_ok(long arg);
631         public static native number LDKCResult_ChannelFeaturesDecodeErrorZ_get_err(long arg);
632         public static native number LDKCResult_NodeFeaturesDecodeErrorZ_get_ok(long arg);
633         public static native number LDKCResult_NodeFeaturesDecodeErrorZ_get_err(long arg);
634         public static native number LDKCResult_InvoiceFeaturesDecodeErrorZ_get_ok(long arg);
635         public static native number LDKCResult_InvoiceFeaturesDecodeErrorZ_get_err(long arg);
636         public static native number LDKCResult_ChannelTypeFeaturesDecodeErrorZ_get_ok(long arg);
637         public static native number LDKCResult_ChannelTypeFeaturesDecodeErrorZ_get_err(long arg);
638         public static native number LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_ok(long arg);
639         public static native number LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(long arg);
640         public static native number LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_ok(long arg);
641         public static native number LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(long arg);
642         public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(long arg);
643         public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_err(long arg);
644         public static native void LDKCResult_NoneNoneZ_get_ok(long arg);
645         public static native void LDKCResult_NoneNoneZ_get_err(long arg);
646         // struct LDKSignature C2Tuple_SignatureCVec_SignatureZZ_get_a(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR tuple);
647         export function C2Tuple_SignatureCVec_SignatureZZ_get_a(tuple: number): Uint8Array {
648                 if(!isWasmInitialized) {
649                         throw new Error("initializeWasm() must be awaited first!");
650                 }
651                 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_get_a(tuple);
652                 return decodeArray(nativeResponseValue);
653         }
654         // struct LDKCVec_SignatureZ C2Tuple_SignatureCVec_SignatureZZ_get_b(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR tuple);
655         export function C2Tuple_SignatureCVec_SignatureZZ_get_b(tuple: number): Uint8Array[] {
656                 if(!isWasmInitialized) {
657                         throw new Error("initializeWasm() must be awaited first!");
658                 }
659                 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_get_b(tuple);
660                 return nativeResponseValue;
661         }
662         public static native number LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(long arg);
663         public static native void LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(long arg);
664         public static native Uint8Array LDKCResult_SignatureNoneZ_get_ok(long arg);
665         public static native void LDKCResult_SignatureNoneZ_get_err(long arg);
666
667
668
669 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
670
671                 export interface LDKBaseSign {
672                         get_per_commitment_point (idx: number): Uint8Array;
673                         release_commitment_secret (idx: number): Uint8Array;
674                         validate_holder_commitment (holder_tx: number): number;
675                         channel_keys_id (): Uint8Array;
676                         sign_counterparty_commitment (commitment_tx: number): number;
677                         validate_counterparty_revocation (idx: number, secret: Uint8Array): number;
678                         sign_holder_commitment_and_htlcs (commitment_tx: number): number;
679                         sign_justice_revoked_output (justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array): number;
680                         sign_justice_revoked_htlc (justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number;
681                         sign_counterparty_htlc_transaction (htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number;
682                         sign_closing_transaction (closing_tx: number): number;
683                         sign_channel_announcement (msg: number): number;
684                         ready_channel (channel_parameters: number): void;
685                 }
686
687                 export function LDKBaseSign_new(impl: LDKBaseSign, pubkeys: number): number {
688             throw new Error('unimplemented'); // TODO: bind to WASM
689         }
690
691 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
692
693
694         // LDKPublicKey BaseSign_get_per_commitment_point LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx
695         export function BaseSign_get_per_commitment_point(this_arg: number, idx: number): Uint8Array {
696                 if(!isWasmInitialized) {
697                         throw new Error("initializeWasm() must be awaited first!");
698                 }
699                 const nativeResponseValue = wasm.BaseSign_get_per_commitment_point(this_arg, idx);
700                 return decodeArray(nativeResponseValue);
701         }
702         // LDKThirtyTwoBytes BaseSign_release_commitment_secret LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx
703         export function BaseSign_release_commitment_secret(this_arg: number, idx: number): Uint8Array {
704                 if(!isWasmInitialized) {
705                         throw new Error("initializeWasm() must be awaited first!");
706                 }
707                 const nativeResponseValue = wasm.BaseSign_release_commitment_secret(this_arg, idx);
708                 return decodeArray(nativeResponseValue);
709         }
710         // LDKCResult_NoneNoneZ BaseSign_validate_holder_commitment LDKBaseSign *NONNULL_PTR this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR holder_tx
711         export function BaseSign_validate_holder_commitment(this_arg: number, holder_tx: number): number {
712                 if(!isWasmInitialized) {
713                         throw new Error("initializeWasm() must be awaited first!");
714                 }
715                 const nativeResponseValue = wasm.BaseSign_validate_holder_commitment(this_arg, holder_tx);
716                 return nativeResponseValue;
717         }
718         // LDKThirtyTwoBytes BaseSign_channel_keys_id LDKBaseSign *NONNULL_PTR this_arg
719         export function BaseSign_channel_keys_id(this_arg: number): Uint8Array {
720                 if(!isWasmInitialized) {
721                         throw new Error("initializeWasm() must be awaited first!");
722                 }
723                 const nativeResponseValue = wasm.BaseSign_channel_keys_id(this_arg);
724                 return decodeArray(nativeResponseValue);
725         }
726         // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ BaseSign_sign_counterparty_commitment LDKBaseSign *NONNULL_PTR this_arg, const struct LDKCommitmentTransaction *NONNULL_PTR commitment_tx
727         export function BaseSign_sign_counterparty_commitment(this_arg: number, commitment_tx: number): number {
728                 if(!isWasmInitialized) {
729                         throw new Error("initializeWasm() must be awaited first!");
730                 }
731                 const nativeResponseValue = wasm.BaseSign_sign_counterparty_commitment(this_arg, commitment_tx);
732                 return nativeResponseValue;
733         }
734         // LDKCResult_NoneNoneZ BaseSign_validate_counterparty_revocation LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx, const uint8_t (*secret)[32]
735         export function BaseSign_validate_counterparty_revocation(this_arg: number, idx: number, secret: Uint8Array): number {
736                 if(!isWasmInitialized) {
737                         throw new Error("initializeWasm() must be awaited first!");
738                 }
739                 const nativeResponseValue = wasm.BaseSign_validate_counterparty_revocation(this_arg, idx, encodeArray(secret));
740                 return nativeResponseValue;
741         }
742         // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ BaseSign_sign_holder_commitment_and_htlcs LDKBaseSign *NONNULL_PTR this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR commitment_tx
743         export function BaseSign_sign_holder_commitment_and_htlcs(this_arg: number, commitment_tx: number): number {
744                 if(!isWasmInitialized) {
745                         throw new Error("initializeWasm() must be awaited first!");
746                 }
747                 const nativeResponseValue = wasm.BaseSign_sign_holder_commitment_and_htlcs(this_arg, commitment_tx);
748                 return nativeResponseValue;
749         }
750         // LDKCResult_SignatureNoneZ BaseSign_sign_justice_revoked_output LDKBaseSign *NONNULL_PTR this_arg, struct LDKTransaction justice_tx, uintptr_t input, uint64_t amount, const uint8_t (*per_commitment_key)[32]
751         export function BaseSign_sign_justice_revoked_output(this_arg: number, justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array): number {
752                 if(!isWasmInitialized) {
753                         throw new Error("initializeWasm() must be awaited first!");
754                 }
755                 const nativeResponseValue = wasm.BaseSign_sign_justice_revoked_output(this_arg, encodeArray(justice_tx), input, amount, encodeArray(per_commitment_key));
756                 return nativeResponseValue;
757         }
758         // LDKCResult_SignatureNoneZ BaseSign_sign_justice_revoked_htlc LDKBaseSign *NONNULL_PTR this_arg, struct LDKTransaction justice_tx, uintptr_t input, uint64_t amount, const uint8_t (*per_commitment_key)[32], const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc
759         export function BaseSign_sign_justice_revoked_htlc(this_arg: number, justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number {
760                 if(!isWasmInitialized) {
761                         throw new Error("initializeWasm() must be awaited first!");
762                 }
763                 const nativeResponseValue = wasm.BaseSign_sign_justice_revoked_htlc(this_arg, encodeArray(justice_tx), input, amount, encodeArray(per_commitment_key), htlc);
764                 return nativeResponseValue;
765         }
766         // LDKCResult_SignatureNoneZ BaseSign_sign_counterparty_htlc_transaction LDKBaseSign *NONNULL_PTR this_arg, struct LDKTransaction htlc_tx, uintptr_t input, uint64_t amount, struct LDKPublicKey per_commitment_point, const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc
767         export function BaseSign_sign_counterparty_htlc_transaction(this_arg: number, htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number {
768                 if(!isWasmInitialized) {
769                         throw new Error("initializeWasm() must be awaited first!");
770                 }
771                 const nativeResponseValue = wasm.BaseSign_sign_counterparty_htlc_transaction(this_arg, encodeArray(htlc_tx), input, amount, encodeArray(per_commitment_point), htlc);
772                 return nativeResponseValue;
773         }
774         // LDKCResult_SignatureNoneZ BaseSign_sign_closing_transaction LDKBaseSign *NONNULL_PTR this_arg, const struct LDKClosingTransaction *NONNULL_PTR closing_tx
775         export function BaseSign_sign_closing_transaction(this_arg: number, closing_tx: number): number {
776                 if(!isWasmInitialized) {
777                         throw new Error("initializeWasm() must be awaited first!");
778                 }
779                 const nativeResponseValue = wasm.BaseSign_sign_closing_transaction(this_arg, closing_tx);
780                 return nativeResponseValue;
781         }
782         // LDKCResult_SignatureNoneZ BaseSign_sign_channel_announcement LDKBaseSign *NONNULL_PTR this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg
783         export function BaseSign_sign_channel_announcement(this_arg: number, msg: number): number {
784                 if(!isWasmInitialized) {
785                         throw new Error("initializeWasm() must be awaited first!");
786                 }
787                 const nativeResponseValue = wasm.BaseSign_sign_channel_announcement(this_arg, msg);
788                 return nativeResponseValue;
789         }
790         // void BaseSign_ready_channel LDKBaseSign *NONNULL_PTR this_arg, const struct LDKChannelTransactionParameters *NONNULL_PTR channel_parameters
791         export function BaseSign_ready_channel(this_arg: number, channel_parameters: number): void {
792                 if(!isWasmInitialized) {
793                         throw new Error("initializeWasm() must be awaited first!");
794                 }
795                 const nativeResponseValue = wasm.BaseSign_ready_channel(this_arg, channel_parameters);
796                 // debug statements here
797         }
798         // LDKChannelPublicKeys BaseSign_get_pubkeys LDKBaseSign *NONNULL_PTR this_arg
799         export function BaseSign_get_pubkeys(this_arg: number): number {
800                 if(!isWasmInitialized) {
801                         throw new Error("initializeWasm() must be awaited first!");
802                 }
803                 const nativeResponseValue = wasm.BaseSign_get_pubkeys(this_arg);
804                 return nativeResponseValue;
805         }
806
807
808
809 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
810
811                 export interface LDKSign {
812                         write (): Uint8Array;
813                 }
814
815                 export function LDKSign_new(impl: LDKSign, BaseSign: LDKBaseSign, pubkeys: number): number {
816             throw new Error('unimplemented'); // TODO: bind to WASM
817         }
818
819 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
820
821
822         // LDKCVec_u8Z Sign_write LDKSign *NONNULL_PTR this_arg
823         export function Sign_write(this_arg: number): Uint8Array {
824                 if(!isWasmInitialized) {
825                         throw new Error("initializeWasm() must be awaited first!");
826                 }
827                 const nativeResponseValue = wasm.Sign_write(this_arg);
828                 return decodeArray(nativeResponseValue);
829         }
830         public static native number LDKCResult_SignDecodeErrorZ_get_ok(long arg);
831         public static native number LDKCResult_SignDecodeErrorZ_get_err(long arg);
832         public static native Uint8Array LDKCResult_RecoverableSignatureNoneZ_get_ok(long arg);
833         public static native void LDKCResult_RecoverableSignatureNoneZ_get_err(long arg);
834         public static native Uint8Array[] LDKCResult_CVec_CVec_u8ZZNoneZ_get_ok(long arg);
835         public static native void LDKCResult_CVec_CVec_u8ZZNoneZ_get_err(long arg);
836         public static native number LDKCResult_InMemorySignerDecodeErrorZ_get_ok(long arg);
837         public static native number LDKCResult_InMemorySignerDecodeErrorZ_get_err(long arg);
838         public static native Uint8Array LDKCResult_TransactionNoneZ_get_ok(long arg);
839         public static native void LDKCResult_TransactionNoneZ_get_err(long arg);
840         // struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelMonitorZ_get_a(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR tuple);
841         export function C2Tuple_BlockHashChannelMonitorZ_get_a(tuple: number): Uint8Array {
842                 if(!isWasmInitialized) {
843                         throw new Error("initializeWasm() must be awaited first!");
844                 }
845                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_get_a(tuple);
846                 return decodeArray(nativeResponseValue);
847         }
848         // struct LDKChannelMonitor C2Tuple_BlockHashChannelMonitorZ_get_b(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR tuple);
849         export function C2Tuple_BlockHashChannelMonitorZ_get_b(tuple: number): number {
850                 if(!isWasmInitialized) {
851                         throw new Error("initializeWasm() must be awaited first!");
852                 }
853                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_get_b(tuple);
854                 return nativeResponseValue;
855         }
856         public static native number[] LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_get_ok(long arg);
857         public static native IOError LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_get_err(long arg);
858         public static class LDKCOption_u16Z {
859                 private LDKCOption_u16Z() {}
860                 export class Some extends LDKCOption_u16Z {
861                         public number some;
862                         Some(number some) { this.some = some; }
863                 }
864                 export class None extends LDKCOption_u16Z {
865                         None() { }
866                 }
867                 static native void init();
868         }
869         static { LDKCOption_u16Z.init(); }
870         public static native LDKCOption_u16Z LDKCOption_u16Z_ref_from_ptr(long ptr);
871         public static class LDKAPIError {
872                 private LDKAPIError() {}
873                 export class APIMisuseError extends LDKAPIError {
874                         public String err;
875                         APIMisuseError(String err) { this.err = err; }
876                 }
877                 export class FeeRateTooHigh extends LDKAPIError {
878                         public String err;
879                         public number feerate;
880                         FeeRateTooHigh(String err, number feerate) { this.err = err; this.feerate = feerate; }
881                 }
882                 export class RouteError extends LDKAPIError {
883                         public String err;
884                         RouteError(String err) { this.err = err; }
885                 }
886                 export class ChannelUnavailable extends LDKAPIError {
887                         public String err;
888                         ChannelUnavailable(String err) { this.err = err; }
889                 }
890                 export class MonitorUpdateFailed extends LDKAPIError {
891                         MonitorUpdateFailed() { }
892                 }
893                 export class IncompatibleShutdownScript extends LDKAPIError {
894                         public number script;
895                         IncompatibleShutdownScript(number script) { this.script = script; }
896                 }
897                 static native void init();
898         }
899         static { LDKAPIError.init(); }
900         public static native LDKAPIError LDKAPIError_ref_from_ptr(long ptr);
901         public static native void LDKCResult_NoneAPIErrorZ_get_ok(long arg);
902         public static native number LDKCResult_NoneAPIErrorZ_get_err(long arg);
903         public static native Uint8Array LDKCResult__u832APIErrorZ_get_ok(long arg);
904         public static native number LDKCResult__u832APIErrorZ_get_err(long arg);
905         public static class LDKPaymentSendFailure {
906                 private LDKPaymentSendFailure() {}
907                 export class ParameterError extends LDKPaymentSendFailure {
908                         public number parameter_error;
909                         ParameterError(number parameter_error) { this.parameter_error = parameter_error; }
910                 }
911                 export class PathParameterError extends LDKPaymentSendFailure {
912                         public number[] path_parameter_error;
913                         PathParameterError(number[] path_parameter_error) { this.path_parameter_error = path_parameter_error; }
914                 }
915                 export class AllFailedRetrySafe extends LDKPaymentSendFailure {
916                         public number[] all_failed_retry_safe;
917                         AllFailedRetrySafe(number[] all_failed_retry_safe) { this.all_failed_retry_safe = all_failed_retry_safe; }
918                 }
919                 export class PartialFailure extends LDKPaymentSendFailure {
920                         public number[] results;
921                         public number failed_paths_retry;
922                         public Uint8Array payment_id;
923                         PartialFailure(number[] results, number failed_paths_retry, Uint8Array payment_id) { this.results = results; this.failed_paths_retry = failed_paths_retry; this.payment_id = payment_id; }
924                 }
925                 static native void init();
926         }
927         static { LDKPaymentSendFailure.init(); }
928         public static native LDKPaymentSendFailure LDKPaymentSendFailure_ref_from_ptr(long ptr);
929         public static native Uint8Array LDKCResult_PaymentIdPaymentSendFailureZ_get_ok(long arg);
930         public static native number LDKCResult_PaymentIdPaymentSendFailureZ_get_err(long arg);
931         public static native void LDKCResult_NonePaymentSendFailureZ_get_ok(long arg);
932         public static native number LDKCResult_NonePaymentSendFailureZ_get_err(long arg);
933         // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentIdZ_get_a(LDKC2Tuple_PaymentHashPaymentIdZ *NONNULL_PTR tuple);
934         export function C2Tuple_PaymentHashPaymentIdZ_get_a(tuple: number): Uint8Array {
935                 if(!isWasmInitialized) {
936                         throw new Error("initializeWasm() must be awaited first!");
937                 }
938                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentIdZ_get_a(tuple);
939                 return decodeArray(nativeResponseValue);
940         }
941         // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentIdZ_get_b(LDKC2Tuple_PaymentHashPaymentIdZ *NONNULL_PTR tuple);
942         export function C2Tuple_PaymentHashPaymentIdZ_get_b(tuple: number): Uint8Array {
943                 if(!isWasmInitialized) {
944                         throw new Error("initializeWasm() must be awaited first!");
945                 }
946                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentIdZ_get_b(tuple);
947                 return decodeArray(nativeResponseValue);
948         }
949         public static native number LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_get_ok(long arg);
950         public static native number LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_get_err(long arg);
951         public static class LDKNetAddress {
952                 private LDKNetAddress() {}
953                 export class IPv4 extends LDKNetAddress {
954                         public Uint8Array addr;
955                         public number port;
956                         IPv4(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
957                 }
958                 export class IPv6 extends LDKNetAddress {
959                         public Uint8Array addr;
960                         public number port;
961                         IPv6(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
962                 }
963                 export class OnionV2 extends LDKNetAddress {
964                         public Uint8Array onion_v2;
965                         OnionV2(Uint8Array onion_v2) { this.onion_v2 = onion_v2; }
966                 }
967                 export class OnionV3 extends LDKNetAddress {
968                         public Uint8Array ed25519_pubkey;
969                         public number checksum;
970                         public number version;
971                         public number port;
972                         OnionV3(Uint8Array ed25519_pubkey, number checksum, number version, number port) { this.ed25519_pubkey = ed25519_pubkey; this.checksum = checksum; this.version = version; this.port = port; }
973                 }
974                 static native void init();
975         }
976         static { LDKNetAddress.init(); }
977         public static native LDKNetAddress LDKNetAddress_ref_from_ptr(long ptr);
978         // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_a(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR tuple);
979         export function C2Tuple_PaymentHashPaymentSecretZ_get_a(tuple: number): Uint8Array {
980                 if(!isWasmInitialized) {
981                         throw new Error("initializeWasm() must be awaited first!");
982                 }
983                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_get_a(tuple);
984                 return decodeArray(nativeResponseValue);
985         }
986         // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_b(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR tuple);
987         export function C2Tuple_PaymentHashPaymentSecretZ_get_b(tuple: number): Uint8Array {
988                 if(!isWasmInitialized) {
989                         throw new Error("initializeWasm() must be awaited first!");
990                 }
991                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_get_b(tuple);
992                 return decodeArray(nativeResponseValue);
993         }
994         public static native number LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_get_ok(long arg);
995         public static native void LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_get_err(long arg);
996         public static native number LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_get_ok(long arg);
997         public static native number LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_get_err(long arg);
998         public static native Uint8Array LDKCResult_PaymentSecretNoneZ_get_ok(long arg);
999         public static native void LDKCResult_PaymentSecretNoneZ_get_err(long arg);
1000         public static native Uint8Array LDKCResult_PaymentSecretAPIErrorZ_get_ok(long arg);
1001         public static native number LDKCResult_PaymentSecretAPIErrorZ_get_err(long arg);
1002         public static native Uint8Array LDKCResult_PaymentPreimageAPIErrorZ_get_ok(long arg);
1003         public static native number LDKCResult_PaymentPreimageAPIErrorZ_get_err(long arg);
1004
1005
1006
1007 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1008
1009                 export interface LDKWatch {
1010                         watch_channel (funding_txo: number, monitor: number): number;
1011                         update_channel (funding_txo: number, update: number): number;
1012                         release_pending_monitor_events (): number[];
1013                 }
1014
1015                 export function LDKWatch_new(impl: LDKWatch): number {
1016             throw new Error('unimplemented'); // TODO: bind to WASM
1017         }
1018
1019 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1020
1021
1022         // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_watch_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitor monitor
1023         export function Watch_watch_channel(this_arg: number, funding_txo: number, monitor: number): number {
1024                 if(!isWasmInitialized) {
1025                         throw new Error("initializeWasm() must be awaited first!");
1026                 }
1027                 const nativeResponseValue = wasm.Watch_watch_channel(this_arg, funding_txo, monitor);
1028                 return nativeResponseValue;
1029         }
1030         // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_update_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitorUpdate update
1031         export function Watch_update_channel(this_arg: number, funding_txo: number, update: number): number {
1032                 if(!isWasmInitialized) {
1033                         throw new Error("initializeWasm() must be awaited first!");
1034                 }
1035                 const nativeResponseValue = wasm.Watch_update_channel(this_arg, funding_txo, update);
1036                 return nativeResponseValue;
1037         }
1038         // LDKCVec_MonitorEventZ Watch_release_pending_monitor_events LDKWatch *NONNULL_PTR this_arg
1039         export function Watch_release_pending_monitor_events(this_arg: number): number[] {
1040                 if(!isWasmInitialized) {
1041                         throw new Error("initializeWasm() must be awaited first!");
1042                 }
1043                 const nativeResponseValue = wasm.Watch_release_pending_monitor_events(this_arg);
1044                 return nativeResponseValue;
1045         }
1046
1047
1048
1049 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1050
1051                 export interface LDKBroadcasterInterface {
1052                         broadcast_transaction (tx: Uint8Array): void;
1053                 }
1054
1055                 export function LDKBroadcasterInterface_new(impl: LDKBroadcasterInterface): number {
1056             throw new Error('unimplemented'); // TODO: bind to WASM
1057         }
1058
1059 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1060
1061
1062         // void BroadcasterInterface_broadcast_transaction LDKBroadcasterInterface *NONNULL_PTR this_arg, struct LDKTransaction tx
1063         export function BroadcasterInterface_broadcast_transaction(this_arg: number, tx: Uint8Array): void {
1064                 if(!isWasmInitialized) {
1065                         throw new Error("initializeWasm() must be awaited first!");
1066                 }
1067                 const nativeResponseValue = wasm.BroadcasterInterface_broadcast_transaction(this_arg, encodeArray(tx));
1068                 // debug statements here
1069         }
1070
1071
1072
1073 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1074
1075                 export interface LDKKeysInterface {
1076                         get_node_secret (): Uint8Array;
1077                         get_destination_script (): Uint8Array;
1078                         get_shutdown_scriptpubkey (): number;
1079                         get_channel_signer (inbound: boolean, channel_value_satoshis: number): number;
1080                         get_secure_random_bytes (): Uint8Array;
1081                         read_chan_signer (reader: Uint8Array): number;
1082                         sign_invoice (invoice_preimage: Uint8Array): number;
1083                         get_inbound_payment_key_material (): Uint8Array;
1084                 }
1085
1086                 export function LDKKeysInterface_new(impl: LDKKeysInterface): number {
1087             throw new Error('unimplemented'); // TODO: bind to WASM
1088         }
1089
1090 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1091
1092
1093         // LDKSecretKey KeysInterface_get_node_secret LDKKeysInterface *NONNULL_PTR this_arg
1094         export function KeysInterface_get_node_secret(this_arg: number): Uint8Array {
1095                 if(!isWasmInitialized) {
1096                         throw new Error("initializeWasm() must be awaited first!");
1097                 }
1098                 const nativeResponseValue = wasm.KeysInterface_get_node_secret(this_arg);
1099                 return decodeArray(nativeResponseValue);
1100         }
1101         // LDKCVec_u8Z KeysInterface_get_destination_script LDKKeysInterface *NONNULL_PTR this_arg
1102         export function KeysInterface_get_destination_script(this_arg: number): Uint8Array {
1103                 if(!isWasmInitialized) {
1104                         throw new Error("initializeWasm() must be awaited first!");
1105                 }
1106                 const nativeResponseValue = wasm.KeysInterface_get_destination_script(this_arg);
1107                 return decodeArray(nativeResponseValue);
1108         }
1109         // LDKShutdownScript KeysInterface_get_shutdown_scriptpubkey LDKKeysInterface *NONNULL_PTR this_arg
1110         export function KeysInterface_get_shutdown_scriptpubkey(this_arg: number): number {
1111                 if(!isWasmInitialized) {
1112                         throw new Error("initializeWasm() must be awaited first!");
1113                 }
1114                 const nativeResponseValue = wasm.KeysInterface_get_shutdown_scriptpubkey(this_arg);
1115                 return nativeResponseValue;
1116         }
1117         // LDKSign KeysInterface_get_channel_signer LDKKeysInterface *NONNULL_PTR this_arg, bool inbound, uint64_t channel_value_satoshis
1118         export function KeysInterface_get_channel_signer(this_arg: number, inbound: boolean, channel_value_satoshis: number): number {
1119                 if(!isWasmInitialized) {
1120                         throw new Error("initializeWasm() must be awaited first!");
1121                 }
1122                 const nativeResponseValue = wasm.KeysInterface_get_channel_signer(this_arg, inbound, channel_value_satoshis);
1123                 return nativeResponseValue;
1124         }
1125         // LDKThirtyTwoBytes KeysInterface_get_secure_random_bytes LDKKeysInterface *NONNULL_PTR this_arg
1126         export function KeysInterface_get_secure_random_bytes(this_arg: number): Uint8Array {
1127                 if(!isWasmInitialized) {
1128                         throw new Error("initializeWasm() must be awaited first!");
1129                 }
1130                 const nativeResponseValue = wasm.KeysInterface_get_secure_random_bytes(this_arg);
1131                 return decodeArray(nativeResponseValue);
1132         }
1133         // LDKCResult_SignDecodeErrorZ KeysInterface_read_chan_signer LDKKeysInterface *NONNULL_PTR this_arg, struct LDKu8slice reader
1134         export function KeysInterface_read_chan_signer(this_arg: number, reader: Uint8Array): number {
1135                 if(!isWasmInitialized) {
1136                         throw new Error("initializeWasm() must be awaited first!");
1137                 }
1138                 const nativeResponseValue = wasm.KeysInterface_read_chan_signer(this_arg, encodeArray(reader));
1139                 return nativeResponseValue;
1140         }
1141         // LDKCResult_RecoverableSignatureNoneZ KeysInterface_sign_invoice LDKKeysInterface *NONNULL_PTR this_arg, struct LDKCVec_u8Z invoice_preimage
1142         export function KeysInterface_sign_invoice(this_arg: number, invoice_preimage: Uint8Array): number {
1143                 if(!isWasmInitialized) {
1144                         throw new Error("initializeWasm() must be awaited first!");
1145                 }
1146                 const nativeResponseValue = wasm.KeysInterface_sign_invoice(this_arg, encodeArray(invoice_preimage));
1147                 return nativeResponseValue;
1148         }
1149         // LDKThirtyTwoBytes KeysInterface_get_inbound_payment_key_material LDKKeysInterface *NONNULL_PTR this_arg
1150         export function KeysInterface_get_inbound_payment_key_material(this_arg: number): Uint8Array {
1151                 if(!isWasmInitialized) {
1152                         throw new Error("initializeWasm() must be awaited first!");
1153                 }
1154                 const nativeResponseValue = wasm.KeysInterface_get_inbound_payment_key_material(this_arg);
1155                 return decodeArray(nativeResponseValue);
1156         }
1157
1158
1159
1160 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1161
1162                 export interface LDKFeeEstimator {
1163                         get_est_sat_per_1000_weight (confirmation_target: ConfirmationTarget): number;
1164                 }
1165
1166                 export function LDKFeeEstimator_new(impl: LDKFeeEstimator): number {
1167             throw new Error('unimplemented'); // TODO: bind to WASM
1168         }
1169
1170 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1171
1172
1173         // uint32_t FeeEstimator_get_est_sat_per_1000_weight LDKFeeEstimator *NONNULL_PTR this_arg, enum LDKConfirmationTarget confirmation_target
1174         export function FeeEstimator_get_est_sat_per_1000_weight(this_arg: number, confirmation_target: ConfirmationTarget): number {
1175                 if(!isWasmInitialized) {
1176                         throw new Error("initializeWasm() must be awaited first!");
1177                 }
1178                 const nativeResponseValue = wasm.FeeEstimator_get_est_sat_per_1000_weight(this_arg, confirmation_target);
1179                 return nativeResponseValue;
1180         }
1181
1182
1183
1184 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1185
1186                 export interface LDKLogger {
1187                         log (record: number): void;
1188                 }
1189
1190                 export function LDKLogger_new(impl: LDKLogger): number {
1191             throw new Error('unimplemented'); // TODO: bind to WASM
1192         }
1193
1194 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1195
1196
1197         // struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelManagerZ_get_a(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR tuple);
1198         export function C2Tuple_BlockHashChannelManagerZ_get_a(tuple: number): Uint8Array {
1199                 if(!isWasmInitialized) {
1200                         throw new Error("initializeWasm() must be awaited first!");
1201                 }
1202                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_get_a(tuple);
1203                 return decodeArray(nativeResponseValue);
1204         }
1205         // struct LDKChannelManager *C2Tuple_BlockHashChannelManagerZ_get_b(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR tuple);
1206         export function C2Tuple_BlockHashChannelManagerZ_get_b(tuple: number): number {
1207                 if(!isWasmInitialized) {
1208                         throw new Error("initializeWasm() must be awaited first!");
1209                 }
1210                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_get_b(tuple);
1211                 return nativeResponseValue;
1212         }
1213         public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(long arg);
1214         public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(long arg);
1215         public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_ok(long arg);
1216         public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_err(long arg);
1217         public static native number LDKCResult_OutPointDecodeErrorZ_get_ok(long arg);
1218         public static native number LDKCResult_OutPointDecodeErrorZ_get_err(long arg);
1219
1220
1221
1222 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1223
1224                 export interface LDKType {
1225                         type_id (): number;
1226                         debug_str (): String;
1227                         write (): Uint8Array;
1228                 }
1229
1230                 export function LDKType_new(impl: LDKType): number {
1231             throw new Error('unimplemented'); // TODO: bind to WASM
1232         }
1233
1234 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1235
1236
1237         // uint16_t Type_type_id LDKType *NONNULL_PTR this_arg
1238         export function Type_type_id(this_arg: number): number {
1239                 if(!isWasmInitialized) {
1240                         throw new Error("initializeWasm() must be awaited first!");
1241                 }
1242                 const nativeResponseValue = wasm.Type_type_id(this_arg);
1243                 return nativeResponseValue;
1244         }
1245         // LDKStr Type_debug_str LDKType *NONNULL_PTR this_arg
1246         export function Type_debug_str(this_arg: number): String {
1247                 if(!isWasmInitialized) {
1248                         throw new Error("initializeWasm() must be awaited first!");
1249                 }
1250                 const nativeResponseValue = wasm.Type_debug_str(this_arg);
1251                 return nativeResponseValue;
1252         }
1253         // LDKCVec_u8Z Type_write LDKType *NONNULL_PTR this_arg
1254         export function Type_write(this_arg: number): Uint8Array {
1255                 if(!isWasmInitialized) {
1256                         throw new Error("initializeWasm() must be awaited first!");
1257                 }
1258                 const nativeResponseValue = wasm.Type_write(this_arg);
1259                 return decodeArray(nativeResponseValue);
1260         }
1261         public static class LDKCOption_TypeZ {
1262                 private LDKCOption_TypeZ() {}
1263                 export class Some extends LDKCOption_TypeZ {
1264                         public number some;
1265                         Some(number some) { this.some = some; }
1266                 }
1267                 export class None extends LDKCOption_TypeZ {
1268                         None() { }
1269                 }
1270                 static native void init();
1271         }
1272         static { LDKCOption_TypeZ.init(); }
1273         public static native LDKCOption_TypeZ LDKCOption_TypeZ_ref_from_ptr(long ptr);
1274         public static native number LDKCResult_COption_TypeZDecodeErrorZ_get_ok(long arg);
1275         public static native number LDKCResult_COption_TypeZDecodeErrorZ_get_err(long arg);
1276         public static class LDKPaymentError {
1277                 private LDKPaymentError() {}
1278                 export class Invoice extends LDKPaymentError {
1279                         public String invoice;
1280                         Invoice(String invoice) { this.invoice = invoice; }
1281                 }
1282                 export class Routing extends LDKPaymentError {
1283                         public number routing;
1284                         Routing(number routing) { this.routing = routing; }
1285                 }
1286                 export class Sending extends LDKPaymentError {
1287                         public number sending;
1288                         Sending(number sending) { this.sending = sending; }
1289                 }
1290                 static native void init();
1291         }
1292         static { LDKPaymentError.init(); }
1293         public static native LDKPaymentError LDKPaymentError_ref_from_ptr(long ptr);
1294         public static native Uint8Array LDKCResult_PaymentIdPaymentErrorZ_get_ok(long arg);
1295         public static native number LDKCResult_PaymentIdPaymentErrorZ_get_err(long arg);
1296         public static native SiPrefix LDKCResult_SiPrefixNoneZ_get_ok(long arg);
1297         public static native void LDKCResult_SiPrefixNoneZ_get_err(long arg);
1298         public static native number LDKCResult_InvoiceNoneZ_get_ok(long arg);
1299         public static native void LDKCResult_InvoiceNoneZ_get_err(long arg);
1300         public static native number LDKCResult_SignedRawInvoiceNoneZ_get_ok(long arg);
1301         public static native void LDKCResult_SignedRawInvoiceNoneZ_get_err(long arg);
1302         // struct LDKRawInvoice C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple);
1303         export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(tuple: number): number {
1304                 if(!isWasmInitialized) {
1305                         throw new Error("initializeWasm() must be awaited first!");
1306                 }
1307                 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(tuple);
1308                 return nativeResponseValue;
1309         }
1310         // struct LDKThirtyTwoBytes C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple);
1311         export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(tuple: number): Uint8Array {
1312                 if(!isWasmInitialized) {
1313                         throw new Error("initializeWasm() must be awaited first!");
1314                 }
1315                 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(tuple);
1316                 return decodeArray(nativeResponseValue);
1317         }
1318         // struct LDKInvoiceSignature C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple);
1319         export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(tuple: number): number {
1320                 if(!isWasmInitialized) {
1321                         throw new Error("initializeWasm() must be awaited first!");
1322                 }
1323                 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(tuple);
1324                 return nativeResponseValue;
1325         }
1326         public static native number LDKCResult_PayeePubKeyErrorZ_get_ok(long arg);
1327         public static native Secp256k1Error LDKCResult_PayeePubKeyErrorZ_get_err(long arg);
1328         public static native number LDKCResult_PositiveTimestampCreationErrorZ_get_ok(long arg);
1329         public static native CreationError LDKCResult_PositiveTimestampCreationErrorZ_get_err(long arg);
1330         public static native void LDKCResult_NoneSemanticErrorZ_get_ok(long arg);
1331         public static native SemanticError LDKCResult_NoneSemanticErrorZ_get_err(long arg);
1332         public static native number LDKCResult_InvoiceSemanticErrorZ_get_ok(long arg);
1333         public static native SemanticError LDKCResult_InvoiceSemanticErrorZ_get_err(long arg);
1334         public static native number LDKCResult_DescriptionCreationErrorZ_get_ok(long arg);
1335         public static native CreationError LDKCResult_DescriptionCreationErrorZ_get_err(long arg);
1336         public static native number LDKCResult_ExpiryTimeCreationErrorZ_get_ok(long arg);
1337         public static native CreationError LDKCResult_ExpiryTimeCreationErrorZ_get_err(long arg);
1338         public static native number LDKCResult_PrivateRouteCreationErrorZ_get_ok(long arg);
1339         public static native CreationError LDKCResult_PrivateRouteCreationErrorZ_get_err(long arg);
1340         public static native String LDKCResult_StringErrorZ_get_ok(long arg);
1341         public static native Secp256k1Error LDKCResult_StringErrorZ_get_err(long arg);
1342         public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(long arg);
1343         public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_err(long arg);
1344         public static class LDKCOption_MonitorEventZ {
1345                 private LDKCOption_MonitorEventZ() {}
1346                 export class Some extends LDKCOption_MonitorEventZ {
1347                         public number some;
1348                         Some(number some) { this.some = some; }
1349                 }
1350                 export class None extends LDKCOption_MonitorEventZ {
1351                         None() { }
1352                 }
1353                 static native void init();
1354         }
1355         static { LDKCOption_MonitorEventZ.init(); }
1356         public static native LDKCOption_MonitorEventZ LDKCOption_MonitorEventZ_ref_from_ptr(long ptr);
1357         public static native number LDKCResult_COption_MonitorEventZDecodeErrorZ_get_ok(long arg);
1358         public static native number LDKCResult_COption_MonitorEventZDecodeErrorZ_get_err(long arg);
1359         public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_ok(long arg);
1360         public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_err(long arg);
1361         // struct LDKOutPoint C2Tuple_OutPointScriptZ_get_a(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR tuple);
1362         export function C2Tuple_OutPointScriptZ_get_a(tuple: number): number {
1363                 if(!isWasmInitialized) {
1364                         throw new Error("initializeWasm() must be awaited first!");
1365                 }
1366                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_get_a(tuple);
1367                 return nativeResponseValue;
1368         }
1369         // struct LDKCVec_u8Z C2Tuple_OutPointScriptZ_get_b(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR tuple);
1370         export function C2Tuple_OutPointScriptZ_get_b(tuple: number): Uint8Array {
1371                 if(!isWasmInitialized) {
1372                         throw new Error("initializeWasm() must be awaited first!");
1373                 }
1374                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_get_b(tuple);
1375                 return decodeArray(nativeResponseValue);
1376         }
1377         // uint32_t C2Tuple_u32ScriptZ_get_a(LDKC2Tuple_u32ScriptZ *NONNULL_PTR tuple);
1378         export function C2Tuple_u32ScriptZ_get_a(tuple: number): number {
1379                 if(!isWasmInitialized) {
1380                         throw new Error("initializeWasm() must be awaited first!");
1381                 }
1382                 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_get_a(tuple);
1383                 return nativeResponseValue;
1384         }
1385         // struct LDKCVec_u8Z C2Tuple_u32ScriptZ_get_b(LDKC2Tuple_u32ScriptZ *NONNULL_PTR tuple);
1386         export function C2Tuple_u32ScriptZ_get_b(tuple: number): Uint8Array {
1387                 if(!isWasmInitialized) {
1388                         throw new Error("initializeWasm() must be awaited first!");
1389                 }
1390                 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_get_b(tuple);
1391                 return decodeArray(nativeResponseValue);
1392         }
1393         // struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR tuple);
1394         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(tuple: number): Uint8Array {
1395                 if(!isWasmInitialized) {
1396                         throw new Error("initializeWasm() must be awaited first!");
1397                 }
1398                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(tuple);
1399                 return decodeArray(nativeResponseValue);
1400         }
1401         // struct LDKCVec_C2Tuple_u32ScriptZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR tuple);
1402         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(tuple: number): number[] {
1403                 if(!isWasmInitialized) {
1404                         throw new Error("initializeWasm() must be awaited first!");
1405                 }
1406                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(tuple);
1407                 return nativeResponseValue;
1408         }
1409         // uint32_t C2Tuple_u32TxOutZ_get_a(LDKC2Tuple_u32TxOutZ *NONNULL_PTR tuple);
1410         export function C2Tuple_u32TxOutZ_get_a(tuple: number): number {
1411                 if(!isWasmInitialized) {
1412                         throw new Error("initializeWasm() must be awaited first!");
1413                 }
1414                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_get_a(tuple);
1415                 return nativeResponseValue;
1416         }
1417         // struct LDKTxOut C2Tuple_u32TxOutZ_get_b(LDKC2Tuple_u32TxOutZ *NONNULL_PTR tuple);
1418         export function C2Tuple_u32TxOutZ_get_b(tuple: number): number {
1419                 if(!isWasmInitialized) {
1420                         throw new Error("initializeWasm() must be awaited first!");
1421                 }
1422                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_get_b(tuple);
1423                 return nativeResponseValue;
1424         }
1425         // struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR tuple);
1426         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(tuple: number): Uint8Array {
1427                 if(!isWasmInitialized) {
1428                         throw new Error("initializeWasm() must be awaited first!");
1429                 }
1430                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(tuple);
1431                 return decodeArray(nativeResponseValue);
1432         }
1433         // struct LDKCVec_C2Tuple_u32TxOutZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR tuple);
1434         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(tuple: number): number[] {
1435                 if(!isWasmInitialized) {
1436                         throw new Error("initializeWasm() must be awaited first!");
1437                 }
1438                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(tuple);
1439                 return nativeResponseValue;
1440         }
1441         public static class LDKBalance {
1442                 private LDKBalance() {}
1443                 export class ClaimableOnChannelClose extends LDKBalance {
1444                         public number claimable_amount_satoshis;
1445                         ClaimableOnChannelClose(number claimable_amount_satoshis) { this.claimable_amount_satoshis = claimable_amount_satoshis; }
1446                 }
1447                 export class ClaimableAwaitingConfirmations extends LDKBalance {
1448                         public number claimable_amount_satoshis;
1449                         public number confirmation_height;
1450                         ClaimableAwaitingConfirmations(number claimable_amount_satoshis, number confirmation_height) { this.claimable_amount_satoshis = claimable_amount_satoshis; this.confirmation_height = confirmation_height; }
1451                 }
1452                 export class ContentiousClaimable extends LDKBalance {
1453                         public number claimable_amount_satoshis;
1454                         public number timeout_height;
1455                         ContentiousClaimable(number claimable_amount_satoshis, number timeout_height) { this.claimable_amount_satoshis = claimable_amount_satoshis; this.timeout_height = timeout_height; }
1456                 }
1457                 export class MaybeClaimableHTLCAwaitingTimeout extends LDKBalance {
1458                         public number claimable_amount_satoshis;
1459                         public number claimable_height;
1460                         MaybeClaimableHTLCAwaitingTimeout(number claimable_amount_satoshis, number claimable_height) { this.claimable_amount_satoshis = claimable_amount_satoshis; this.claimable_height = claimable_height; }
1461                 }
1462                 static native void init();
1463         }
1464         static { LDKBalance.init(); }
1465         public static native LDKBalance LDKBalance_ref_from_ptr(long ptr);
1466         public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(long arg);
1467         public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(long arg);
1468         public static native void LDKCResult_NoneLightningErrorZ_get_ok(long arg);
1469         public static native number LDKCResult_NoneLightningErrorZ_get_err(long arg);
1470         // struct LDKPublicKey C2Tuple_PublicKeyTypeZ_get_a(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR tuple);
1471         export function C2Tuple_PublicKeyTypeZ_get_a(tuple: number): Uint8Array {
1472                 if(!isWasmInitialized) {
1473                         throw new Error("initializeWasm() must be awaited first!");
1474                 }
1475                 const nativeResponseValue = wasm.C2Tuple_PublicKeyTypeZ_get_a(tuple);
1476                 return decodeArray(nativeResponseValue);
1477         }
1478         // struct LDKType C2Tuple_PublicKeyTypeZ_get_b(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR tuple);
1479         export function C2Tuple_PublicKeyTypeZ_get_b(tuple: number): number {
1480                 if(!isWasmInitialized) {
1481                         throw new Error("initializeWasm() must be awaited first!");
1482                 }
1483                 const nativeResponseValue = wasm.C2Tuple_PublicKeyTypeZ_get_b(tuple);
1484                 return nativeResponseValue;
1485         }
1486         public static native boolean LDKCResult_boolLightningErrorZ_get_ok(long arg);
1487         public static native number LDKCResult_boolLightningErrorZ_get_err(long arg);
1488         // struct LDKChannelAnnouncement C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple);
1489         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(tuple: number): number {
1490                 if(!isWasmInitialized) {
1491                         throw new Error("initializeWasm() must be awaited first!");
1492                 }
1493                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(tuple);
1494                 return nativeResponseValue;
1495         }
1496         // struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple);
1497         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(tuple: number): number {
1498                 if(!isWasmInitialized) {
1499                         throw new Error("initializeWasm() must be awaited first!");
1500                 }
1501                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(tuple);
1502                 return nativeResponseValue;
1503         }
1504         // struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple);
1505         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(tuple: number): number {
1506                 if(!isWasmInitialized) {
1507                         throw new Error("initializeWasm() must be awaited first!");
1508                 }
1509                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(tuple);
1510                 return nativeResponseValue;
1511         }
1512         public static native Uint8Array LDKCResult_CVec_u8ZPeerHandleErrorZ_get_ok(long arg);
1513         public static native number LDKCResult_CVec_u8ZPeerHandleErrorZ_get_err(long arg);
1514         public static native void LDKCResult_NonePeerHandleErrorZ_get_ok(long arg);
1515         public static native number LDKCResult_NonePeerHandleErrorZ_get_err(long arg);
1516         public static native boolean LDKCResult_boolPeerHandleErrorZ_get_ok(long arg);
1517         public static native number LDKCResult_boolPeerHandleErrorZ_get_err(long arg);
1518         public static native number LDKCResult_NodeIdDecodeErrorZ_get_ok(long arg);
1519         public static native number LDKCResult_NodeIdDecodeErrorZ_get_err(long arg);
1520         public static native number LDKCResult_COption_NetworkUpdateZDecodeErrorZ_get_ok(long arg);
1521         public static native number LDKCResult_COption_NetworkUpdateZDecodeErrorZ_get_err(long arg);
1522
1523
1524
1525 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1526
1527                 export interface LDKAccess {
1528                         get_utxo (genesis_hash: Uint8Array, short_channel_id: number): number;
1529                 }
1530
1531                 export function LDKAccess_new(impl: LDKAccess): number {
1532             throw new Error('unimplemented'); // TODO: bind to WASM
1533         }
1534
1535 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1536
1537
1538         // LDKCResult_TxOutAccessErrorZ Access_get_utxo LDKAccess *NONNULL_PTR this_arg, const uint8_t (*genesis_hash)[32], uint64_t short_channel_id
1539         export function Access_get_utxo(this_arg: number, genesis_hash: Uint8Array, short_channel_id: number): number {
1540                 if(!isWasmInitialized) {
1541                         throw new Error("initializeWasm() must be awaited first!");
1542                 }
1543                 const nativeResponseValue = wasm.Access_get_utxo(this_arg, encodeArray(genesis_hash), short_channel_id);
1544                 return nativeResponseValue;
1545         }
1546         public static class LDKCOption_AccessZ {
1547                 private LDKCOption_AccessZ() {}
1548                 export class Some extends LDKCOption_AccessZ {
1549                         public number some;
1550                         Some(number some) { this.some = some; }
1551                 }
1552                 export class None extends LDKCOption_AccessZ {
1553                         None() { }
1554                 }
1555                 static native void init();
1556         }
1557         static { LDKCOption_AccessZ.init(); }
1558         public static native LDKCOption_AccessZ LDKCOption_AccessZ_ref_from_ptr(long ptr);
1559         public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_ok(long arg);
1560         public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_err(long arg);
1561         public static native number LDKCResult_ChannelInfoDecodeErrorZ_get_ok(long arg);
1562         public static native number LDKCResult_ChannelInfoDecodeErrorZ_get_err(long arg);
1563         public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_ok(long arg);
1564         public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_err(long arg);
1565         public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(long arg);
1566         public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_err(long arg);
1567         public static native number LDKCResult_NodeInfoDecodeErrorZ_get_ok(long arg);
1568         public static native number LDKCResult_NodeInfoDecodeErrorZ_get_err(long arg);
1569         public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_ok(long arg);
1570         public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_err(long arg);
1571         public static class LDKCOption_CVec_NetAddressZZ {
1572                 private LDKCOption_CVec_NetAddressZZ() {}
1573                 export class Some extends LDKCOption_CVec_NetAddressZZ {
1574                         public number[] some;
1575                         Some(number[] some) { this.some = some; }
1576                 }
1577                 export class None extends LDKCOption_CVec_NetAddressZZ {
1578                         None() { }
1579                 }
1580                 static native void init();
1581         }
1582         static { LDKCOption_CVec_NetAddressZZ.init(); }
1583         public static native LDKCOption_CVec_NetAddressZZ LDKCOption_CVec_NetAddressZZ_ref_from_ptr(long ptr);
1584         public static native number LDKCResult_NetAddressDecodeErrorZ_get_ok(long arg);
1585         public static native number LDKCResult_NetAddressDecodeErrorZ_get_err(long arg);
1586         public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_ok(long arg);
1587         public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_err(long arg);
1588         public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_ok(long arg);
1589         public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_err(long arg);
1590         public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_ok(long arg);
1591         public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_err(long arg);
1592         public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_ok(long arg);
1593         public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_err(long arg);
1594         public static native number LDKCResult_ClosingSignedFeeRangeDecodeErrorZ_get_ok(long arg);
1595         public static native number LDKCResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(long arg);
1596         public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_ok(long arg);
1597         public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_err(long arg);
1598         public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_ok(long arg);
1599         public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_err(long arg);
1600         public static native number LDKCResult_FundingSignedDecodeErrorZ_get_ok(long arg);
1601         public static native number LDKCResult_FundingSignedDecodeErrorZ_get_err(long arg);
1602         public static native number LDKCResult_FundingLockedDecodeErrorZ_get_ok(long arg);
1603         public static native number LDKCResult_FundingLockedDecodeErrorZ_get_err(long arg);
1604         public static native number LDKCResult_InitDecodeErrorZ_get_ok(long arg);
1605         public static native number LDKCResult_InitDecodeErrorZ_get_err(long arg);
1606         public static native number LDKCResult_OpenChannelDecodeErrorZ_get_ok(long arg);
1607         public static native number LDKCResult_OpenChannelDecodeErrorZ_get_err(long arg);
1608         public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_ok(long arg);
1609         public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_err(long arg);
1610         public static native number LDKCResult_ShutdownDecodeErrorZ_get_ok(long arg);
1611         public static native number LDKCResult_ShutdownDecodeErrorZ_get_err(long arg);
1612         public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_ok(long arg);
1613         public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_err(long arg);
1614         public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(long arg);
1615         public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(long arg);
1616         public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_ok(long arg);
1617         public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_err(long arg);
1618         public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(long arg);
1619         public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_err(long arg);
1620         public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_ok(long arg);
1621         public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_err(long arg);
1622         public static native number LDKCResult_PingDecodeErrorZ_get_ok(long arg);
1623         public static native number LDKCResult_PingDecodeErrorZ_get_err(long arg);
1624         public static native number LDKCResult_PongDecodeErrorZ_get_ok(long arg);
1625         public static native number LDKCResult_PongDecodeErrorZ_get_err(long arg);
1626         public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(long arg);
1627         public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(long arg);
1628         public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_ok(long arg);
1629         public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_err(long arg);
1630         public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(long arg);
1631         public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_err(long arg);
1632         public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_ok(long arg);
1633         public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_err(long arg);
1634         public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_ok(long arg);
1635         public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_err(long arg);
1636         public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(long arg);
1637         public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(long arg);
1638         public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_ok(long arg);
1639         public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_err(long arg);
1640         public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_ok(long arg);
1641         public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_err(long arg);
1642         public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(long arg);
1643         public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(long arg);
1644         public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_ok(long arg);
1645         public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_err(long arg);
1646         public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_ok(long arg);
1647         public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_err(long arg);
1648         public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_ok(long arg);
1649         public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_err(long arg);
1650         public static class LDKSignOrCreationError {
1651                 private LDKSignOrCreationError() {}
1652                 export class SignError extends LDKSignOrCreationError {
1653                         SignError() { }
1654                 }
1655                 export class CreationError extends LDKSignOrCreationError {
1656                         public CreationError creation_error;
1657                         CreationError(CreationError creation_error) { this.creation_error = creation_error; }
1658                 }
1659                 static native void init();
1660         }
1661         static { LDKSignOrCreationError.init(); }
1662         public static native LDKSignOrCreationError LDKSignOrCreationError_ref_from_ptr(long ptr);
1663         public static native number LDKCResult_InvoiceSignOrCreationErrorZ_get_ok(long arg);
1664         public static native number LDKCResult_InvoiceSignOrCreationErrorZ_get_err(long arg);
1665
1666
1667
1668 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1669
1670                 export interface LDKFilter {
1671                         register_tx (txid: Uint8Array, script_pubkey: Uint8Array): void;
1672                         register_output (output: number): number;
1673                 }
1674
1675                 export function LDKFilter_new(impl: LDKFilter): number {
1676             throw new Error('unimplemented'); // TODO: bind to WASM
1677         }
1678
1679 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1680
1681
1682         // void Filter_register_tx LDKFilter *NONNULL_PTR this_arg, const uint8_t (*txid)[32], struct LDKu8slice script_pubkey
1683         export function Filter_register_tx(this_arg: number, txid: Uint8Array, script_pubkey: Uint8Array): void {
1684                 if(!isWasmInitialized) {
1685                         throw new Error("initializeWasm() must be awaited first!");
1686                 }
1687                 const nativeResponseValue = wasm.Filter_register_tx(this_arg, encodeArray(txid), encodeArray(script_pubkey));
1688                 // debug statements here
1689         }
1690         // LDKCOption_C2Tuple_usizeTransactionZZ Filter_register_output LDKFilter *NONNULL_PTR this_arg, struct LDKWatchedOutput output
1691         export function Filter_register_output(this_arg: number, output: number): number {
1692                 if(!isWasmInitialized) {
1693                         throw new Error("initializeWasm() must be awaited first!");
1694                 }
1695                 const nativeResponseValue = wasm.Filter_register_output(this_arg, output);
1696                 return nativeResponseValue;
1697         }
1698         public static class LDKCOption_FilterZ {
1699                 private LDKCOption_FilterZ() {}
1700                 export class Some extends LDKCOption_FilterZ {
1701                         public number some;
1702                         Some(number some) { this.some = some; }
1703                 }
1704                 export class None extends LDKCOption_FilterZ {
1705                         None() { }
1706                 }
1707                 static native void init();
1708         }
1709         static { LDKCOption_FilterZ.init(); }
1710         public static native LDKCOption_FilterZ LDKCOption_FilterZ_ref_from_ptr(long ptr);
1711         public static native number LDKCResult_LockedChannelMonitorNoneZ_get_ok(long arg);
1712         public static native void LDKCResult_LockedChannelMonitorNoneZ_get_err(long arg);
1713
1714
1715
1716 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1717
1718                 export interface LDKMessageSendEventsProvider {
1719                         get_and_clear_pending_msg_events (): number[];
1720                 }
1721
1722                 export function LDKMessageSendEventsProvider_new(impl: LDKMessageSendEventsProvider): number {
1723             throw new Error('unimplemented'); // TODO: bind to WASM
1724         }
1725
1726 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1727
1728
1729         // LDKCVec_MessageSendEventZ MessageSendEventsProvider_get_and_clear_pending_msg_events LDKMessageSendEventsProvider *NONNULL_PTR this_arg
1730         export function MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg: number): number[] {
1731                 if(!isWasmInitialized) {
1732                         throw new Error("initializeWasm() must be awaited first!");
1733                 }
1734                 const nativeResponseValue = wasm.MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg);
1735                 return nativeResponseValue;
1736         }
1737
1738
1739
1740 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1741
1742                 export interface LDKEventHandler {
1743                         handle_event (event: number): void;
1744                 }
1745
1746                 export function LDKEventHandler_new(impl: LDKEventHandler): number {
1747             throw new Error('unimplemented'); // TODO: bind to WASM
1748         }
1749
1750 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1751
1752
1753         // void EventHandler_handle_event LDKEventHandler *NONNULL_PTR this_arg, const struct LDKEvent *NONNULL_PTR event
1754         export function EventHandler_handle_event(this_arg: number, event: number): void {
1755                 if(!isWasmInitialized) {
1756                         throw new Error("initializeWasm() must be awaited first!");
1757                 }
1758                 const nativeResponseValue = wasm.EventHandler_handle_event(this_arg, event);
1759                 // debug statements here
1760         }
1761
1762
1763
1764 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1765
1766                 export interface LDKEventsProvider {
1767                         process_pending_events (handler: number): void;
1768                 }
1769
1770                 export function LDKEventsProvider_new(impl: LDKEventsProvider): number {
1771             throw new Error('unimplemented'); // TODO: bind to WASM
1772         }
1773
1774 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1775
1776
1777         // void EventsProvider_process_pending_events LDKEventsProvider *NONNULL_PTR this_arg, struct LDKEventHandler handler
1778         export function EventsProvider_process_pending_events(this_arg: number, handler: number): void {
1779                 if(!isWasmInitialized) {
1780                         throw new Error("initializeWasm() must be awaited first!");
1781                 }
1782                 const nativeResponseValue = wasm.EventsProvider_process_pending_events(this_arg, handler);
1783                 // debug statements here
1784         }
1785
1786
1787
1788 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1789
1790                 export interface LDKListen {
1791                         block_connected (block: Uint8Array, height: number): void;
1792                         block_disconnected (header: Uint8Array, height: number): void;
1793                 }
1794
1795                 export function LDKListen_new(impl: LDKListen): number {
1796             throw new Error('unimplemented'); // TODO: bind to WASM
1797         }
1798
1799 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1800
1801
1802         // void Listen_block_connected LDKListen *NONNULL_PTR this_arg, struct LDKu8slice block, uint32_t height
1803         export function Listen_block_connected(this_arg: number, block: Uint8Array, height: number): void {
1804                 if(!isWasmInitialized) {
1805                         throw new Error("initializeWasm() must be awaited first!");
1806                 }
1807                 const nativeResponseValue = wasm.Listen_block_connected(this_arg, encodeArray(block), height);
1808                 // debug statements here
1809         }
1810         // void Listen_block_disconnected LDKListen *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
1811         export function Listen_block_disconnected(this_arg: number, header: Uint8Array, height: number): void {
1812                 if(!isWasmInitialized) {
1813                         throw new Error("initializeWasm() must be awaited first!");
1814                 }
1815                 const nativeResponseValue = wasm.Listen_block_disconnected(this_arg, encodeArray(header), height);
1816                 // debug statements here
1817         }
1818
1819
1820
1821 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1822
1823                 export interface LDKConfirm {
1824                         transactions_confirmed (header: Uint8Array, txdata: number[], height: number): void;
1825                         transaction_unconfirmed (txid: Uint8Array): void;
1826                         best_block_updated (header: Uint8Array, height: number): void;
1827                         get_relevant_txids (): Uint8Array[];
1828                 }
1829
1830                 export function LDKConfirm_new(impl: LDKConfirm): number {
1831             throw new Error('unimplemented'); // TODO: bind to WASM
1832         }
1833
1834 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1835
1836
1837         // void Confirm_transactions_confirmed LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height
1838         export function Confirm_transactions_confirmed(this_arg: number, header: Uint8Array, txdata: number[], height: number): void {
1839                 if(!isWasmInitialized) {
1840                         throw new Error("initializeWasm() must be awaited first!");
1841                 }
1842                 const nativeResponseValue = wasm.Confirm_transactions_confirmed(this_arg, encodeArray(header), txdata, height);
1843                 // debug statements here
1844         }
1845         // void Confirm_transaction_unconfirmed LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*txid)[32]
1846         export function Confirm_transaction_unconfirmed(this_arg: number, txid: Uint8Array): void {
1847                 if(!isWasmInitialized) {
1848                         throw new Error("initializeWasm() must be awaited first!");
1849                 }
1850                 const nativeResponseValue = wasm.Confirm_transaction_unconfirmed(this_arg, encodeArray(txid));
1851                 // debug statements here
1852         }
1853         // void Confirm_best_block_updated LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
1854         export function Confirm_best_block_updated(this_arg: number, header: Uint8Array, height: number): void {
1855                 if(!isWasmInitialized) {
1856                         throw new Error("initializeWasm() must be awaited first!");
1857                 }
1858                 const nativeResponseValue = wasm.Confirm_best_block_updated(this_arg, encodeArray(header), height);
1859                 // debug statements here
1860         }
1861         // LDKCVec_TxidZ Confirm_get_relevant_txids LDKConfirm *NONNULL_PTR this_arg
1862         export function Confirm_get_relevant_txids(this_arg: number): Uint8Array[] {
1863                 if(!isWasmInitialized) {
1864                         throw new Error("initializeWasm() must be awaited first!");
1865                 }
1866                 const nativeResponseValue = wasm.Confirm_get_relevant_txids(this_arg);
1867                 return nativeResponseValue;
1868         }
1869
1870
1871
1872 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1873
1874                 export interface LDKPersist {
1875                         persist_new_channel (channel_id: number, data: number, update_id: number): number;
1876                         update_persisted_channel (channel_id: number, update: number, data: number, update_id: number): number;
1877                 }
1878
1879                 export function LDKPersist_new(impl: LDKPersist): number {
1880             throw new Error('unimplemented'); // TODO: bind to WASM
1881         }
1882
1883 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1884
1885
1886         // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_persist_new_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_id, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id
1887         export function Persist_persist_new_channel(this_arg: number, channel_id: number, data: number, update_id: number): number {
1888                 if(!isWasmInitialized) {
1889                         throw new Error("initializeWasm() must be awaited first!");
1890                 }
1891                 const nativeResponseValue = wasm.Persist_persist_new_channel(this_arg, channel_id, data, update_id);
1892                 return nativeResponseValue;
1893         }
1894         // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_update_persisted_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_id, const struct LDKChannelMonitorUpdate *NONNULL_PTR update, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id
1895         export function Persist_update_persisted_channel(this_arg: number, channel_id: number, update: number, data: number, update_id: number): number {
1896                 if(!isWasmInitialized) {
1897                         throw new Error("initializeWasm() must be awaited first!");
1898                 }
1899                 const nativeResponseValue = wasm.Persist_update_persisted_channel(this_arg, channel_id, update, data, update_id);
1900                 return nativeResponseValue;
1901         }
1902
1903
1904
1905 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1906
1907                 export interface LDKChannelMessageHandler {
1908                         handle_open_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
1909                         handle_accept_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
1910                         handle_funding_created (their_node_id: Uint8Array, msg: number): void;
1911                         handle_funding_signed (their_node_id: Uint8Array, msg: number): void;
1912                         handle_funding_locked (their_node_id: Uint8Array, msg: number): void;
1913                         handle_shutdown (their_node_id: Uint8Array, their_features: number, msg: number): void;
1914                         handle_closing_signed (their_node_id: Uint8Array, msg: number): void;
1915                         handle_update_add_htlc (their_node_id: Uint8Array, msg: number): void;
1916                         handle_update_fulfill_htlc (their_node_id: Uint8Array, msg: number): void;
1917                         handle_update_fail_htlc (their_node_id: Uint8Array, msg: number): void;
1918                         handle_update_fail_malformed_htlc (their_node_id: Uint8Array, msg: number): void;
1919                         handle_commitment_signed (their_node_id: Uint8Array, msg: number): void;
1920                         handle_revoke_and_ack (their_node_id: Uint8Array, msg: number): void;
1921                         handle_update_fee (their_node_id: Uint8Array, msg: number): void;
1922                         handle_announcement_signatures (their_node_id: Uint8Array, msg: number): void;
1923                         peer_disconnected (their_node_id: Uint8Array, no_connection_possible: boolean): void;
1924                         peer_connected (their_node_id: Uint8Array, msg: number): void;
1925                         handle_channel_reestablish (their_node_id: Uint8Array, msg: number): void;
1926                         handle_channel_update (their_node_id: Uint8Array, msg: number): void;
1927                         handle_error (their_node_id: Uint8Array, msg: number): void;
1928                 }
1929
1930                 export function LDKChannelMessageHandler_new(impl: LDKChannelMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
1931             throw new Error('unimplemented'); // TODO: bind to WASM
1932         }
1933
1934 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1935
1936
1937         // void ChannelMessageHandler_handle_open_channel LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKInitFeatures their_features, const struct LDKOpenChannel *NONNULL_PTR msg
1938         export function ChannelMessageHandler_handle_open_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1939                 if(!isWasmInitialized) {
1940                         throw new Error("initializeWasm() must be awaited first!");
1941                 }
1942                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_open_channel(this_arg, encodeArray(their_node_id), their_features, msg);
1943                 // debug statements here
1944         }
1945         // void ChannelMessageHandler_handle_accept_channel LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKInitFeatures their_features, const struct LDKAcceptChannel *NONNULL_PTR msg
1946         export function ChannelMessageHandler_handle_accept_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1947                 if(!isWasmInitialized) {
1948                         throw new Error("initializeWasm() must be awaited first!");
1949                 }
1950                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_accept_channel(this_arg, encodeArray(their_node_id), their_features, msg);
1951                 // debug statements here
1952         }
1953         // void ChannelMessageHandler_handle_funding_created LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingCreated *NONNULL_PTR msg
1954         export function ChannelMessageHandler_handle_funding_created(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1955                 if(!isWasmInitialized) {
1956                         throw new Error("initializeWasm() must be awaited first!");
1957                 }
1958                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_created(this_arg, encodeArray(their_node_id), msg);
1959                 // debug statements here
1960         }
1961         // void ChannelMessageHandler_handle_funding_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingSigned *NONNULL_PTR msg
1962         export function ChannelMessageHandler_handle_funding_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1963                 if(!isWasmInitialized) {
1964                         throw new Error("initializeWasm() must be awaited first!");
1965                 }
1966                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_signed(this_arg, encodeArray(their_node_id), msg);
1967                 // debug statements here
1968         }
1969         // void ChannelMessageHandler_handle_funding_locked LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingLocked *NONNULL_PTR msg
1970         export function ChannelMessageHandler_handle_funding_locked(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1971                 if(!isWasmInitialized) {
1972                         throw new Error("initializeWasm() must be awaited first!");
1973                 }
1974                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_locked(this_arg, encodeArray(their_node_id), msg);
1975                 // debug statements here
1976         }
1977         // void ChannelMessageHandler_handle_shutdown LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInitFeatures *NONNULL_PTR their_features, const struct LDKShutdown *NONNULL_PTR msg
1978         export function ChannelMessageHandler_handle_shutdown(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1979                 if(!isWasmInitialized) {
1980                         throw new Error("initializeWasm() must be awaited first!");
1981                 }
1982                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_shutdown(this_arg, encodeArray(their_node_id), their_features, msg);
1983                 // debug statements here
1984         }
1985         // void ChannelMessageHandler_handle_closing_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKClosingSigned *NONNULL_PTR msg
1986         export function ChannelMessageHandler_handle_closing_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1987                 if(!isWasmInitialized) {
1988                         throw new Error("initializeWasm() must be awaited first!");
1989                 }
1990                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_closing_signed(this_arg, encodeArray(their_node_id), msg);
1991                 // debug statements here
1992         }
1993         // void ChannelMessageHandler_handle_update_add_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateAddHTLC *NONNULL_PTR msg
1994         export function ChannelMessageHandler_handle_update_add_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1995                 if(!isWasmInitialized) {
1996                         throw new Error("initializeWasm() must be awaited first!");
1997                 }
1998                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_add_htlc(this_arg, encodeArray(their_node_id), msg);
1999                 // debug statements here
2000         }
2001         // void ChannelMessageHandler_handle_update_fulfill_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFulfillHTLC *NONNULL_PTR msg
2002         export function ChannelMessageHandler_handle_update_fulfill_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2003                 if(!isWasmInitialized) {
2004                         throw new Error("initializeWasm() must be awaited first!");
2005                 }
2006                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fulfill_htlc(this_arg, encodeArray(their_node_id), msg);
2007                 // debug statements here
2008         }
2009         // void ChannelMessageHandler_handle_update_fail_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailHTLC *NONNULL_PTR msg
2010         export function ChannelMessageHandler_handle_update_fail_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2011                 if(!isWasmInitialized) {
2012                         throw new Error("initializeWasm() must be awaited first!");
2013                 }
2014                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fail_htlc(this_arg, encodeArray(their_node_id), msg);
2015                 // debug statements here
2016         }
2017         // void ChannelMessageHandler_handle_update_fail_malformed_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR msg
2018         export function ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2019                 if(!isWasmInitialized) {
2020                         throw new Error("initializeWasm() must be awaited first!");
2021                 }
2022                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg, encodeArray(their_node_id), msg);
2023                 // debug statements here
2024         }
2025         // void ChannelMessageHandler_handle_commitment_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKCommitmentSigned *NONNULL_PTR msg
2026         export function ChannelMessageHandler_handle_commitment_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2027                 if(!isWasmInitialized) {
2028                         throw new Error("initializeWasm() must be awaited first!");
2029                 }
2030                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_commitment_signed(this_arg, encodeArray(their_node_id), msg);
2031                 // debug statements here
2032         }
2033         // void ChannelMessageHandler_handle_revoke_and_ack LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKRevokeAndACK *NONNULL_PTR msg
2034         export function ChannelMessageHandler_handle_revoke_and_ack(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2035                 if(!isWasmInitialized) {
2036                         throw new Error("initializeWasm() must be awaited first!");
2037                 }
2038                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_revoke_and_ack(this_arg, encodeArray(their_node_id), msg);
2039                 // debug statements here
2040         }
2041         // void ChannelMessageHandler_handle_update_fee LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFee *NONNULL_PTR msg
2042         export function ChannelMessageHandler_handle_update_fee(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2043                 if(!isWasmInitialized) {
2044                         throw new Error("initializeWasm() must be awaited first!");
2045                 }
2046                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fee(this_arg, encodeArray(their_node_id), msg);
2047                 // debug statements here
2048         }
2049         // void ChannelMessageHandler_handle_announcement_signatures LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKAnnouncementSignatures *NONNULL_PTR msg
2050         export function ChannelMessageHandler_handle_announcement_signatures(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2051                 if(!isWasmInitialized) {
2052                         throw new Error("initializeWasm() must be awaited first!");
2053                 }
2054                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_announcement_signatures(this_arg, encodeArray(their_node_id), msg);
2055                 // debug statements here
2056         }
2057         // void ChannelMessageHandler_peer_disconnected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, bool no_connection_possible
2058         export function ChannelMessageHandler_peer_disconnected(this_arg: number, their_node_id: Uint8Array, no_connection_possible: boolean): void {
2059                 if(!isWasmInitialized) {
2060                         throw new Error("initializeWasm() must be awaited first!");
2061                 }
2062                 const nativeResponseValue = wasm.ChannelMessageHandler_peer_disconnected(this_arg, encodeArray(their_node_id), no_connection_possible);
2063                 // debug statements here
2064         }
2065         // void ChannelMessageHandler_peer_connected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR msg
2066         export function ChannelMessageHandler_peer_connected(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2067                 if(!isWasmInitialized) {
2068                         throw new Error("initializeWasm() must be awaited first!");
2069                 }
2070                 const nativeResponseValue = wasm.ChannelMessageHandler_peer_connected(this_arg, encodeArray(their_node_id), msg);
2071                 // debug statements here
2072         }
2073         // void ChannelMessageHandler_handle_channel_reestablish LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelReestablish *NONNULL_PTR msg
2074         export function ChannelMessageHandler_handle_channel_reestablish(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2075                 if(!isWasmInitialized) {
2076                         throw new Error("initializeWasm() must be awaited first!");
2077                 }
2078                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_channel_reestablish(this_arg, encodeArray(their_node_id), msg);
2079                 // debug statements here
2080         }
2081         // void ChannelMessageHandler_handle_channel_update LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelUpdate *NONNULL_PTR msg
2082         export function ChannelMessageHandler_handle_channel_update(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2083                 if(!isWasmInitialized) {
2084                         throw new Error("initializeWasm() must be awaited first!");
2085                 }
2086                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_channel_update(this_arg, encodeArray(their_node_id), msg);
2087                 // debug statements here
2088         }
2089         // void ChannelMessageHandler_handle_error LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKErrorMessage *NONNULL_PTR msg
2090         export function ChannelMessageHandler_handle_error(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2091                 if(!isWasmInitialized) {
2092                         throw new Error("initializeWasm() must be awaited first!");
2093                 }
2094                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_error(this_arg, encodeArray(their_node_id), msg);
2095                 // debug statements here
2096         }
2097
2098
2099
2100 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2101
2102                 export interface LDKRoutingMessageHandler {
2103                         handle_node_announcement (msg: number): number;
2104                         handle_channel_announcement (msg: number): number;
2105                         handle_channel_update (msg: number): number;
2106                         get_next_channel_announcements (starting_point: number, batch_amount: number): number[];
2107                         get_next_node_announcements (starting_point: Uint8Array, batch_amount: number): number[];
2108                         sync_routing_table (their_node_id: Uint8Array, init: number): void;
2109                         handle_reply_channel_range (their_node_id: Uint8Array, msg: number): number;
2110                         handle_reply_short_channel_ids_end (their_node_id: Uint8Array, msg: number): number;
2111                         handle_query_channel_range (their_node_id: Uint8Array, msg: number): number;
2112                         handle_query_short_channel_ids (their_node_id: Uint8Array, msg: number): number;
2113                 }
2114
2115                 export function LDKRoutingMessageHandler_new(impl: LDKRoutingMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
2116             throw new Error('unimplemented'); // TODO: bind to WASM
2117         }
2118
2119 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2120
2121
2122         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_node_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg
2123         export function RoutingMessageHandler_handle_node_announcement(this_arg: number, msg: number): number {
2124                 if(!isWasmInitialized) {
2125                         throw new Error("initializeWasm() must be awaited first!");
2126                 }
2127                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_node_announcement(this_arg, msg);
2128                 return nativeResponseValue;
2129         }
2130         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg
2131         export function RoutingMessageHandler_handle_channel_announcement(this_arg: number, msg: number): number {
2132                 if(!isWasmInitialized) {
2133                         throw new Error("initializeWasm() must be awaited first!");
2134                 }
2135                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_channel_announcement(this_arg, msg);
2136                 return nativeResponseValue;
2137         }
2138         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_update LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg
2139         export function RoutingMessageHandler_handle_channel_update(this_arg: number, msg: number): number {
2140                 if(!isWasmInitialized) {
2141                         throw new Error("initializeWasm() must be awaited first!");
2142                 }
2143                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_channel_update(this_arg, msg);
2144                 return nativeResponseValue;
2145         }
2146         // LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ RoutingMessageHandler_get_next_channel_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, uint64_t starting_point, uint8_t batch_amount
2147         export function RoutingMessageHandler_get_next_channel_announcements(this_arg: number, starting_point: number, batch_amount: number): number[] {
2148                 if(!isWasmInitialized) {
2149                         throw new Error("initializeWasm() must be awaited first!");
2150                 }
2151                 const nativeResponseValue = wasm.RoutingMessageHandler_get_next_channel_announcements(this_arg, starting_point, batch_amount);
2152                 return nativeResponseValue;
2153         }
2154         // LDKCVec_NodeAnnouncementZ RoutingMessageHandler_get_next_node_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey starting_point, uint8_t batch_amount
2155         export function RoutingMessageHandler_get_next_node_announcements(this_arg: number, starting_point: Uint8Array, batch_amount: number): number[] {
2156                 if(!isWasmInitialized) {
2157                         throw new Error("initializeWasm() must be awaited first!");
2158                 }
2159                 const nativeResponseValue = wasm.RoutingMessageHandler_get_next_node_announcements(this_arg, encodeArray(starting_point), batch_amount);
2160                 return nativeResponseValue;
2161         }
2162         // void RoutingMessageHandler_sync_routing_table LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init
2163         export function RoutingMessageHandler_sync_routing_table(this_arg: number, their_node_id: Uint8Array, init: number): void {
2164                 if(!isWasmInitialized) {
2165                         throw new Error("initializeWasm() must be awaited first!");
2166                 }
2167                 const nativeResponseValue = wasm.RoutingMessageHandler_sync_routing_table(this_arg, encodeArray(their_node_id), init);
2168                 // debug statements here
2169         }
2170         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyChannelRange msg
2171         export function RoutingMessageHandler_handle_reply_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
2172                 if(!isWasmInitialized) {
2173                         throw new Error("initializeWasm() must be awaited first!");
2174                 }
2175                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_reply_channel_range(this_arg, encodeArray(their_node_id), msg);
2176                 return nativeResponseValue;
2177         }
2178         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_short_channel_ids_end LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyShortChannelIdsEnd msg
2179         export function RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg: number, their_node_id: Uint8Array, msg: number): number {
2180                 if(!isWasmInitialized) {
2181                         throw new Error("initializeWasm() must be awaited first!");
2182                 }
2183                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg, encodeArray(their_node_id), msg);
2184                 return nativeResponseValue;
2185         }
2186         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryChannelRange msg
2187         export function RoutingMessageHandler_handle_query_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
2188                 if(!isWasmInitialized) {
2189                         throw new Error("initializeWasm() must be awaited first!");
2190                 }
2191                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_query_channel_range(this_arg, encodeArray(their_node_id), msg);
2192                 return nativeResponseValue;
2193         }
2194         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_short_channel_ids LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryShortChannelIds msg
2195         export function RoutingMessageHandler_handle_query_short_channel_ids(this_arg: number, their_node_id: Uint8Array, msg: number): number {
2196                 if(!isWasmInitialized) {
2197                         throw new Error("initializeWasm() must be awaited first!");
2198                 }
2199                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_query_short_channel_ids(this_arg, encodeArray(their_node_id), msg);
2200                 return nativeResponseValue;
2201         }
2202
2203
2204
2205 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2206
2207                 export interface LDKCustomMessageReader {
2208                         read (message_type: number, buffer: Uint8Array): number;
2209                 }
2210
2211                 export function LDKCustomMessageReader_new(impl: LDKCustomMessageReader): number {
2212             throw new Error('unimplemented'); // TODO: bind to WASM
2213         }
2214
2215 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2216
2217
2218         // LDKCResult_COption_TypeZDecodeErrorZ CustomMessageReader_read LDKCustomMessageReader *NONNULL_PTR this_arg, uint16_t message_type, struct LDKu8slice buffer
2219         export function CustomMessageReader_read(this_arg: number, message_type: number, buffer: Uint8Array): number {
2220                 if(!isWasmInitialized) {
2221                         throw new Error("initializeWasm() must be awaited first!");
2222                 }
2223                 const nativeResponseValue = wasm.CustomMessageReader_read(this_arg, message_type, encodeArray(buffer));
2224                 return nativeResponseValue;
2225         }
2226
2227
2228
2229 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2230
2231                 export interface LDKCustomMessageHandler {
2232                         handle_custom_message (msg: number, sender_node_id: Uint8Array): number;
2233                         get_and_clear_pending_msg (): number[];
2234                 }
2235
2236                 export function LDKCustomMessageHandler_new(impl: LDKCustomMessageHandler, CustomMessageReader: LDKCustomMessageReader): number {
2237             throw new Error('unimplemented'); // TODO: bind to WASM
2238         }
2239
2240 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2241
2242
2243         // LDKCResult_NoneLightningErrorZ CustomMessageHandler_handle_custom_message LDKCustomMessageHandler *NONNULL_PTR this_arg, struct LDKType msg, struct LDKPublicKey sender_node_id
2244         export function CustomMessageHandler_handle_custom_message(this_arg: number, msg: number, sender_node_id: Uint8Array): number {
2245                 if(!isWasmInitialized) {
2246                         throw new Error("initializeWasm() must be awaited first!");
2247                 }
2248                 const nativeResponseValue = wasm.CustomMessageHandler_handle_custom_message(this_arg, msg, encodeArray(sender_node_id));
2249                 return nativeResponseValue;
2250         }
2251         // LDKCVec_C2Tuple_PublicKeyTypeZZ CustomMessageHandler_get_and_clear_pending_msg LDKCustomMessageHandler *NONNULL_PTR this_arg
2252         export function CustomMessageHandler_get_and_clear_pending_msg(this_arg: number): number[] {
2253                 if(!isWasmInitialized) {
2254                         throw new Error("initializeWasm() must be awaited first!");
2255                 }
2256                 const nativeResponseValue = wasm.CustomMessageHandler_get_and_clear_pending_msg(this_arg);
2257                 return nativeResponseValue;
2258         }
2259
2260
2261
2262 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2263
2264                 export interface LDKSocketDescriptor {
2265                         send_data (data: Uint8Array, resume_read: boolean): number;
2266                         disconnect_socket (): void;
2267                         eq (other_arg: number): boolean;
2268                         hash (): number;
2269                 }
2270
2271                 export function LDKSocketDescriptor_new(impl: LDKSocketDescriptor): number {
2272             throw new Error('unimplemented'); // TODO: bind to WASM
2273         }
2274
2275 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2276
2277
2278         // uintptr_t SocketDescriptor_send_data LDKSocketDescriptor *NONNULL_PTR this_arg, struct LDKu8slice data, bool resume_read
2279         export function SocketDescriptor_send_data(this_arg: number, data: Uint8Array, resume_read: boolean): number {
2280                 if(!isWasmInitialized) {
2281                         throw new Error("initializeWasm() must be awaited first!");
2282                 }
2283                 const nativeResponseValue = wasm.SocketDescriptor_send_data(this_arg, encodeArray(data), resume_read);
2284                 return nativeResponseValue;
2285         }
2286         // void SocketDescriptor_disconnect_socket LDKSocketDescriptor *NONNULL_PTR this_arg
2287         export function SocketDescriptor_disconnect_socket(this_arg: number): void {
2288                 if(!isWasmInitialized) {
2289                         throw new Error("initializeWasm() must be awaited first!");
2290                 }
2291                 const nativeResponseValue = wasm.SocketDescriptor_disconnect_socket(this_arg);
2292                 // debug statements here
2293         }
2294         // uint64_t SocketDescriptor_hash LDKSocketDescriptor *NONNULL_PTR this_arg
2295         export function SocketDescriptor_hash(this_arg: number): number {
2296                 if(!isWasmInitialized) {
2297                         throw new Error("initializeWasm() must be awaited first!");
2298                 }
2299                 const nativeResponseValue = wasm.SocketDescriptor_hash(this_arg);
2300                 return nativeResponseValue;
2301         }
2302
2303
2304
2305 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2306
2307                 export interface LDKScore {
2308                         channel_penalty_msat (short_channel_id: number, send_amt_msat: number, channel_capacity_msat: number, source: number, target: number): number;
2309                         payment_path_failed (path: number[], short_channel_id: number): void;
2310                         payment_path_successful (path: number[]): void;
2311                         write (): Uint8Array;
2312                 }
2313
2314                 export function LDKScore_new(impl: LDKScore): number {
2315             throw new Error('unimplemented'); // TODO: bind to WASM
2316         }
2317
2318 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2319
2320
2321         // uint64_t Score_channel_penalty_msat LDKScore *NONNULL_PTR this_arg, uint64_t short_channel_id, uint64_t send_amt_msat, struct LDKCOption_u64Z channel_capacity_msat, const struct LDKNodeId *NONNULL_PTR source, const struct LDKNodeId *NONNULL_PTR target
2322         export function Score_channel_penalty_msat(this_arg: number, short_channel_id: number, send_amt_msat: number, channel_capacity_msat: number, source: number, target: number): number {
2323                 if(!isWasmInitialized) {
2324                         throw new Error("initializeWasm() must be awaited first!");
2325                 }
2326                 const nativeResponseValue = wasm.Score_channel_penalty_msat(this_arg, short_channel_id, send_amt_msat, channel_capacity_msat, source, target);
2327                 return nativeResponseValue;
2328         }
2329         // void Score_payment_path_failed LDKScore *NONNULL_PTR this_arg, struct LDKCVec_RouteHopZ path, uint64_t short_channel_id
2330         export function Score_payment_path_failed(this_arg: number, path: number[], short_channel_id: number): void {
2331                 if(!isWasmInitialized) {
2332                         throw new Error("initializeWasm() must be awaited first!");
2333                 }
2334                 const nativeResponseValue = wasm.Score_payment_path_failed(this_arg, path, short_channel_id);
2335                 // debug statements here
2336         }
2337         // void Score_payment_path_successful LDKScore *NONNULL_PTR this_arg, struct LDKCVec_RouteHopZ path
2338         export function Score_payment_path_successful(this_arg: number, path: number[]): void {
2339                 if(!isWasmInitialized) {
2340                         throw new Error("initializeWasm() must be awaited first!");
2341                 }
2342                 const nativeResponseValue = wasm.Score_payment_path_successful(this_arg, path);
2343                 // debug statements here
2344         }
2345         // LDKCVec_u8Z Score_write LDKScore *NONNULL_PTR this_arg
2346         export function Score_write(this_arg: number): Uint8Array {
2347                 if(!isWasmInitialized) {
2348                         throw new Error("initializeWasm() must be awaited first!");
2349                 }
2350                 const nativeResponseValue = wasm.Score_write(this_arg);
2351                 return decodeArray(nativeResponseValue);
2352         }
2353
2354
2355
2356 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2357
2358                 export interface LDKLockableScore {
2359                         lock (): number;
2360                 }
2361
2362                 export function LDKLockableScore_new(impl: LDKLockableScore): number {
2363             throw new Error('unimplemented'); // TODO: bind to WASM
2364         }
2365
2366 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2367
2368
2369         // LDKScore LockableScore_lock LDKLockableScore *NONNULL_PTR this_arg
2370         export function LockableScore_lock(this_arg: number): number {
2371                 if(!isWasmInitialized) {
2372                         throw new Error("initializeWasm() must be awaited first!");
2373                 }
2374                 const nativeResponseValue = wasm.LockableScore_lock(this_arg);
2375                 return nativeResponseValue;
2376         }
2377
2378
2379
2380 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2381
2382                 export interface LDKChannelManagerPersister {
2383                         persist_manager (channel_manager: number): number;
2384                 }
2385
2386                 export function LDKChannelManagerPersister_new(impl: LDKChannelManagerPersister): number {
2387             throw new Error('unimplemented'); // TODO: bind to WASM
2388         }
2389
2390 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2391
2392
2393         // LDKCResult_NoneErrorZ ChannelManagerPersister_persist_manager LDKChannelManagerPersister *NONNULL_PTR this_arg, const struct LDKChannelManager *NONNULL_PTR channel_manager
2394         export function ChannelManagerPersister_persist_manager(this_arg: number, channel_manager: number): number {
2395                 if(!isWasmInitialized) {
2396                         throw new Error("initializeWasm() must be awaited first!");
2397                 }
2398                 const nativeResponseValue = wasm.ChannelManagerPersister_persist_manager(this_arg, channel_manager);
2399                 return nativeResponseValue;
2400         }
2401         public static class LDKFallback {
2402                 private LDKFallback() {}
2403                 export class SegWitProgram extends LDKFallback {
2404                         public number version;
2405                         public Uint8Array program;
2406                         SegWitProgram(number version, Uint8Array program) { this.version = version; this.program = program; }
2407                 }
2408                 export class PubKeyHash extends LDKFallback {
2409                         public Uint8Array pub_key_hash;
2410                         PubKeyHash(Uint8Array pub_key_hash) { this.pub_key_hash = pub_key_hash; }
2411                 }
2412                 export class ScriptHash extends LDKFallback {
2413                         public Uint8Array script_hash;
2414                         ScriptHash(Uint8Array script_hash) { this.script_hash = script_hash; }
2415                 }
2416                 static native void init();
2417         }
2418         static { LDKFallback.init(); }
2419         public static native LDKFallback LDKFallback_ref_from_ptr(long ptr);
2420
2421
2422
2423 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2424
2425                 export interface LDKPayer {
2426                         node_id (): Uint8Array;
2427                         first_hops (): number[];
2428                         send_payment (route: number, payment_hash: Uint8Array, payment_secret: Uint8Array): number;
2429                         send_spontaneous_payment (route: number, payment_preimage: Uint8Array): number;
2430                         retry_payment (route: number, payment_id: Uint8Array): number;
2431                         abandon_payment (payment_id: Uint8Array): void;
2432                 }
2433
2434                 export function LDKPayer_new(impl: LDKPayer): number {
2435             throw new Error('unimplemented'); // TODO: bind to WASM
2436         }
2437
2438 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2439
2440
2441         // LDKPublicKey Payer_node_id LDKPayer *NONNULL_PTR this_arg
2442         export function Payer_node_id(this_arg: number): Uint8Array {
2443                 if(!isWasmInitialized) {
2444                         throw new Error("initializeWasm() must be awaited first!");
2445                 }
2446                 const nativeResponseValue = wasm.Payer_node_id(this_arg);
2447                 return decodeArray(nativeResponseValue);
2448         }
2449         // LDKCVec_ChannelDetailsZ Payer_first_hops LDKPayer *NONNULL_PTR this_arg
2450         export function Payer_first_hops(this_arg: number): number[] {
2451                 if(!isWasmInitialized) {
2452                         throw new Error("initializeWasm() must be awaited first!");
2453                 }
2454                 const nativeResponseValue = wasm.Payer_first_hops(this_arg);
2455                 return nativeResponseValue;
2456         }
2457         // LDKCResult_PaymentIdPaymentSendFailureZ Payer_send_payment LDKPayer *NONNULL_PTR this_arg, const struct LDKRoute *NONNULL_PTR route, struct LDKThirtyTwoBytes payment_hash, struct LDKThirtyTwoBytes payment_secret
2458         export function Payer_send_payment(this_arg: number, route: number, payment_hash: Uint8Array, payment_secret: Uint8Array): number {
2459                 if(!isWasmInitialized) {
2460                         throw new Error("initializeWasm() must be awaited first!");
2461                 }
2462                 const nativeResponseValue = wasm.Payer_send_payment(this_arg, route, encodeArray(payment_hash), encodeArray(payment_secret));
2463                 return nativeResponseValue;
2464         }
2465         // LDKCResult_PaymentIdPaymentSendFailureZ Payer_send_spontaneous_payment LDKPayer *NONNULL_PTR this_arg, const struct LDKRoute *NONNULL_PTR route, struct LDKThirtyTwoBytes payment_preimage
2466         export function Payer_send_spontaneous_payment(this_arg: number, route: number, payment_preimage: Uint8Array): number {
2467                 if(!isWasmInitialized) {
2468                         throw new Error("initializeWasm() must be awaited first!");
2469                 }
2470                 const nativeResponseValue = wasm.Payer_send_spontaneous_payment(this_arg, route, encodeArray(payment_preimage));
2471                 return nativeResponseValue;
2472         }
2473         // LDKCResult_NonePaymentSendFailureZ Payer_retry_payment LDKPayer *NONNULL_PTR this_arg, const struct LDKRoute *NONNULL_PTR route, struct LDKThirtyTwoBytes payment_id
2474         export function Payer_retry_payment(this_arg: number, route: number, payment_id: Uint8Array): number {
2475                 if(!isWasmInitialized) {
2476                         throw new Error("initializeWasm() must be awaited first!");
2477                 }
2478                 const nativeResponseValue = wasm.Payer_retry_payment(this_arg, route, encodeArray(payment_id));
2479                 return nativeResponseValue;
2480         }
2481         // void Payer_abandon_payment LDKPayer *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_id
2482         export function Payer_abandon_payment(this_arg: number, payment_id: Uint8Array): void {
2483                 if(!isWasmInitialized) {
2484                         throw new Error("initializeWasm() must be awaited first!");
2485                 }
2486                 const nativeResponseValue = wasm.Payer_abandon_payment(this_arg, encodeArray(payment_id));
2487                 // debug statements here
2488         }
2489
2490
2491
2492 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2493
2494                 export interface LDKRouter {
2495                         find_route (payer: Uint8Array, params: number, payment_hash: Uint8Array, first_hops: number[], scorer: number): number;
2496                 }
2497
2498                 export function LDKRouter_new(impl: LDKRouter): number {
2499             throw new Error('unimplemented'); // TODO: bind to WASM
2500         }
2501
2502 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2503
2504
2505         // LDKCResult_RouteLightningErrorZ Router_find_route LDKRouter *NONNULL_PTR this_arg, struct LDKPublicKey payer, const struct LDKRouteParameters *NONNULL_PTR params, const uint8_t (*payment_hash)[32], struct LDKCVec_ChannelDetailsZ *first_hops, const struct LDKScore *NONNULL_PTR scorer
2506         export function Router_find_route(this_arg: number, payer: Uint8Array, params: number, payment_hash: Uint8Array, first_hops: number[], scorer: number): number {
2507                 if(!isWasmInitialized) {
2508                         throw new Error("initializeWasm() must be awaited first!");
2509                 }
2510                 const nativeResponseValue = wasm.Router_find_route(this_arg, encodeArray(payer), params, encodeArray(payment_hash), first_hops, scorer);
2511                 return nativeResponseValue;
2512         }
2513         // struct LDKStr _ldk_get_compiled_version(void);
2514         export function _ldk_get_compiled_version(): String {
2515                 if(!isWasmInitialized) {
2516                         throw new Error("initializeWasm() must be awaited first!");
2517                 }
2518                 const nativeResponseValue = wasm._ldk_get_compiled_version();
2519                 return nativeResponseValue;
2520         }
2521         // struct LDKStr _ldk_c_bindings_get_compiled_version(void);
2522         export function _ldk_c_bindings_get_compiled_version(): String {
2523                 if(!isWasmInitialized) {
2524                         throw new Error("initializeWasm() must be awaited first!");
2525                 }
2526                 const nativeResponseValue = wasm._ldk_c_bindings_get_compiled_version();
2527                 return nativeResponseValue;
2528         }
2529         // void Transaction_free(struct LDKTransaction _res);
2530         export function Transaction_free(_res: Uint8Array): void {
2531                 if(!isWasmInitialized) {
2532                         throw new Error("initializeWasm() must be awaited first!");
2533                 }
2534                 const nativeResponseValue = wasm.Transaction_free(encodeArray(_res));
2535                 // debug statements here
2536         }
2537         // struct LDKTxOut TxOut_new(struct LDKCVec_u8Z script_pubkey, uint64_t value);
2538         export function TxOut_new(script_pubkey: Uint8Array, value: number): number {
2539                 if(!isWasmInitialized) {
2540                         throw new Error("initializeWasm() must be awaited first!");
2541                 }
2542                 const nativeResponseValue = wasm.TxOut_new(encodeArray(script_pubkey), value);
2543                 return nativeResponseValue;
2544         }
2545         // void TxOut_free(struct LDKTxOut _res);
2546         export function TxOut_free(_res: number): void {
2547                 if(!isWasmInitialized) {
2548                         throw new Error("initializeWasm() must be awaited first!");
2549                 }
2550                 const nativeResponseValue = wasm.TxOut_free(_res);
2551                 // debug statements here
2552         }
2553         // uint64_t TxOut_clone_ptr(LDKTxOut *NONNULL_PTR arg);
2554         export function TxOut_clone_ptr(arg: number): number {
2555                 if(!isWasmInitialized) {
2556                         throw new Error("initializeWasm() must be awaited first!");
2557                 }
2558                 const nativeResponseValue = wasm.TxOut_clone_ptr(arg);
2559                 return nativeResponseValue;
2560         }
2561         // struct LDKTxOut TxOut_clone(const struct LDKTxOut *NONNULL_PTR orig);
2562         export function TxOut_clone(orig: number): number {
2563                 if(!isWasmInitialized) {
2564                         throw new Error("initializeWasm() must be awaited first!");
2565                 }
2566                 const nativeResponseValue = wasm.TxOut_clone(orig);
2567                 return nativeResponseValue;
2568         }
2569         // void Str_free(struct LDKStr _res);
2570         export function Str_free(_res: String): void {
2571                 if(!isWasmInitialized) {
2572                         throw new Error("initializeWasm() must be awaited first!");
2573                 }
2574                 const nativeResponseValue = wasm.Str_free(_res);
2575                 // debug statements here
2576         }
2577         // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_ok(struct LDKSecretKey o);
2578         export function CResult_SecretKeyErrorZ_ok(o: Uint8Array): number {
2579                 if(!isWasmInitialized) {
2580                         throw new Error("initializeWasm() must be awaited first!");
2581                 }
2582                 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_ok(encodeArray(o));
2583                 return nativeResponseValue;
2584         }
2585         // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_err(enum LDKSecp256k1Error e);
2586         export function CResult_SecretKeyErrorZ_err(e: Secp256k1Error): number {
2587                 if(!isWasmInitialized) {
2588                         throw new Error("initializeWasm() must be awaited first!");
2589                 }
2590                 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_err(e);
2591                 return nativeResponseValue;
2592         }
2593         // bool CResult_SecretKeyErrorZ_is_ok(const struct LDKCResult_SecretKeyErrorZ *NONNULL_PTR o);
2594         export function CResult_SecretKeyErrorZ_is_ok(o: number): boolean {
2595                 if(!isWasmInitialized) {
2596                         throw new Error("initializeWasm() must be awaited first!");
2597                 }
2598                 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_is_ok(o);
2599                 return nativeResponseValue;
2600         }
2601         // void CResult_SecretKeyErrorZ_free(struct LDKCResult_SecretKeyErrorZ _res);
2602         export function CResult_SecretKeyErrorZ_free(_res: number): void {
2603                 if(!isWasmInitialized) {
2604                         throw new Error("initializeWasm() must be awaited first!");
2605                 }
2606                 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_free(_res);
2607                 // debug statements here
2608         }
2609         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_ok(struct LDKPublicKey o);
2610         export function CResult_PublicKeyErrorZ_ok(o: Uint8Array): number {
2611                 if(!isWasmInitialized) {
2612                         throw new Error("initializeWasm() must be awaited first!");
2613                 }
2614                 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_ok(encodeArray(o));
2615                 return nativeResponseValue;
2616         }
2617         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_err(enum LDKSecp256k1Error e);
2618         export function CResult_PublicKeyErrorZ_err(e: Secp256k1Error): number {
2619                 if(!isWasmInitialized) {
2620                         throw new Error("initializeWasm() must be awaited first!");
2621                 }
2622                 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_err(e);
2623                 return nativeResponseValue;
2624         }
2625         // bool CResult_PublicKeyErrorZ_is_ok(const struct LDKCResult_PublicKeyErrorZ *NONNULL_PTR o);
2626         export function CResult_PublicKeyErrorZ_is_ok(o: number): boolean {
2627                 if(!isWasmInitialized) {
2628                         throw new Error("initializeWasm() must be awaited first!");
2629                 }
2630                 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_is_ok(o);
2631                 return nativeResponseValue;
2632         }
2633         // void CResult_PublicKeyErrorZ_free(struct LDKCResult_PublicKeyErrorZ _res);
2634         export function CResult_PublicKeyErrorZ_free(_res: number): void {
2635                 if(!isWasmInitialized) {
2636                         throw new Error("initializeWasm() must be awaited first!");
2637                 }
2638                 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_free(_res);
2639                 // debug statements here
2640         }
2641         // uint64_t CResult_PublicKeyErrorZ_clone_ptr(LDKCResult_PublicKeyErrorZ *NONNULL_PTR arg);
2642         export function CResult_PublicKeyErrorZ_clone_ptr(arg: number): number {
2643                 if(!isWasmInitialized) {
2644                         throw new Error("initializeWasm() must be awaited first!");
2645                 }
2646                 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_clone_ptr(arg);
2647                 return nativeResponseValue;
2648         }
2649         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_clone(const struct LDKCResult_PublicKeyErrorZ *NONNULL_PTR orig);
2650         export function CResult_PublicKeyErrorZ_clone(orig: number): number {
2651                 if(!isWasmInitialized) {
2652                         throw new Error("initializeWasm() must be awaited first!");
2653                 }
2654                 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_clone(orig);
2655                 return nativeResponseValue;
2656         }
2657         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_ok(struct LDKTxCreationKeys o);
2658         export function CResult_TxCreationKeysDecodeErrorZ_ok(o: number): number {
2659                 if(!isWasmInitialized) {
2660                         throw new Error("initializeWasm() must be awaited first!");
2661                 }
2662                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_ok(o);
2663                 return nativeResponseValue;
2664         }
2665         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_err(struct LDKDecodeError e);
2666         export function CResult_TxCreationKeysDecodeErrorZ_err(e: number): number {
2667                 if(!isWasmInitialized) {
2668                         throw new Error("initializeWasm() must be awaited first!");
2669                 }
2670                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_err(e);
2671                 return nativeResponseValue;
2672         }
2673         // bool CResult_TxCreationKeysDecodeErrorZ_is_ok(const struct LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR o);
2674         export function CResult_TxCreationKeysDecodeErrorZ_is_ok(o: number): boolean {
2675                 if(!isWasmInitialized) {
2676                         throw new Error("initializeWasm() must be awaited first!");
2677                 }
2678                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_is_ok(o);
2679                 return nativeResponseValue;
2680         }
2681         // void CResult_TxCreationKeysDecodeErrorZ_free(struct LDKCResult_TxCreationKeysDecodeErrorZ _res);
2682         export function CResult_TxCreationKeysDecodeErrorZ_free(_res: number): void {
2683                 if(!isWasmInitialized) {
2684                         throw new Error("initializeWasm() must be awaited first!");
2685                 }
2686                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_free(_res);
2687                 // debug statements here
2688         }
2689         // uint64_t CResult_TxCreationKeysDecodeErrorZ_clone_ptr(LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR arg);
2690         export function CResult_TxCreationKeysDecodeErrorZ_clone_ptr(arg: number): number {
2691                 if(!isWasmInitialized) {
2692                         throw new Error("initializeWasm() must be awaited first!");
2693                 }
2694                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_clone_ptr(arg);
2695                 return nativeResponseValue;
2696         }
2697         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_clone(const struct LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR orig);
2698         export function CResult_TxCreationKeysDecodeErrorZ_clone(orig: number): number {
2699                 if(!isWasmInitialized) {
2700                         throw new Error("initializeWasm() must be awaited first!");
2701                 }
2702                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_clone(orig);
2703                 return nativeResponseValue;
2704         }
2705         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_ok(struct LDKChannelPublicKeys o);
2706         export function CResult_ChannelPublicKeysDecodeErrorZ_ok(o: number): number {
2707                 if(!isWasmInitialized) {
2708                         throw new Error("initializeWasm() must be awaited first!");
2709                 }
2710                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_ok(o);
2711                 return nativeResponseValue;
2712         }
2713         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_err(struct LDKDecodeError e);
2714         export function CResult_ChannelPublicKeysDecodeErrorZ_err(e: number): number {
2715                 if(!isWasmInitialized) {
2716                         throw new Error("initializeWasm() must be awaited first!");
2717                 }
2718                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_err(e);
2719                 return nativeResponseValue;
2720         }
2721         // bool CResult_ChannelPublicKeysDecodeErrorZ_is_ok(const struct LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR o);
2722         export function CResult_ChannelPublicKeysDecodeErrorZ_is_ok(o: number): boolean {
2723                 if(!isWasmInitialized) {
2724                         throw new Error("initializeWasm() must be awaited first!");
2725                 }
2726                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_is_ok(o);
2727                 return nativeResponseValue;
2728         }
2729         // void CResult_ChannelPublicKeysDecodeErrorZ_free(struct LDKCResult_ChannelPublicKeysDecodeErrorZ _res);
2730         export function CResult_ChannelPublicKeysDecodeErrorZ_free(_res: number): void {
2731                 if(!isWasmInitialized) {
2732                         throw new Error("initializeWasm() must be awaited first!");
2733                 }
2734                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_free(_res);
2735                 // debug statements here
2736         }
2737         // uint64_t CResult_ChannelPublicKeysDecodeErrorZ_clone_ptr(LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR arg);
2738         export function CResult_ChannelPublicKeysDecodeErrorZ_clone_ptr(arg: number): number {
2739                 if(!isWasmInitialized) {
2740                         throw new Error("initializeWasm() must be awaited first!");
2741                 }
2742                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_clone_ptr(arg);
2743                 return nativeResponseValue;
2744         }
2745         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_clone(const struct LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR orig);
2746         export function CResult_ChannelPublicKeysDecodeErrorZ_clone(orig: number): number {
2747                 if(!isWasmInitialized) {
2748                         throw new Error("initializeWasm() must be awaited first!");
2749                 }
2750                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_clone(orig);
2751                 return nativeResponseValue;
2752         }
2753         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_ok(struct LDKTxCreationKeys o);
2754         export function CResult_TxCreationKeysErrorZ_ok(o: number): number {
2755                 if(!isWasmInitialized) {
2756                         throw new Error("initializeWasm() must be awaited first!");
2757                 }
2758                 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_ok(o);
2759                 return nativeResponseValue;
2760         }
2761         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_err(enum LDKSecp256k1Error e);
2762         export function CResult_TxCreationKeysErrorZ_err(e: Secp256k1Error): number {
2763                 if(!isWasmInitialized) {
2764                         throw new Error("initializeWasm() must be awaited first!");
2765                 }
2766                 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_err(e);
2767                 return nativeResponseValue;
2768         }
2769         // bool CResult_TxCreationKeysErrorZ_is_ok(const struct LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR o);
2770         export function CResult_TxCreationKeysErrorZ_is_ok(o: number): boolean {
2771                 if(!isWasmInitialized) {
2772                         throw new Error("initializeWasm() must be awaited first!");
2773                 }
2774                 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_is_ok(o);
2775                 return nativeResponseValue;
2776         }
2777         // void CResult_TxCreationKeysErrorZ_free(struct LDKCResult_TxCreationKeysErrorZ _res);
2778         export function CResult_TxCreationKeysErrorZ_free(_res: number): void {
2779                 if(!isWasmInitialized) {
2780                         throw new Error("initializeWasm() must be awaited first!");
2781                 }
2782                 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_free(_res);
2783                 // debug statements here
2784         }
2785         // uint64_t CResult_TxCreationKeysErrorZ_clone_ptr(LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR arg);
2786         export function CResult_TxCreationKeysErrorZ_clone_ptr(arg: number): number {
2787                 if(!isWasmInitialized) {
2788                         throw new Error("initializeWasm() must be awaited first!");
2789                 }
2790                 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_clone_ptr(arg);
2791                 return nativeResponseValue;
2792         }
2793         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_clone(const struct LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR orig);
2794         export function CResult_TxCreationKeysErrorZ_clone(orig: number): number {
2795                 if(!isWasmInitialized) {
2796                         throw new Error("initializeWasm() must be awaited first!");
2797                 }
2798                 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_clone(orig);
2799                 return nativeResponseValue;
2800         }
2801         // struct LDKCOption_u32Z COption_u32Z_some(uint32_t o);
2802         export function COption_u32Z_some(o: number): number {
2803                 if(!isWasmInitialized) {
2804                         throw new Error("initializeWasm() must be awaited first!");
2805                 }
2806                 const nativeResponseValue = wasm.COption_u32Z_some(o);
2807                 return nativeResponseValue;
2808         }
2809         // struct LDKCOption_u32Z COption_u32Z_none(void);
2810         export function COption_u32Z_none(): number {
2811                 if(!isWasmInitialized) {
2812                         throw new Error("initializeWasm() must be awaited first!");
2813                 }
2814                 const nativeResponseValue = wasm.COption_u32Z_none();
2815                 return nativeResponseValue;
2816         }
2817         // void COption_u32Z_free(struct LDKCOption_u32Z _res);
2818         export function COption_u32Z_free(_res: number): void {
2819                 if(!isWasmInitialized) {
2820                         throw new Error("initializeWasm() must be awaited first!");
2821                 }
2822                 const nativeResponseValue = wasm.COption_u32Z_free(_res);
2823                 // debug statements here
2824         }
2825         // uint64_t COption_u32Z_clone_ptr(LDKCOption_u32Z *NONNULL_PTR arg);
2826         export function COption_u32Z_clone_ptr(arg: number): number {
2827                 if(!isWasmInitialized) {
2828                         throw new Error("initializeWasm() must be awaited first!");
2829                 }
2830                 const nativeResponseValue = wasm.COption_u32Z_clone_ptr(arg);
2831                 return nativeResponseValue;
2832         }
2833         // struct LDKCOption_u32Z COption_u32Z_clone(const struct LDKCOption_u32Z *NONNULL_PTR orig);
2834         export function COption_u32Z_clone(orig: number): number {
2835                 if(!isWasmInitialized) {
2836                         throw new Error("initializeWasm() must be awaited first!");
2837                 }
2838                 const nativeResponseValue = wasm.COption_u32Z_clone(orig);
2839                 return nativeResponseValue;
2840         }
2841         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(struct LDKHTLCOutputInCommitment o);
2842         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o: number): number {
2843                 if(!isWasmInitialized) {
2844                         throw new Error("initializeWasm() must be awaited first!");
2845                 }
2846                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o);
2847                 return nativeResponseValue;
2848         }
2849         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_err(struct LDKDecodeError e);
2850         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e: number): number {
2851                 if(!isWasmInitialized) {
2852                         throw new Error("initializeWasm() must be awaited first!");
2853                 }
2854                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e);
2855                 return nativeResponseValue;
2856         }
2857         // bool CResult_HTLCOutputInCommitmentDecodeErrorZ_is_ok(const struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR o);
2858         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_is_ok(o: number): boolean {
2859                 if(!isWasmInitialized) {
2860                         throw new Error("initializeWasm() must be awaited first!");
2861                 }
2862                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_is_ok(o);
2863                 return nativeResponseValue;
2864         }
2865         // void CResult_HTLCOutputInCommitmentDecodeErrorZ_free(struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ _res);
2866         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res: number): void {
2867                 if(!isWasmInitialized) {
2868                         throw new Error("initializeWasm() must be awaited first!");
2869                 }
2870                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res);
2871                 // debug statements here
2872         }
2873         // uint64_t CResult_HTLCOutputInCommitmentDecodeErrorZ_clone_ptr(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR arg);
2874         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_clone_ptr(arg: number): number {
2875                 if(!isWasmInitialized) {
2876                         throw new Error("initializeWasm() must be awaited first!");
2877                 }
2878                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_clone_ptr(arg);
2879                 return nativeResponseValue;
2880         }
2881         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(const struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR orig);
2882         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig: number): number {
2883                 if(!isWasmInitialized) {
2884                         throw new Error("initializeWasm() must be awaited first!");
2885                 }
2886                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig);
2887                 return nativeResponseValue;
2888         }
2889         // enum LDKCOption_NoneZ COption_NoneZ_some(void);
2890         export function COption_NoneZ_some(): COption_NoneZ {
2891                 if(!isWasmInitialized) {
2892                         throw new Error("initializeWasm() must be awaited first!");
2893                 }
2894                 const nativeResponseValue = wasm.COption_NoneZ_some();
2895                 return nativeResponseValue;
2896         }
2897         // enum LDKCOption_NoneZ COption_NoneZ_none(void);
2898         export function COption_NoneZ_none(): COption_NoneZ {
2899                 if(!isWasmInitialized) {
2900                         throw new Error("initializeWasm() must be awaited first!");
2901                 }
2902                 const nativeResponseValue = wasm.COption_NoneZ_none();
2903                 return nativeResponseValue;
2904         }
2905         // void COption_NoneZ_free(enum LDKCOption_NoneZ _res);
2906         export function COption_NoneZ_free(_res: COption_NoneZ): void {
2907                 if(!isWasmInitialized) {
2908                         throw new Error("initializeWasm() must be awaited first!");
2909                 }
2910                 const nativeResponseValue = wasm.COption_NoneZ_free(_res);
2911                 // debug statements here
2912         }
2913         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(struct LDKCounterpartyChannelTransactionParameters o);
2914         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
2915                 if(!isWasmInitialized) {
2916                         throw new Error("initializeWasm() must be awaited first!");
2917                 }
2918                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o);
2919                 return nativeResponseValue;
2920         }
2921         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
2922         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e: number): number {
2923                 if(!isWasmInitialized) {
2924                         throw new Error("initializeWasm() must be awaited first!");
2925                 }
2926                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e);
2927                 return nativeResponseValue;
2928         }
2929         // bool CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_is_ok(const struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR o);
2930         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_is_ok(o: number): boolean {
2931                 if(!isWasmInitialized) {
2932                         throw new Error("initializeWasm() must be awaited first!");
2933                 }
2934                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_is_ok(o);
2935                 return nativeResponseValue;
2936         }
2937         // void CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ _res);
2938         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
2939                 if(!isWasmInitialized) {
2940                         throw new Error("initializeWasm() must be awaited first!");
2941                 }
2942                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res);
2943                 // debug statements here
2944         }
2945         // uint64_t CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone_ptr(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR arg);
2946         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone_ptr(arg: number): number {
2947                 if(!isWasmInitialized) {
2948                         throw new Error("initializeWasm() must be awaited first!");
2949                 }
2950                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone_ptr(arg);
2951                 return nativeResponseValue;
2952         }
2953         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
2954         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
2955                 if(!isWasmInitialized) {
2956                         throw new Error("initializeWasm() must be awaited first!");
2957                 }
2958                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig);
2959                 return nativeResponseValue;
2960         }
2961         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_ok(struct LDKChannelTransactionParameters o);
2962         export function CResult_ChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
2963                 if(!isWasmInitialized) {
2964                         throw new Error("initializeWasm() must be awaited first!");
2965                 }
2966                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_ok(o);
2967                 return nativeResponseValue;
2968         }
2969         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
2970         export function CResult_ChannelTransactionParametersDecodeErrorZ_err(e: number): number {
2971                 if(!isWasmInitialized) {
2972                         throw new Error("initializeWasm() must be awaited first!");
2973                 }
2974                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_err(e);
2975                 return nativeResponseValue;
2976         }
2977         // bool CResult_ChannelTransactionParametersDecodeErrorZ_is_ok(const struct LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR o);
2978         export function CResult_ChannelTransactionParametersDecodeErrorZ_is_ok(o: number): boolean {
2979                 if(!isWasmInitialized) {
2980                         throw new Error("initializeWasm() must be awaited first!");
2981                 }
2982                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_is_ok(o);
2983                 return nativeResponseValue;
2984         }
2985         // void CResult_ChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_ChannelTransactionParametersDecodeErrorZ _res);
2986         export function CResult_ChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
2987                 if(!isWasmInitialized) {
2988                         throw new Error("initializeWasm() must be awaited first!");
2989                 }
2990                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_free(_res);
2991                 // debug statements here
2992         }
2993         // uint64_t CResult_ChannelTransactionParametersDecodeErrorZ_clone_ptr(LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR arg);
2994         export function CResult_ChannelTransactionParametersDecodeErrorZ_clone_ptr(arg: number): number {
2995                 if(!isWasmInitialized) {
2996                         throw new Error("initializeWasm() must be awaited first!");
2997                 }
2998                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_clone_ptr(arg);
2999                 return nativeResponseValue;
3000         }
3001         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
3002         export function CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
3003                 if(!isWasmInitialized) {
3004                         throw new Error("initializeWasm() must be awaited first!");
3005                 }
3006                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig);
3007                 return nativeResponseValue;
3008         }
3009         // void CVec_SignatureZ_free(struct LDKCVec_SignatureZ _res);
3010         export function CVec_SignatureZ_free(_res: Uint8Array[]): void {
3011                 if(!isWasmInitialized) {
3012                         throw new Error("initializeWasm() must be awaited first!");
3013                 }
3014                 const nativeResponseValue = wasm.CVec_SignatureZ_free(_res);
3015                 // debug statements here
3016         }
3017         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_ok(struct LDKHolderCommitmentTransaction o);
3018         export function CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o: number): number {
3019                 if(!isWasmInitialized) {
3020                         throw new Error("initializeWasm() must be awaited first!");
3021                 }
3022                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o);
3023                 return nativeResponseValue;
3024         }
3025         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
3026         export function CResult_HolderCommitmentTransactionDecodeErrorZ_err(e: number): number {
3027                 if(!isWasmInitialized) {
3028                         throw new Error("initializeWasm() must be awaited first!");
3029                 }
3030                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_err(e);
3031                 return nativeResponseValue;
3032         }
3033         // bool CResult_HolderCommitmentTransactionDecodeErrorZ_is_ok(const struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR o);
3034         export function CResult_HolderCommitmentTransactionDecodeErrorZ_is_ok(o: number): boolean {
3035                 if(!isWasmInitialized) {
3036                         throw new Error("initializeWasm() must be awaited first!");
3037                 }
3038                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_is_ok(o);
3039                 return nativeResponseValue;
3040         }
3041         // void CResult_HolderCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ _res);
3042         export function CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res: number): void {
3043                 if(!isWasmInitialized) {
3044                         throw new Error("initializeWasm() must be awaited first!");
3045                 }
3046                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res);
3047                 // debug statements here
3048         }
3049         // uint64_t CResult_HolderCommitmentTransactionDecodeErrorZ_clone_ptr(LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR arg);
3050         export function CResult_HolderCommitmentTransactionDecodeErrorZ_clone_ptr(arg: number): number {
3051                 if(!isWasmInitialized) {
3052                         throw new Error("initializeWasm() must be awaited first!");
3053                 }
3054                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_clone_ptr(arg);
3055                 return nativeResponseValue;
3056         }
3057         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
3058         export function CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
3059                 if(!isWasmInitialized) {
3060                         throw new Error("initializeWasm() must be awaited first!");
3061                 }
3062                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig);
3063                 return nativeResponseValue;
3064         }
3065         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(struct LDKBuiltCommitmentTransaction o);
3066         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o: number): number {
3067                 if(!isWasmInitialized) {
3068                         throw new Error("initializeWasm() must be awaited first!");
3069                 }
3070                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o);
3071                 return nativeResponseValue;
3072         }
3073         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
3074         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e: number): number {
3075                 if(!isWasmInitialized) {
3076                         throw new Error("initializeWasm() must be awaited first!");
3077                 }
3078                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e);
3079                 return nativeResponseValue;
3080         }
3081         // bool CResult_BuiltCommitmentTransactionDecodeErrorZ_is_ok(const struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR o);
3082         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_is_ok(o: number): boolean {
3083                 if(!isWasmInitialized) {
3084                         throw new Error("initializeWasm() must be awaited first!");
3085                 }
3086                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_is_ok(o);
3087                 return nativeResponseValue;
3088         }
3089         // void CResult_BuiltCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ _res);
3090         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res: number): void {
3091                 if(!isWasmInitialized) {
3092                         throw new Error("initializeWasm() must be awaited first!");
3093                 }
3094                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res);
3095                 // debug statements here
3096         }
3097         // uint64_t CResult_BuiltCommitmentTransactionDecodeErrorZ_clone_ptr(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR arg);
3098         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_clone_ptr(arg: number): number {
3099                 if(!isWasmInitialized) {
3100                         throw new Error("initializeWasm() must be awaited first!");
3101                 }
3102                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_clone_ptr(arg);
3103                 return nativeResponseValue;
3104         }
3105         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
3106         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
3107                 if(!isWasmInitialized) {
3108                         throw new Error("initializeWasm() must be awaited first!");
3109                 }
3110                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig);
3111                 return nativeResponseValue;
3112         }
3113         // struct LDKCResult_TrustedClosingTransactionNoneZ CResult_TrustedClosingTransactionNoneZ_ok(struct LDKTrustedClosingTransaction o);
3114         export function CResult_TrustedClosingTransactionNoneZ_ok(o: number): number {
3115                 if(!isWasmInitialized) {
3116                         throw new Error("initializeWasm() must be awaited first!");
3117                 }
3118                 const nativeResponseValue = wasm.CResult_TrustedClosingTransactionNoneZ_ok(o);
3119                 return nativeResponseValue;
3120         }
3121         // struct LDKCResult_TrustedClosingTransactionNoneZ CResult_TrustedClosingTransactionNoneZ_err(void);
3122         export function CResult_TrustedClosingTransactionNoneZ_err(): number {
3123                 if(!isWasmInitialized) {
3124                         throw new Error("initializeWasm() must be awaited first!");
3125                 }
3126                 const nativeResponseValue = wasm.CResult_TrustedClosingTransactionNoneZ_err();
3127                 return nativeResponseValue;
3128         }
3129         // bool CResult_TrustedClosingTransactionNoneZ_is_ok(const struct LDKCResult_TrustedClosingTransactionNoneZ *NONNULL_PTR o);
3130         export function CResult_TrustedClosingTransactionNoneZ_is_ok(o: number): boolean {
3131                 if(!isWasmInitialized) {
3132                         throw new Error("initializeWasm() must be awaited first!");
3133                 }
3134                 const nativeResponseValue = wasm.CResult_TrustedClosingTransactionNoneZ_is_ok(o);
3135                 return nativeResponseValue;
3136         }
3137         // void CResult_TrustedClosingTransactionNoneZ_free(struct LDKCResult_TrustedClosingTransactionNoneZ _res);
3138         export function CResult_TrustedClosingTransactionNoneZ_free(_res: number): void {
3139                 if(!isWasmInitialized) {
3140                         throw new Error("initializeWasm() must be awaited first!");
3141                 }
3142                 const nativeResponseValue = wasm.CResult_TrustedClosingTransactionNoneZ_free(_res);
3143                 // debug statements here
3144         }
3145         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_ok(struct LDKCommitmentTransaction o);
3146         export function CResult_CommitmentTransactionDecodeErrorZ_ok(o: number): number {
3147                 if(!isWasmInitialized) {
3148                         throw new Error("initializeWasm() must be awaited first!");
3149                 }
3150                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_ok(o);
3151                 return nativeResponseValue;
3152         }
3153         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
3154         export function CResult_CommitmentTransactionDecodeErrorZ_err(e: number): number {
3155                 if(!isWasmInitialized) {
3156                         throw new Error("initializeWasm() must be awaited first!");
3157                 }
3158                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_err(e);
3159                 return nativeResponseValue;
3160         }
3161         // bool CResult_CommitmentTransactionDecodeErrorZ_is_ok(const struct LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR o);
3162         export function CResult_CommitmentTransactionDecodeErrorZ_is_ok(o: number): boolean {
3163                 if(!isWasmInitialized) {
3164                         throw new Error("initializeWasm() must be awaited first!");
3165                 }
3166                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_is_ok(o);
3167                 return nativeResponseValue;
3168         }
3169         // void CResult_CommitmentTransactionDecodeErrorZ_free(struct LDKCResult_CommitmentTransactionDecodeErrorZ _res);
3170         export function CResult_CommitmentTransactionDecodeErrorZ_free(_res: number): void {
3171                 if(!isWasmInitialized) {
3172                         throw new Error("initializeWasm() must be awaited first!");
3173                 }
3174                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_free(_res);
3175                 // debug statements here
3176         }
3177         // uint64_t CResult_CommitmentTransactionDecodeErrorZ_clone_ptr(LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR arg);
3178         export function CResult_CommitmentTransactionDecodeErrorZ_clone_ptr(arg: number): number {
3179                 if(!isWasmInitialized) {
3180                         throw new Error("initializeWasm() must be awaited first!");
3181                 }
3182                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_clone_ptr(arg);
3183                 return nativeResponseValue;
3184         }
3185         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
3186         export function CResult_CommitmentTransactionDecodeErrorZ_clone(orig: number): number {
3187                 if(!isWasmInitialized) {
3188                         throw new Error("initializeWasm() must be awaited first!");
3189                 }
3190                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_clone(orig);
3191                 return nativeResponseValue;
3192         }
3193         // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_ok(struct LDKTrustedCommitmentTransaction o);
3194         export function CResult_TrustedCommitmentTransactionNoneZ_ok(o: number): number {
3195                 if(!isWasmInitialized) {
3196                         throw new Error("initializeWasm() must be awaited first!");
3197                 }
3198                 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_ok(o);
3199                 return nativeResponseValue;
3200         }
3201         // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_err(void);
3202         export function CResult_TrustedCommitmentTransactionNoneZ_err(): number {
3203                 if(!isWasmInitialized) {
3204                         throw new Error("initializeWasm() must be awaited first!");
3205                 }
3206                 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_err();
3207                 return nativeResponseValue;
3208         }
3209         // bool CResult_TrustedCommitmentTransactionNoneZ_is_ok(const struct LDKCResult_TrustedCommitmentTransactionNoneZ *NONNULL_PTR o);
3210         export function CResult_TrustedCommitmentTransactionNoneZ_is_ok(o: number): boolean {
3211                 if(!isWasmInitialized) {
3212                         throw new Error("initializeWasm() must be awaited first!");
3213                 }
3214                 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_is_ok(o);
3215                 return nativeResponseValue;
3216         }
3217         // void CResult_TrustedCommitmentTransactionNoneZ_free(struct LDKCResult_TrustedCommitmentTransactionNoneZ _res);
3218         export function CResult_TrustedCommitmentTransactionNoneZ_free(_res: number): void {
3219                 if(!isWasmInitialized) {
3220                         throw new Error("initializeWasm() must be awaited first!");
3221                 }
3222                 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_free(_res);
3223                 // debug statements here
3224         }
3225         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_ok(struct LDKCVec_SignatureZ o);
3226         export function CResult_CVec_SignatureZNoneZ_ok(o: Uint8Array[]): number {
3227                 if(!isWasmInitialized) {
3228                         throw new Error("initializeWasm() must be awaited first!");
3229                 }
3230                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_ok(o);
3231                 return nativeResponseValue;
3232         }
3233         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_err(void);
3234         export function CResult_CVec_SignatureZNoneZ_err(): number {
3235                 if(!isWasmInitialized) {
3236                         throw new Error("initializeWasm() must be awaited first!");
3237                 }
3238                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_err();
3239                 return nativeResponseValue;
3240         }
3241         // bool CResult_CVec_SignatureZNoneZ_is_ok(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR o);
3242         export function CResult_CVec_SignatureZNoneZ_is_ok(o: number): boolean {
3243                 if(!isWasmInitialized) {
3244                         throw new Error("initializeWasm() must be awaited first!");
3245                 }
3246                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_is_ok(o);
3247                 return nativeResponseValue;
3248         }
3249         // void CResult_CVec_SignatureZNoneZ_free(struct LDKCResult_CVec_SignatureZNoneZ _res);
3250         export function CResult_CVec_SignatureZNoneZ_free(_res: number): void {
3251                 if(!isWasmInitialized) {
3252                         throw new Error("initializeWasm() must be awaited first!");
3253                 }
3254                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_free(_res);
3255                 // debug statements here
3256         }
3257         // uint64_t CResult_CVec_SignatureZNoneZ_clone_ptr(LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR arg);
3258         export function CResult_CVec_SignatureZNoneZ_clone_ptr(arg: number): number {
3259                 if(!isWasmInitialized) {
3260                         throw new Error("initializeWasm() must be awaited first!");
3261                 }
3262                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_clone_ptr(arg);
3263                 return nativeResponseValue;
3264         }
3265         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_clone(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR orig);
3266         export function CResult_CVec_SignatureZNoneZ_clone(orig: number): number {
3267                 if(!isWasmInitialized) {
3268                         throw new Error("initializeWasm() must be awaited first!");
3269                 }
3270                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_clone(orig);
3271                 return nativeResponseValue;
3272         }
3273         // struct LDKCResult_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_ok(struct LDKShutdownScript o);
3274         export function CResult_ShutdownScriptDecodeErrorZ_ok(o: number): number {
3275                 if(!isWasmInitialized) {
3276                         throw new Error("initializeWasm() must be awaited first!");
3277                 }
3278                 const nativeResponseValue = wasm.CResult_ShutdownScriptDecodeErrorZ_ok(o);
3279                 return nativeResponseValue;
3280         }
3281         // struct LDKCResult_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_err(struct LDKDecodeError e);
3282         export function CResult_ShutdownScriptDecodeErrorZ_err(e: number): number {
3283                 if(!isWasmInitialized) {
3284                         throw new Error("initializeWasm() must be awaited first!");
3285                 }
3286                 const nativeResponseValue = wasm.CResult_ShutdownScriptDecodeErrorZ_err(e);
3287                 return nativeResponseValue;
3288         }
3289         // bool CResult_ShutdownScriptDecodeErrorZ_is_ok(const struct LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR o);
3290         export function CResult_ShutdownScriptDecodeErrorZ_is_ok(o: number): boolean {
3291                 if(!isWasmInitialized) {
3292                         throw new Error("initializeWasm() must be awaited first!");
3293                 }
3294                 const nativeResponseValue = wasm.CResult_ShutdownScriptDecodeErrorZ_is_ok(o);
3295                 return nativeResponseValue;
3296         }
3297         // void CResult_ShutdownScriptDecodeErrorZ_free(struct LDKCResult_ShutdownScriptDecodeErrorZ _res);
3298         export function CResult_ShutdownScriptDecodeErrorZ_free(_res: number): void {
3299                 if(!isWasmInitialized) {
3300                         throw new Error("initializeWasm() must be awaited first!");
3301                 }
3302                 const nativeResponseValue = wasm.CResult_ShutdownScriptDecodeErrorZ_free(_res);
3303                 // debug statements here
3304         }
3305         // uint64_t CResult_ShutdownScriptDecodeErrorZ_clone_ptr(LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR arg);
3306         export function CResult_ShutdownScriptDecodeErrorZ_clone_ptr(arg: number): number {
3307                 if(!isWasmInitialized) {
3308                         throw new Error("initializeWasm() must be awaited first!");
3309                 }
3310                 const nativeResponseValue = wasm.CResult_ShutdownScriptDecodeErrorZ_clone_ptr(arg);
3311                 return nativeResponseValue;
3312         }
3313         // struct LDKCResult_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_clone(const struct LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR orig);
3314         export function CResult_ShutdownScriptDecodeErrorZ_clone(orig: number): number {
3315                 if(!isWasmInitialized) {
3316                         throw new Error("initializeWasm() must be awaited first!");
3317                 }
3318                 const nativeResponseValue = wasm.CResult_ShutdownScriptDecodeErrorZ_clone(orig);
3319                 return nativeResponseValue;
3320         }
3321         // struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_ok(struct LDKShutdownScript o);
3322         export function CResult_ShutdownScriptInvalidShutdownScriptZ_ok(o: number): number {
3323                 if(!isWasmInitialized) {
3324                         throw new Error("initializeWasm() must be awaited first!");
3325                 }
3326                 const nativeResponseValue = wasm.CResult_ShutdownScriptInvalidShutdownScriptZ_ok(o);
3327                 return nativeResponseValue;
3328         }
3329         // struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_err(struct LDKInvalidShutdownScript e);
3330         export function CResult_ShutdownScriptInvalidShutdownScriptZ_err(e: number): number {
3331                 if(!isWasmInitialized) {
3332                         throw new Error("initializeWasm() must be awaited first!");
3333                 }
3334                 const nativeResponseValue = wasm.CResult_ShutdownScriptInvalidShutdownScriptZ_err(e);
3335                 return nativeResponseValue;
3336         }
3337         // bool CResult_ShutdownScriptInvalidShutdownScriptZ_is_ok(const struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ *NONNULL_PTR o);
3338         export function CResult_ShutdownScriptInvalidShutdownScriptZ_is_ok(o: number): boolean {
3339                 if(!isWasmInitialized) {
3340                         throw new Error("initializeWasm() must be awaited first!");
3341                 }
3342                 const nativeResponseValue = wasm.CResult_ShutdownScriptInvalidShutdownScriptZ_is_ok(o);
3343                 return nativeResponseValue;
3344         }
3345         // void CResult_ShutdownScriptInvalidShutdownScriptZ_free(struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ _res);
3346         export function CResult_ShutdownScriptInvalidShutdownScriptZ_free(_res: number): void {
3347                 if(!isWasmInitialized) {
3348                         throw new Error("initializeWasm() must be awaited first!");
3349                 }
3350                 const nativeResponseValue = wasm.CResult_ShutdownScriptInvalidShutdownScriptZ_free(_res);
3351                 // debug statements here
3352         }
3353         // uint64_t CResult_ShutdownScriptInvalidShutdownScriptZ_clone_ptr(LDKCResult_ShutdownScriptInvalidShutdownScriptZ *NONNULL_PTR arg);
3354         export function CResult_ShutdownScriptInvalidShutdownScriptZ_clone_ptr(arg: number): number {
3355                 if(!isWasmInitialized) {
3356                         throw new Error("initializeWasm() must be awaited first!");
3357                 }
3358                 const nativeResponseValue = wasm.CResult_ShutdownScriptInvalidShutdownScriptZ_clone_ptr(arg);
3359                 return nativeResponseValue;
3360         }
3361         // struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_clone(const struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ *NONNULL_PTR orig);
3362         export function CResult_ShutdownScriptInvalidShutdownScriptZ_clone(orig: number): number {
3363                 if(!isWasmInitialized) {
3364                         throw new Error("initializeWasm() must be awaited first!");
3365                 }
3366                 const nativeResponseValue = wasm.CResult_ShutdownScriptInvalidShutdownScriptZ_clone(orig);
3367                 return nativeResponseValue;
3368         }
3369         // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_ok(void);
3370         export function CResult_NoneErrorZ_ok(): number {
3371                 if(!isWasmInitialized) {
3372                         throw new Error("initializeWasm() must be awaited first!");
3373                 }
3374                 const nativeResponseValue = wasm.CResult_NoneErrorZ_ok();
3375                 return nativeResponseValue;
3376         }
3377         // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_err(enum LDKIOError e);
3378         export function CResult_NoneErrorZ_err(e: IOError): number {
3379                 if(!isWasmInitialized) {
3380                         throw new Error("initializeWasm() must be awaited first!");
3381                 }
3382                 const nativeResponseValue = wasm.CResult_NoneErrorZ_err(e);
3383                 return nativeResponseValue;
3384         }
3385         // bool CResult_NoneErrorZ_is_ok(const struct LDKCResult_NoneErrorZ *NONNULL_PTR o);
3386         export function CResult_NoneErrorZ_is_ok(o: number): boolean {
3387                 if(!isWasmInitialized) {
3388                         throw new Error("initializeWasm() must be awaited first!");
3389                 }
3390                 const nativeResponseValue = wasm.CResult_NoneErrorZ_is_ok(o);
3391                 return nativeResponseValue;
3392         }
3393         // void CResult_NoneErrorZ_free(struct LDKCResult_NoneErrorZ _res);
3394         export function CResult_NoneErrorZ_free(_res: number): void {
3395                 if(!isWasmInitialized) {
3396                         throw new Error("initializeWasm() must be awaited first!");
3397                 }
3398                 const nativeResponseValue = wasm.CResult_NoneErrorZ_free(_res);
3399                 // debug statements here
3400         }
3401         // uint64_t CResult_NoneErrorZ_clone_ptr(LDKCResult_NoneErrorZ *NONNULL_PTR arg);
3402         export function CResult_NoneErrorZ_clone_ptr(arg: number): number {
3403                 if(!isWasmInitialized) {
3404                         throw new Error("initializeWasm() must be awaited first!");
3405                 }
3406                 const nativeResponseValue = wasm.CResult_NoneErrorZ_clone_ptr(arg);
3407                 return nativeResponseValue;
3408         }
3409         // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_clone(const struct LDKCResult_NoneErrorZ *NONNULL_PTR orig);
3410         export function CResult_NoneErrorZ_clone(orig: number): number {
3411                 if(!isWasmInitialized) {
3412                         throw new Error("initializeWasm() must be awaited first!");
3413                 }
3414                 const nativeResponseValue = wasm.CResult_NoneErrorZ_clone(orig);
3415                 return nativeResponseValue;
3416         }
3417         // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_ok(struct LDKRouteHop o);
3418         export function CResult_RouteHopDecodeErrorZ_ok(o: number): number {
3419                 if(!isWasmInitialized) {
3420                         throw new Error("initializeWasm() must be awaited first!");
3421                 }
3422                 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_ok(o);
3423                 return nativeResponseValue;
3424         }
3425         // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_err(struct LDKDecodeError e);
3426         export function CResult_RouteHopDecodeErrorZ_err(e: number): number {
3427                 if(!isWasmInitialized) {
3428                         throw new Error("initializeWasm() must be awaited first!");
3429                 }
3430                 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_err(e);
3431                 return nativeResponseValue;
3432         }
3433         // bool CResult_RouteHopDecodeErrorZ_is_ok(const struct LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR o);
3434         export function CResult_RouteHopDecodeErrorZ_is_ok(o: number): boolean {
3435                 if(!isWasmInitialized) {
3436                         throw new Error("initializeWasm() must be awaited first!");
3437                 }
3438                 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_is_ok(o);
3439                 return nativeResponseValue;
3440         }
3441         // void CResult_RouteHopDecodeErrorZ_free(struct LDKCResult_RouteHopDecodeErrorZ _res);
3442         export function CResult_RouteHopDecodeErrorZ_free(_res: number): void {
3443                 if(!isWasmInitialized) {
3444                         throw new Error("initializeWasm() must be awaited first!");
3445                 }
3446                 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_free(_res);
3447                 // debug statements here
3448         }
3449         // uint64_t CResult_RouteHopDecodeErrorZ_clone_ptr(LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR arg);
3450         export function CResult_RouteHopDecodeErrorZ_clone_ptr(arg: number): number {
3451                 if(!isWasmInitialized) {
3452                         throw new Error("initializeWasm() must be awaited first!");
3453                 }
3454                 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_clone_ptr(arg);
3455                 return nativeResponseValue;
3456         }
3457         // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_clone(const struct LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR orig);
3458         export function CResult_RouteHopDecodeErrorZ_clone(orig: number): number {
3459                 if(!isWasmInitialized) {
3460                         throw new Error("initializeWasm() must be awaited first!");
3461                 }
3462                 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_clone(orig);
3463                 return nativeResponseValue;
3464         }
3465         // void CVec_RouteHopZ_free(struct LDKCVec_RouteHopZ _res);
3466         export function CVec_RouteHopZ_free(_res: number[]): void {
3467                 if(!isWasmInitialized) {
3468                         throw new Error("initializeWasm() must be awaited first!");
3469                 }
3470                 const nativeResponseValue = wasm.CVec_RouteHopZ_free(_res);
3471                 // debug statements here
3472         }
3473         // void CVec_CVec_RouteHopZZ_free(struct LDKCVec_CVec_RouteHopZZ _res);
3474         export function CVec_CVec_RouteHopZZ_free(_res: number[][]): void {
3475                 if(!isWasmInitialized) {
3476                         throw new Error("initializeWasm() must be awaited first!");
3477                 }
3478                 const nativeResponseValue = wasm.CVec_CVec_RouteHopZZ_free(_res);
3479                 // debug statements here
3480         }
3481         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_ok(struct LDKRoute o);
3482         export function CResult_RouteDecodeErrorZ_ok(o: number): number {
3483                 if(!isWasmInitialized) {
3484                         throw new Error("initializeWasm() must be awaited first!");
3485                 }
3486                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_ok(o);
3487                 return nativeResponseValue;
3488         }
3489         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_err(struct LDKDecodeError e);
3490         export function CResult_RouteDecodeErrorZ_err(e: number): number {
3491                 if(!isWasmInitialized) {
3492                         throw new Error("initializeWasm() must be awaited first!");
3493                 }
3494                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_err(e);
3495                 return nativeResponseValue;
3496         }
3497         // bool CResult_RouteDecodeErrorZ_is_ok(const struct LDKCResult_RouteDecodeErrorZ *NONNULL_PTR o);
3498         export function CResult_RouteDecodeErrorZ_is_ok(o: number): boolean {
3499                 if(!isWasmInitialized) {
3500                         throw new Error("initializeWasm() must be awaited first!");
3501                 }
3502                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_is_ok(o);
3503                 return nativeResponseValue;
3504         }
3505         // void CResult_RouteDecodeErrorZ_free(struct LDKCResult_RouteDecodeErrorZ _res);
3506         export function CResult_RouteDecodeErrorZ_free(_res: number): void {
3507                 if(!isWasmInitialized) {
3508                         throw new Error("initializeWasm() must be awaited first!");
3509                 }
3510                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_free(_res);
3511                 // debug statements here
3512         }
3513         // uint64_t CResult_RouteDecodeErrorZ_clone_ptr(LDKCResult_RouteDecodeErrorZ *NONNULL_PTR arg);
3514         export function CResult_RouteDecodeErrorZ_clone_ptr(arg: number): number {
3515                 if(!isWasmInitialized) {
3516                         throw new Error("initializeWasm() must be awaited first!");
3517                 }
3518                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_clone_ptr(arg);
3519                 return nativeResponseValue;
3520         }
3521         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_clone(const struct LDKCResult_RouteDecodeErrorZ *NONNULL_PTR orig);
3522         export function CResult_RouteDecodeErrorZ_clone(orig: number): number {
3523                 if(!isWasmInitialized) {
3524                         throw new Error("initializeWasm() must be awaited first!");
3525                 }
3526                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_clone(orig);
3527                 return nativeResponseValue;
3528         }
3529         // struct LDKCResult_RouteParametersDecodeErrorZ CResult_RouteParametersDecodeErrorZ_ok(struct LDKRouteParameters o);
3530         export function CResult_RouteParametersDecodeErrorZ_ok(o: number): number {
3531                 if(!isWasmInitialized) {
3532                         throw new Error("initializeWasm() must be awaited first!");
3533                 }
3534                 const nativeResponseValue = wasm.CResult_RouteParametersDecodeErrorZ_ok(o);
3535                 return nativeResponseValue;
3536         }
3537         // struct LDKCResult_RouteParametersDecodeErrorZ CResult_RouteParametersDecodeErrorZ_err(struct LDKDecodeError e);
3538         export function CResult_RouteParametersDecodeErrorZ_err(e: number): number {
3539                 if(!isWasmInitialized) {
3540                         throw new Error("initializeWasm() must be awaited first!");
3541                 }
3542                 const nativeResponseValue = wasm.CResult_RouteParametersDecodeErrorZ_err(e);
3543                 return nativeResponseValue;
3544         }
3545         // bool CResult_RouteParametersDecodeErrorZ_is_ok(const struct LDKCResult_RouteParametersDecodeErrorZ *NONNULL_PTR o);
3546         export function CResult_RouteParametersDecodeErrorZ_is_ok(o: number): boolean {
3547                 if(!isWasmInitialized) {
3548                         throw new Error("initializeWasm() must be awaited first!");
3549                 }
3550                 const nativeResponseValue = wasm.CResult_RouteParametersDecodeErrorZ_is_ok(o);
3551                 return nativeResponseValue;
3552         }
3553         // void CResult_RouteParametersDecodeErrorZ_free(struct LDKCResult_RouteParametersDecodeErrorZ _res);
3554         export function CResult_RouteParametersDecodeErrorZ_free(_res: number): void {
3555                 if(!isWasmInitialized) {
3556                         throw new Error("initializeWasm() must be awaited first!");
3557                 }
3558                 const nativeResponseValue = wasm.CResult_RouteParametersDecodeErrorZ_free(_res);
3559                 // debug statements here
3560         }
3561         // uint64_t CResult_RouteParametersDecodeErrorZ_clone_ptr(LDKCResult_RouteParametersDecodeErrorZ *NONNULL_PTR arg);
3562         export function CResult_RouteParametersDecodeErrorZ_clone_ptr(arg: number): number {
3563                 if(!isWasmInitialized) {
3564                         throw new Error("initializeWasm() must be awaited first!");
3565                 }
3566                 const nativeResponseValue = wasm.CResult_RouteParametersDecodeErrorZ_clone_ptr(arg);
3567                 return nativeResponseValue;
3568         }
3569         // struct LDKCResult_RouteParametersDecodeErrorZ CResult_RouteParametersDecodeErrorZ_clone(const struct LDKCResult_RouteParametersDecodeErrorZ *NONNULL_PTR orig);
3570         export function CResult_RouteParametersDecodeErrorZ_clone(orig: number): number {
3571                 if(!isWasmInitialized) {
3572                         throw new Error("initializeWasm() must be awaited first!");
3573                 }
3574                 const nativeResponseValue = wasm.CResult_RouteParametersDecodeErrorZ_clone(orig);
3575                 return nativeResponseValue;
3576         }
3577         // void CVec_RouteHintZ_free(struct LDKCVec_RouteHintZ _res);
3578         export function CVec_RouteHintZ_free(_res: number[]): void {
3579                 if(!isWasmInitialized) {
3580                         throw new Error("initializeWasm() must be awaited first!");
3581                 }
3582                 const nativeResponseValue = wasm.CVec_RouteHintZ_free(_res);
3583                 // debug statements here
3584         }
3585         // struct LDKCOption_u64Z COption_u64Z_some(uint64_t o);
3586         export function COption_u64Z_some(o: number): number {
3587                 if(!isWasmInitialized) {
3588                         throw new Error("initializeWasm() must be awaited first!");
3589                 }
3590                 const nativeResponseValue = wasm.COption_u64Z_some(o);
3591                 return nativeResponseValue;
3592         }
3593         // struct LDKCOption_u64Z COption_u64Z_none(void);
3594         export function COption_u64Z_none(): number {
3595                 if(!isWasmInitialized) {
3596                         throw new Error("initializeWasm() must be awaited first!");
3597                 }
3598                 const nativeResponseValue = wasm.COption_u64Z_none();
3599                 return nativeResponseValue;
3600         }
3601         // void COption_u64Z_free(struct LDKCOption_u64Z _res);
3602         export function COption_u64Z_free(_res: number): void {
3603                 if(!isWasmInitialized) {
3604                         throw new Error("initializeWasm() must be awaited first!");
3605                 }
3606                 const nativeResponseValue = wasm.COption_u64Z_free(_res);
3607                 // debug statements here
3608         }
3609         // uint64_t COption_u64Z_clone_ptr(LDKCOption_u64Z *NONNULL_PTR arg);
3610         export function COption_u64Z_clone_ptr(arg: number): number {
3611                 if(!isWasmInitialized) {
3612                         throw new Error("initializeWasm() must be awaited first!");
3613                 }
3614                 const nativeResponseValue = wasm.COption_u64Z_clone_ptr(arg);
3615                 return nativeResponseValue;
3616         }
3617         // struct LDKCOption_u64Z COption_u64Z_clone(const struct LDKCOption_u64Z *NONNULL_PTR orig);
3618         export function COption_u64Z_clone(orig: number): number {
3619                 if(!isWasmInitialized) {
3620                         throw new Error("initializeWasm() must be awaited first!");
3621                 }
3622                 const nativeResponseValue = wasm.COption_u64Z_clone(orig);
3623                 return nativeResponseValue;
3624         }
3625         // struct LDKCResult_PayeeDecodeErrorZ CResult_PayeeDecodeErrorZ_ok(struct LDKPayee o);
3626         export function CResult_PayeeDecodeErrorZ_ok(o: number): number {
3627                 if(!isWasmInitialized) {
3628                         throw new Error("initializeWasm() must be awaited first!");
3629                 }
3630                 const nativeResponseValue = wasm.CResult_PayeeDecodeErrorZ_ok(o);
3631                 return nativeResponseValue;
3632         }
3633         // struct LDKCResult_PayeeDecodeErrorZ CResult_PayeeDecodeErrorZ_err(struct LDKDecodeError e);
3634         export function CResult_PayeeDecodeErrorZ_err(e: number): number {
3635                 if(!isWasmInitialized) {
3636                         throw new Error("initializeWasm() must be awaited first!");
3637                 }
3638                 const nativeResponseValue = wasm.CResult_PayeeDecodeErrorZ_err(e);
3639                 return nativeResponseValue;
3640         }
3641         // bool CResult_PayeeDecodeErrorZ_is_ok(const struct LDKCResult_PayeeDecodeErrorZ *NONNULL_PTR o);
3642         export function CResult_PayeeDecodeErrorZ_is_ok(o: number): boolean {
3643                 if(!isWasmInitialized) {
3644                         throw new Error("initializeWasm() must be awaited first!");
3645                 }
3646                 const nativeResponseValue = wasm.CResult_PayeeDecodeErrorZ_is_ok(o);
3647                 return nativeResponseValue;
3648         }
3649         // void CResult_PayeeDecodeErrorZ_free(struct LDKCResult_PayeeDecodeErrorZ _res);
3650         export function CResult_PayeeDecodeErrorZ_free(_res: number): void {
3651                 if(!isWasmInitialized) {
3652                         throw new Error("initializeWasm() must be awaited first!");
3653                 }
3654                 const nativeResponseValue = wasm.CResult_PayeeDecodeErrorZ_free(_res);
3655                 // debug statements here
3656         }
3657         // uint64_t CResult_PayeeDecodeErrorZ_clone_ptr(LDKCResult_PayeeDecodeErrorZ *NONNULL_PTR arg);
3658         export function CResult_PayeeDecodeErrorZ_clone_ptr(arg: number): number {
3659                 if(!isWasmInitialized) {
3660                         throw new Error("initializeWasm() must be awaited first!");
3661                 }
3662                 const nativeResponseValue = wasm.CResult_PayeeDecodeErrorZ_clone_ptr(arg);
3663                 return nativeResponseValue;
3664         }
3665         // struct LDKCResult_PayeeDecodeErrorZ CResult_PayeeDecodeErrorZ_clone(const struct LDKCResult_PayeeDecodeErrorZ *NONNULL_PTR orig);
3666         export function CResult_PayeeDecodeErrorZ_clone(orig: number): number {
3667                 if(!isWasmInitialized) {
3668                         throw new Error("initializeWasm() must be awaited first!");
3669                 }
3670                 const nativeResponseValue = wasm.CResult_PayeeDecodeErrorZ_clone(orig);
3671                 return nativeResponseValue;
3672         }
3673         // void CVec_RouteHintHopZ_free(struct LDKCVec_RouteHintHopZ _res);
3674         export function CVec_RouteHintHopZ_free(_res: number[]): void {
3675                 if(!isWasmInitialized) {
3676                         throw new Error("initializeWasm() must be awaited first!");
3677                 }
3678                 const nativeResponseValue = wasm.CVec_RouteHintHopZ_free(_res);
3679                 // debug statements here
3680         }
3681         // struct LDKCResult_RouteHintDecodeErrorZ CResult_RouteHintDecodeErrorZ_ok(struct LDKRouteHint o);
3682         export function CResult_RouteHintDecodeErrorZ_ok(o: number): number {
3683                 if(!isWasmInitialized) {
3684                         throw new Error("initializeWasm() must be awaited first!");
3685                 }
3686                 const nativeResponseValue = wasm.CResult_RouteHintDecodeErrorZ_ok(o);
3687                 return nativeResponseValue;
3688         }
3689         // struct LDKCResult_RouteHintDecodeErrorZ CResult_RouteHintDecodeErrorZ_err(struct LDKDecodeError e);
3690         export function CResult_RouteHintDecodeErrorZ_err(e: number): number {
3691                 if(!isWasmInitialized) {
3692                         throw new Error("initializeWasm() must be awaited first!");
3693                 }
3694                 const nativeResponseValue = wasm.CResult_RouteHintDecodeErrorZ_err(e);
3695                 return nativeResponseValue;
3696         }
3697         // bool CResult_RouteHintDecodeErrorZ_is_ok(const struct LDKCResult_RouteHintDecodeErrorZ *NONNULL_PTR o);
3698         export function CResult_RouteHintDecodeErrorZ_is_ok(o: number): boolean {
3699                 if(!isWasmInitialized) {
3700                         throw new Error("initializeWasm() must be awaited first!");
3701                 }
3702                 const nativeResponseValue = wasm.CResult_RouteHintDecodeErrorZ_is_ok(o);
3703                 return nativeResponseValue;
3704         }
3705         // void CResult_RouteHintDecodeErrorZ_free(struct LDKCResult_RouteHintDecodeErrorZ _res);
3706         export function CResult_RouteHintDecodeErrorZ_free(_res: number): void {
3707                 if(!isWasmInitialized) {
3708                         throw new Error("initializeWasm() must be awaited first!");
3709                 }
3710                 const nativeResponseValue = wasm.CResult_RouteHintDecodeErrorZ_free(_res);
3711                 // debug statements here
3712         }
3713         // uint64_t CResult_RouteHintDecodeErrorZ_clone_ptr(LDKCResult_RouteHintDecodeErrorZ *NONNULL_PTR arg);
3714         export function CResult_RouteHintDecodeErrorZ_clone_ptr(arg: number): number {
3715                 if(!isWasmInitialized) {
3716                         throw new Error("initializeWasm() must be awaited first!");
3717                 }
3718                 const nativeResponseValue = wasm.CResult_RouteHintDecodeErrorZ_clone_ptr(arg);
3719                 return nativeResponseValue;
3720         }
3721         // struct LDKCResult_RouteHintDecodeErrorZ CResult_RouteHintDecodeErrorZ_clone(const struct LDKCResult_RouteHintDecodeErrorZ *NONNULL_PTR orig);
3722         export function CResult_RouteHintDecodeErrorZ_clone(orig: number): number {
3723                 if(!isWasmInitialized) {
3724                         throw new Error("initializeWasm() must be awaited first!");
3725                 }
3726                 const nativeResponseValue = wasm.CResult_RouteHintDecodeErrorZ_clone(orig);
3727                 return nativeResponseValue;
3728         }
3729         // struct LDKCResult_RouteHintHopDecodeErrorZ CResult_RouteHintHopDecodeErrorZ_ok(struct LDKRouteHintHop o);
3730         export function CResult_RouteHintHopDecodeErrorZ_ok(o: number): number {
3731                 if(!isWasmInitialized) {
3732                         throw new Error("initializeWasm() must be awaited first!");
3733                 }
3734                 const nativeResponseValue = wasm.CResult_RouteHintHopDecodeErrorZ_ok(o);
3735                 return nativeResponseValue;
3736         }
3737         // struct LDKCResult_RouteHintHopDecodeErrorZ CResult_RouteHintHopDecodeErrorZ_err(struct LDKDecodeError e);
3738         export function CResult_RouteHintHopDecodeErrorZ_err(e: number): number {
3739                 if(!isWasmInitialized) {
3740                         throw new Error("initializeWasm() must be awaited first!");
3741                 }
3742                 const nativeResponseValue = wasm.CResult_RouteHintHopDecodeErrorZ_err(e);
3743                 return nativeResponseValue;
3744         }
3745         // bool CResult_RouteHintHopDecodeErrorZ_is_ok(const struct LDKCResult_RouteHintHopDecodeErrorZ *NONNULL_PTR o);
3746         export function CResult_RouteHintHopDecodeErrorZ_is_ok(o: number): boolean {
3747                 if(!isWasmInitialized) {
3748                         throw new Error("initializeWasm() must be awaited first!");
3749                 }
3750                 const nativeResponseValue = wasm.CResult_RouteHintHopDecodeErrorZ_is_ok(o);
3751                 return nativeResponseValue;
3752         }
3753         // void CResult_RouteHintHopDecodeErrorZ_free(struct LDKCResult_RouteHintHopDecodeErrorZ _res);
3754         export function CResult_RouteHintHopDecodeErrorZ_free(_res: number): void {
3755                 if(!isWasmInitialized) {
3756                         throw new Error("initializeWasm() must be awaited first!");
3757                 }
3758                 const nativeResponseValue = wasm.CResult_RouteHintHopDecodeErrorZ_free(_res);
3759                 // debug statements here
3760         }
3761         // uint64_t CResult_RouteHintHopDecodeErrorZ_clone_ptr(LDKCResult_RouteHintHopDecodeErrorZ *NONNULL_PTR arg);
3762         export function CResult_RouteHintHopDecodeErrorZ_clone_ptr(arg: number): number {
3763                 if(!isWasmInitialized) {
3764                         throw new Error("initializeWasm() must be awaited first!");
3765                 }
3766                 const nativeResponseValue = wasm.CResult_RouteHintHopDecodeErrorZ_clone_ptr(arg);
3767                 return nativeResponseValue;
3768         }
3769         // struct LDKCResult_RouteHintHopDecodeErrorZ CResult_RouteHintHopDecodeErrorZ_clone(const struct LDKCResult_RouteHintHopDecodeErrorZ *NONNULL_PTR orig);
3770         export function CResult_RouteHintHopDecodeErrorZ_clone(orig: number): number {
3771                 if(!isWasmInitialized) {
3772                         throw new Error("initializeWasm() must be awaited first!");
3773                 }
3774                 const nativeResponseValue = wasm.CResult_RouteHintHopDecodeErrorZ_clone(orig);
3775                 return nativeResponseValue;
3776         }
3777         // void CVec_ChannelDetailsZ_free(struct LDKCVec_ChannelDetailsZ _res);
3778         export function CVec_ChannelDetailsZ_free(_res: number[]): void {
3779                 if(!isWasmInitialized) {
3780                         throw new Error("initializeWasm() must be awaited first!");
3781                 }
3782                 const nativeResponseValue = wasm.CVec_ChannelDetailsZ_free(_res);
3783                 // debug statements here
3784         }
3785         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_ok(struct LDKRoute o);
3786         export function CResult_RouteLightningErrorZ_ok(o: number): number {
3787                 if(!isWasmInitialized) {
3788                         throw new Error("initializeWasm() must be awaited first!");
3789                 }
3790                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_ok(o);
3791                 return nativeResponseValue;
3792         }
3793         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_err(struct LDKLightningError e);
3794         export function CResult_RouteLightningErrorZ_err(e: number): number {
3795                 if(!isWasmInitialized) {
3796                         throw new Error("initializeWasm() must be awaited first!");
3797                 }
3798                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_err(e);
3799                 return nativeResponseValue;
3800         }
3801         // bool CResult_RouteLightningErrorZ_is_ok(const struct LDKCResult_RouteLightningErrorZ *NONNULL_PTR o);
3802         export function CResult_RouteLightningErrorZ_is_ok(o: number): boolean {
3803                 if(!isWasmInitialized) {
3804                         throw new Error("initializeWasm() must be awaited first!");
3805                 }
3806                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_is_ok(o);
3807                 return nativeResponseValue;
3808         }
3809         // void CResult_RouteLightningErrorZ_free(struct LDKCResult_RouteLightningErrorZ _res);
3810         export function CResult_RouteLightningErrorZ_free(_res: number): void {
3811                 if(!isWasmInitialized) {
3812                         throw new Error("initializeWasm() must be awaited first!");
3813                 }
3814                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_free(_res);
3815                 // debug statements here
3816         }
3817         // uint64_t CResult_RouteLightningErrorZ_clone_ptr(LDKCResult_RouteLightningErrorZ *NONNULL_PTR arg);
3818         export function CResult_RouteLightningErrorZ_clone_ptr(arg: number): number {
3819                 if(!isWasmInitialized) {
3820                         throw new Error("initializeWasm() must be awaited first!");
3821                 }
3822                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_clone_ptr(arg);
3823                 return nativeResponseValue;
3824         }
3825         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_clone(const struct LDKCResult_RouteLightningErrorZ *NONNULL_PTR orig);
3826         export function CResult_RouteLightningErrorZ_clone(orig: number): number {
3827                 if(!isWasmInitialized) {
3828                         throw new Error("initializeWasm() must be awaited first!");
3829                 }
3830                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_clone(orig);
3831                 return nativeResponseValue;
3832         }
3833         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_ok(struct LDKTxOut o);
3834         export function CResult_TxOutAccessErrorZ_ok(o: number): number {
3835                 if(!isWasmInitialized) {
3836                         throw new Error("initializeWasm() must be awaited first!");
3837                 }
3838                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_ok(o);
3839                 return nativeResponseValue;
3840         }
3841         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_err(enum LDKAccessError e);
3842         export function CResult_TxOutAccessErrorZ_err(e: AccessError): number {
3843                 if(!isWasmInitialized) {
3844                         throw new Error("initializeWasm() must be awaited first!");
3845                 }
3846                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_err(e);
3847                 return nativeResponseValue;
3848         }
3849         // bool CResult_TxOutAccessErrorZ_is_ok(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR o);
3850         export function CResult_TxOutAccessErrorZ_is_ok(o: number): boolean {
3851                 if(!isWasmInitialized) {
3852                         throw new Error("initializeWasm() must be awaited first!");
3853                 }
3854                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_is_ok(o);
3855                 return nativeResponseValue;
3856         }
3857         // void CResult_TxOutAccessErrorZ_free(struct LDKCResult_TxOutAccessErrorZ _res);
3858         export function CResult_TxOutAccessErrorZ_free(_res: number): void {
3859                 if(!isWasmInitialized) {
3860                         throw new Error("initializeWasm() must be awaited first!");
3861                 }
3862                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_free(_res);
3863                 // debug statements here
3864         }
3865         // uint64_t CResult_TxOutAccessErrorZ_clone_ptr(LDKCResult_TxOutAccessErrorZ *NONNULL_PTR arg);
3866         export function CResult_TxOutAccessErrorZ_clone_ptr(arg: number): number {
3867                 if(!isWasmInitialized) {
3868                         throw new Error("initializeWasm() must be awaited first!");
3869                 }
3870                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_clone_ptr(arg);
3871                 return nativeResponseValue;
3872         }
3873         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_clone(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR orig);
3874         export function CResult_TxOutAccessErrorZ_clone(orig: number): number {
3875                 if(!isWasmInitialized) {
3876                         throw new Error("initializeWasm() must be awaited first!");
3877                 }
3878                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_clone(orig);
3879                 return nativeResponseValue;
3880         }
3881         // uint64_t C2Tuple_usizeTransactionZ_clone_ptr(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR arg);
3882         export function C2Tuple_usizeTransactionZ_clone_ptr(arg: number): number {
3883                 if(!isWasmInitialized) {
3884                         throw new Error("initializeWasm() must be awaited first!");
3885                 }
3886                 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_clone_ptr(arg);
3887                 return nativeResponseValue;
3888         }
3889         // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_clone(const struct LDKC2Tuple_usizeTransactionZ *NONNULL_PTR orig);
3890         export function C2Tuple_usizeTransactionZ_clone(orig: number): number {
3891                 if(!isWasmInitialized) {
3892                         throw new Error("initializeWasm() must be awaited first!");
3893                 }
3894                 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_clone(orig);
3895                 return nativeResponseValue;
3896         }
3897         // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, struct LDKTransaction b);
3898         export function C2Tuple_usizeTransactionZ_new(a: number, b: Uint8Array): number {
3899                 if(!isWasmInitialized) {
3900                         throw new Error("initializeWasm() must be awaited first!");
3901                 }
3902                 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_new(a, encodeArray(b));
3903                 return nativeResponseValue;
3904         }
3905         // void C2Tuple_usizeTransactionZ_free(struct LDKC2Tuple_usizeTransactionZ _res);
3906         export function C2Tuple_usizeTransactionZ_free(_res: number): void {
3907                 if(!isWasmInitialized) {
3908                         throw new Error("initializeWasm() must be awaited first!");
3909                 }
3910                 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_free(_res);
3911                 // debug statements here
3912         }
3913         // void CVec_C2Tuple_usizeTransactionZZ_free(struct LDKCVec_C2Tuple_usizeTransactionZZ _res);
3914         export function CVec_C2Tuple_usizeTransactionZZ_free(_res: number[]): void {
3915                 if(!isWasmInitialized) {
3916                         throw new Error("initializeWasm() must be awaited first!");
3917                 }
3918                 const nativeResponseValue = wasm.CVec_C2Tuple_usizeTransactionZZ_free(_res);
3919                 // debug statements here
3920         }
3921         // void CVec_TxidZ_free(struct LDKCVec_TxidZ _res);
3922         export function CVec_TxidZ_free(_res: Uint8Array[]): void {
3923                 if(!isWasmInitialized) {
3924                         throw new Error("initializeWasm() must be awaited first!");
3925                 }
3926                 const nativeResponseValue = wasm.CVec_TxidZ_free(_res);
3927                 // debug statements here
3928         }
3929         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void);
3930         export function CResult_NoneChannelMonitorUpdateErrZ_ok(): number {
3931                 if(!isWasmInitialized) {
3932                         throw new Error("initializeWasm() must be awaited first!");
3933                 }
3934                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_ok();
3935                 return nativeResponseValue;
3936         }
3937         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_err(enum LDKChannelMonitorUpdateErr e);
3938         export function CResult_NoneChannelMonitorUpdateErrZ_err(e: ChannelMonitorUpdateErr): number {
3939                 if(!isWasmInitialized) {
3940                         throw new Error("initializeWasm() must be awaited first!");
3941                 }
3942                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_err(e);
3943                 return nativeResponseValue;
3944         }
3945         // bool CResult_NoneChannelMonitorUpdateErrZ_is_ok(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR o);
3946         export function CResult_NoneChannelMonitorUpdateErrZ_is_ok(o: number): boolean {
3947                 if(!isWasmInitialized) {
3948                         throw new Error("initializeWasm() must be awaited first!");
3949                 }
3950                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_is_ok(o);
3951                 return nativeResponseValue;
3952         }
3953         // void CResult_NoneChannelMonitorUpdateErrZ_free(struct LDKCResult_NoneChannelMonitorUpdateErrZ _res);
3954         export function CResult_NoneChannelMonitorUpdateErrZ_free(_res: number): void {
3955                 if(!isWasmInitialized) {
3956                         throw new Error("initializeWasm() must be awaited first!");
3957                 }
3958                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_free(_res);
3959                 // debug statements here
3960         }
3961         // uint64_t CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR arg);
3962         export function CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(arg: number): number {
3963                 if(!isWasmInitialized) {
3964                         throw new Error("initializeWasm() must be awaited first!");
3965                 }
3966                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(arg);
3967                 return nativeResponseValue;
3968         }
3969         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_clone(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR orig);
3970         export function CResult_NoneChannelMonitorUpdateErrZ_clone(orig: number): number {
3971                 if(!isWasmInitialized) {
3972                         throw new Error("initializeWasm() must be awaited first!");
3973                 }
3974                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_clone(orig);
3975                 return nativeResponseValue;
3976         }
3977         // void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res);
3978         export function CVec_MonitorEventZ_free(_res: number[]): void {
3979                 if(!isWasmInitialized) {
3980                         throw new Error("initializeWasm() must be awaited first!");
3981                 }
3982                 const nativeResponseValue = wasm.CVec_MonitorEventZ_free(_res);
3983                 // debug statements here
3984         }
3985         // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_some(struct LDKC2Tuple_usizeTransactionZ o);
3986         export function COption_C2Tuple_usizeTransactionZZ_some(o: number): number {
3987                 if(!isWasmInitialized) {
3988                         throw new Error("initializeWasm() must be awaited first!");
3989                 }
3990                 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_some(o);
3991                 return nativeResponseValue;
3992         }
3993         // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_none(void);
3994         export function COption_C2Tuple_usizeTransactionZZ_none(): number {
3995                 if(!isWasmInitialized) {
3996                         throw new Error("initializeWasm() must be awaited first!");
3997                 }
3998                 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_none();
3999                 return nativeResponseValue;
4000         }
4001         // void COption_C2Tuple_usizeTransactionZZ_free(struct LDKCOption_C2Tuple_usizeTransactionZZ _res);
4002         export function COption_C2Tuple_usizeTransactionZZ_free(_res: number): void {
4003                 if(!isWasmInitialized) {
4004                         throw new Error("initializeWasm() must be awaited first!");
4005                 }
4006                 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_free(_res);
4007                 // debug statements here
4008         }
4009         // uint64_t COption_C2Tuple_usizeTransactionZZ_clone_ptr(LDKCOption_C2Tuple_usizeTransactionZZ *NONNULL_PTR arg);
4010         export function COption_C2Tuple_usizeTransactionZZ_clone_ptr(arg: number): number {
4011                 if(!isWasmInitialized) {
4012                         throw new Error("initializeWasm() must be awaited first!");
4013                 }
4014                 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_clone_ptr(arg);
4015                 return nativeResponseValue;
4016         }
4017         // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_clone(const struct LDKCOption_C2Tuple_usizeTransactionZZ *NONNULL_PTR orig);
4018         export function COption_C2Tuple_usizeTransactionZZ_clone(orig: number): number {
4019                 if(!isWasmInitialized) {
4020                         throw new Error("initializeWasm() must be awaited first!");
4021                 }
4022                 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_clone(orig);
4023                 return nativeResponseValue;
4024         }
4025         // struct LDKCOption_ClosureReasonZ COption_ClosureReasonZ_some(struct LDKClosureReason o);
4026         export function COption_ClosureReasonZ_some(o: number): number {
4027                 if(!isWasmInitialized) {
4028                         throw new Error("initializeWasm() must be awaited first!");
4029                 }
4030                 const nativeResponseValue = wasm.COption_ClosureReasonZ_some(o);
4031                 return nativeResponseValue;
4032         }
4033         // struct LDKCOption_ClosureReasonZ COption_ClosureReasonZ_none(void);
4034         export function COption_ClosureReasonZ_none(): number {
4035                 if(!isWasmInitialized) {
4036                         throw new Error("initializeWasm() must be awaited first!");
4037                 }
4038                 const nativeResponseValue = wasm.COption_ClosureReasonZ_none();
4039                 return nativeResponseValue;
4040         }
4041         // void COption_ClosureReasonZ_free(struct LDKCOption_ClosureReasonZ _res);
4042         export function COption_ClosureReasonZ_free(_res: number): void {
4043                 if(!isWasmInitialized) {
4044                         throw new Error("initializeWasm() must be awaited first!");
4045                 }
4046                 const nativeResponseValue = wasm.COption_ClosureReasonZ_free(_res);
4047                 // debug statements here
4048         }
4049         // uint64_t COption_ClosureReasonZ_clone_ptr(LDKCOption_ClosureReasonZ *NONNULL_PTR arg);
4050         export function COption_ClosureReasonZ_clone_ptr(arg: number): number {
4051                 if(!isWasmInitialized) {
4052                         throw new Error("initializeWasm() must be awaited first!");
4053                 }
4054                 const nativeResponseValue = wasm.COption_ClosureReasonZ_clone_ptr(arg);
4055                 return nativeResponseValue;
4056         }
4057         // struct LDKCOption_ClosureReasonZ COption_ClosureReasonZ_clone(const struct LDKCOption_ClosureReasonZ *NONNULL_PTR orig);
4058         export function COption_ClosureReasonZ_clone(orig: number): number {
4059                 if(!isWasmInitialized) {
4060                         throw new Error("initializeWasm() must be awaited first!");
4061                 }
4062                 const nativeResponseValue = wasm.COption_ClosureReasonZ_clone(orig);
4063                 return nativeResponseValue;
4064         }
4065         // struct LDKCResult_COption_ClosureReasonZDecodeErrorZ CResult_COption_ClosureReasonZDecodeErrorZ_ok(struct LDKCOption_ClosureReasonZ o);
4066         export function CResult_COption_ClosureReasonZDecodeErrorZ_ok(o: number): number {
4067                 if(!isWasmInitialized) {
4068                         throw new Error("initializeWasm() must be awaited first!");
4069                 }
4070                 const nativeResponseValue = wasm.CResult_COption_ClosureReasonZDecodeErrorZ_ok(o);
4071                 return nativeResponseValue;
4072         }
4073         // struct LDKCResult_COption_ClosureReasonZDecodeErrorZ CResult_COption_ClosureReasonZDecodeErrorZ_err(struct LDKDecodeError e);
4074         export function CResult_COption_ClosureReasonZDecodeErrorZ_err(e: number): number {
4075                 if(!isWasmInitialized) {
4076                         throw new Error("initializeWasm() must be awaited first!");
4077                 }
4078                 const nativeResponseValue = wasm.CResult_COption_ClosureReasonZDecodeErrorZ_err(e);
4079                 return nativeResponseValue;
4080         }
4081         // bool CResult_COption_ClosureReasonZDecodeErrorZ_is_ok(const struct LDKCResult_COption_ClosureReasonZDecodeErrorZ *NONNULL_PTR o);
4082         export function CResult_COption_ClosureReasonZDecodeErrorZ_is_ok(o: number): boolean {
4083                 if(!isWasmInitialized) {
4084                         throw new Error("initializeWasm() must be awaited first!");
4085                 }
4086                 const nativeResponseValue = wasm.CResult_COption_ClosureReasonZDecodeErrorZ_is_ok(o);
4087                 return nativeResponseValue;
4088         }
4089         // void CResult_COption_ClosureReasonZDecodeErrorZ_free(struct LDKCResult_COption_ClosureReasonZDecodeErrorZ _res);
4090         export function CResult_COption_ClosureReasonZDecodeErrorZ_free(_res: number): void {
4091                 if(!isWasmInitialized) {
4092                         throw new Error("initializeWasm() must be awaited first!");
4093                 }
4094                 const nativeResponseValue = wasm.CResult_COption_ClosureReasonZDecodeErrorZ_free(_res);
4095                 // debug statements here
4096         }
4097         // uint64_t CResult_COption_ClosureReasonZDecodeErrorZ_clone_ptr(LDKCResult_COption_ClosureReasonZDecodeErrorZ *NONNULL_PTR arg);
4098         export function CResult_COption_ClosureReasonZDecodeErrorZ_clone_ptr(arg: number): number {
4099                 if(!isWasmInitialized) {
4100                         throw new Error("initializeWasm() must be awaited first!");
4101                 }
4102                 const nativeResponseValue = wasm.CResult_COption_ClosureReasonZDecodeErrorZ_clone_ptr(arg);
4103                 return nativeResponseValue;
4104         }
4105         // struct LDKCResult_COption_ClosureReasonZDecodeErrorZ CResult_COption_ClosureReasonZDecodeErrorZ_clone(const struct LDKCResult_COption_ClosureReasonZDecodeErrorZ *NONNULL_PTR orig);
4106         export function CResult_COption_ClosureReasonZDecodeErrorZ_clone(orig: number): number {
4107                 if(!isWasmInitialized) {
4108                         throw new Error("initializeWasm() must be awaited first!");
4109                 }
4110                 const nativeResponseValue = wasm.CResult_COption_ClosureReasonZDecodeErrorZ_clone(orig);
4111                 return nativeResponseValue;
4112         }
4113         // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_some(struct LDKNetworkUpdate o);
4114         export function COption_NetworkUpdateZ_some(o: number): number {
4115                 if(!isWasmInitialized) {
4116                         throw new Error("initializeWasm() must be awaited first!");
4117                 }
4118                 const nativeResponseValue = wasm.COption_NetworkUpdateZ_some(o);
4119                 return nativeResponseValue;
4120         }
4121         // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_none(void);
4122         export function COption_NetworkUpdateZ_none(): number {
4123                 if(!isWasmInitialized) {
4124                         throw new Error("initializeWasm() must be awaited first!");
4125                 }
4126                 const nativeResponseValue = wasm.COption_NetworkUpdateZ_none();
4127                 return nativeResponseValue;
4128         }
4129         // void COption_NetworkUpdateZ_free(struct LDKCOption_NetworkUpdateZ _res);
4130         export function COption_NetworkUpdateZ_free(_res: number): void {
4131                 if(!isWasmInitialized) {
4132                         throw new Error("initializeWasm() must be awaited first!");
4133                 }
4134                 const nativeResponseValue = wasm.COption_NetworkUpdateZ_free(_res);
4135                 // debug statements here
4136         }
4137         // uint64_t COption_NetworkUpdateZ_clone_ptr(LDKCOption_NetworkUpdateZ *NONNULL_PTR arg);
4138         export function COption_NetworkUpdateZ_clone_ptr(arg: number): number {
4139                 if(!isWasmInitialized) {
4140                         throw new Error("initializeWasm() must be awaited first!");
4141                 }
4142                 const nativeResponseValue = wasm.COption_NetworkUpdateZ_clone_ptr(arg);
4143                 return nativeResponseValue;
4144         }
4145         // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_clone(const struct LDKCOption_NetworkUpdateZ *NONNULL_PTR orig);
4146         export function COption_NetworkUpdateZ_clone(orig: number): number {
4147                 if(!isWasmInitialized) {
4148                         throw new Error("initializeWasm() must be awaited first!");
4149                 }
4150                 const nativeResponseValue = wasm.COption_NetworkUpdateZ_clone(orig);
4151                 return nativeResponseValue;
4152         }
4153         // void CVec_SpendableOutputDescriptorZ_free(struct LDKCVec_SpendableOutputDescriptorZ _res);
4154         export function CVec_SpendableOutputDescriptorZ_free(_res: number[]): void {
4155                 if(!isWasmInitialized) {
4156                         throw new Error("initializeWasm() must be awaited first!");
4157                 }
4158                 const nativeResponseValue = wasm.CVec_SpendableOutputDescriptorZ_free(_res);
4159                 // debug statements here
4160         }
4161         // struct LDKCOption_EventZ COption_EventZ_some(struct LDKEvent o);
4162         export function COption_EventZ_some(o: number): number {
4163                 if(!isWasmInitialized) {
4164                         throw new Error("initializeWasm() must be awaited first!");
4165                 }
4166                 const nativeResponseValue = wasm.COption_EventZ_some(o);
4167                 return nativeResponseValue;
4168         }
4169         // struct LDKCOption_EventZ COption_EventZ_none(void);
4170         export function COption_EventZ_none(): number {
4171                 if(!isWasmInitialized) {
4172                         throw new Error("initializeWasm() must be awaited first!");
4173                 }
4174                 const nativeResponseValue = wasm.COption_EventZ_none();
4175                 return nativeResponseValue;
4176         }
4177         // void COption_EventZ_free(struct LDKCOption_EventZ _res);
4178         export function COption_EventZ_free(_res: number): void {
4179                 if(!isWasmInitialized) {
4180                         throw new Error("initializeWasm() must be awaited first!");
4181                 }
4182                 const nativeResponseValue = wasm.COption_EventZ_free(_res);
4183                 // debug statements here
4184         }
4185         // uint64_t COption_EventZ_clone_ptr(LDKCOption_EventZ *NONNULL_PTR arg);
4186         export function COption_EventZ_clone_ptr(arg: number): number {
4187                 if(!isWasmInitialized) {
4188                         throw new Error("initializeWasm() must be awaited first!");
4189                 }
4190                 const nativeResponseValue = wasm.COption_EventZ_clone_ptr(arg);
4191                 return nativeResponseValue;
4192         }
4193         // struct LDKCOption_EventZ COption_EventZ_clone(const struct LDKCOption_EventZ *NONNULL_PTR orig);
4194         export function COption_EventZ_clone(orig: number): number {
4195                 if(!isWasmInitialized) {
4196                         throw new Error("initializeWasm() must be awaited first!");
4197                 }
4198                 const nativeResponseValue = wasm.COption_EventZ_clone(orig);
4199                 return nativeResponseValue;
4200         }
4201         // struct LDKCResult_COption_EventZDecodeErrorZ CResult_COption_EventZDecodeErrorZ_ok(struct LDKCOption_EventZ o);
4202         export function CResult_COption_EventZDecodeErrorZ_ok(o: number): number {
4203                 if(!isWasmInitialized) {
4204                         throw new Error("initializeWasm() must be awaited first!");
4205                 }
4206                 const nativeResponseValue = wasm.CResult_COption_EventZDecodeErrorZ_ok(o);
4207                 return nativeResponseValue;
4208         }
4209         // struct LDKCResult_COption_EventZDecodeErrorZ CResult_COption_EventZDecodeErrorZ_err(struct LDKDecodeError e);
4210         export function CResult_COption_EventZDecodeErrorZ_err(e: number): number {
4211                 if(!isWasmInitialized) {
4212                         throw new Error("initializeWasm() must be awaited first!");
4213                 }
4214                 const nativeResponseValue = wasm.CResult_COption_EventZDecodeErrorZ_err(e);
4215                 return nativeResponseValue;
4216         }
4217         // bool CResult_COption_EventZDecodeErrorZ_is_ok(const struct LDKCResult_COption_EventZDecodeErrorZ *NONNULL_PTR o);
4218         export function CResult_COption_EventZDecodeErrorZ_is_ok(o: number): boolean {
4219                 if(!isWasmInitialized) {
4220                         throw new Error("initializeWasm() must be awaited first!");
4221                 }
4222                 const nativeResponseValue = wasm.CResult_COption_EventZDecodeErrorZ_is_ok(o);
4223                 return nativeResponseValue;
4224         }
4225         // void CResult_COption_EventZDecodeErrorZ_free(struct LDKCResult_COption_EventZDecodeErrorZ _res);
4226         export function CResult_COption_EventZDecodeErrorZ_free(_res: number): void {
4227                 if(!isWasmInitialized) {
4228                         throw new Error("initializeWasm() must be awaited first!");
4229                 }
4230                 const nativeResponseValue = wasm.CResult_COption_EventZDecodeErrorZ_free(_res);
4231                 // debug statements here
4232         }
4233         // uint64_t CResult_COption_EventZDecodeErrorZ_clone_ptr(LDKCResult_COption_EventZDecodeErrorZ *NONNULL_PTR arg);
4234         export function CResult_COption_EventZDecodeErrorZ_clone_ptr(arg: number): number {
4235                 if(!isWasmInitialized) {
4236                         throw new Error("initializeWasm() must be awaited first!");
4237                 }
4238                 const nativeResponseValue = wasm.CResult_COption_EventZDecodeErrorZ_clone_ptr(arg);
4239                 return nativeResponseValue;
4240         }
4241         // struct LDKCResult_COption_EventZDecodeErrorZ CResult_COption_EventZDecodeErrorZ_clone(const struct LDKCResult_COption_EventZDecodeErrorZ *NONNULL_PTR orig);
4242         export function CResult_COption_EventZDecodeErrorZ_clone(orig: number): number {
4243                 if(!isWasmInitialized) {
4244                         throw new Error("initializeWasm() must be awaited first!");
4245                 }
4246                 const nativeResponseValue = wasm.CResult_COption_EventZDecodeErrorZ_clone(orig);
4247                 return nativeResponseValue;
4248         }
4249         // void CVec_MessageSendEventZ_free(struct LDKCVec_MessageSendEventZ _res);
4250         export function CVec_MessageSendEventZ_free(_res: number[]): void {
4251                 if(!isWasmInitialized) {
4252                         throw new Error("initializeWasm() must be awaited first!");
4253                 }
4254                 const nativeResponseValue = wasm.CVec_MessageSendEventZ_free(_res);
4255                 // debug statements here
4256         }
4257         // struct LDKCResult_ScoringParametersDecodeErrorZ CResult_ScoringParametersDecodeErrorZ_ok(struct LDKScoringParameters o);
4258         export function CResult_ScoringParametersDecodeErrorZ_ok(o: number): number {
4259                 if(!isWasmInitialized) {
4260                         throw new Error("initializeWasm() must be awaited first!");
4261                 }
4262                 const nativeResponseValue = wasm.CResult_ScoringParametersDecodeErrorZ_ok(o);
4263                 return nativeResponseValue;
4264         }
4265         // struct LDKCResult_ScoringParametersDecodeErrorZ CResult_ScoringParametersDecodeErrorZ_err(struct LDKDecodeError e);
4266         export function CResult_ScoringParametersDecodeErrorZ_err(e: number): number {
4267                 if(!isWasmInitialized) {
4268                         throw new Error("initializeWasm() must be awaited first!");
4269                 }
4270                 const nativeResponseValue = wasm.CResult_ScoringParametersDecodeErrorZ_err(e);
4271                 return nativeResponseValue;
4272         }
4273         // bool CResult_ScoringParametersDecodeErrorZ_is_ok(const struct LDKCResult_ScoringParametersDecodeErrorZ *NONNULL_PTR o);
4274         export function CResult_ScoringParametersDecodeErrorZ_is_ok(o: number): boolean {
4275                 if(!isWasmInitialized) {
4276                         throw new Error("initializeWasm() must be awaited first!");
4277                 }
4278                 const nativeResponseValue = wasm.CResult_ScoringParametersDecodeErrorZ_is_ok(o);
4279                 return nativeResponseValue;
4280         }
4281         // void CResult_ScoringParametersDecodeErrorZ_free(struct LDKCResult_ScoringParametersDecodeErrorZ _res);
4282         export function CResult_ScoringParametersDecodeErrorZ_free(_res: number): void {
4283                 if(!isWasmInitialized) {
4284                         throw new Error("initializeWasm() must be awaited first!");
4285                 }
4286                 const nativeResponseValue = wasm.CResult_ScoringParametersDecodeErrorZ_free(_res);
4287                 // debug statements here
4288         }
4289         // struct LDKCResult_ScorerDecodeErrorZ CResult_ScorerDecodeErrorZ_ok(struct LDKScorer o);
4290         export function CResult_ScorerDecodeErrorZ_ok(o: number): number {
4291                 if(!isWasmInitialized) {
4292                         throw new Error("initializeWasm() must be awaited first!");
4293                 }
4294                 const nativeResponseValue = wasm.CResult_ScorerDecodeErrorZ_ok(o);
4295                 return nativeResponseValue;
4296         }
4297         // struct LDKCResult_ScorerDecodeErrorZ CResult_ScorerDecodeErrorZ_err(struct LDKDecodeError e);
4298         export function CResult_ScorerDecodeErrorZ_err(e: number): number {
4299                 if(!isWasmInitialized) {
4300                         throw new Error("initializeWasm() must be awaited first!");
4301                 }
4302                 const nativeResponseValue = wasm.CResult_ScorerDecodeErrorZ_err(e);
4303                 return nativeResponseValue;
4304         }
4305         // bool CResult_ScorerDecodeErrorZ_is_ok(const struct LDKCResult_ScorerDecodeErrorZ *NONNULL_PTR o);
4306         export function CResult_ScorerDecodeErrorZ_is_ok(o: number): boolean {
4307                 if(!isWasmInitialized) {
4308                         throw new Error("initializeWasm() must be awaited first!");
4309                 }
4310                 const nativeResponseValue = wasm.CResult_ScorerDecodeErrorZ_is_ok(o);
4311                 return nativeResponseValue;
4312         }
4313         // void CResult_ScorerDecodeErrorZ_free(struct LDKCResult_ScorerDecodeErrorZ _res);
4314         export function CResult_ScorerDecodeErrorZ_free(_res: number): void {
4315                 if(!isWasmInitialized) {
4316                         throw new Error("initializeWasm() must be awaited first!");
4317                 }
4318                 const nativeResponseValue = wasm.CResult_ScorerDecodeErrorZ_free(_res);
4319                 // debug statements here
4320         }
4321         // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_ok(struct LDKInitFeatures o);
4322         export function CResult_InitFeaturesDecodeErrorZ_ok(o: number): number {
4323                 if(!isWasmInitialized) {
4324                         throw new Error("initializeWasm() must be awaited first!");
4325                 }
4326                 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_ok(o);
4327                 return nativeResponseValue;
4328         }
4329         // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
4330         export function CResult_InitFeaturesDecodeErrorZ_err(e: number): number {
4331                 if(!isWasmInitialized) {
4332                         throw new Error("initializeWasm() must be awaited first!");
4333                 }
4334                 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_err(e);
4335                 return nativeResponseValue;
4336         }
4337         // bool CResult_InitFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR o);
4338         export function CResult_InitFeaturesDecodeErrorZ_is_ok(o: number): boolean {
4339                 if(!isWasmInitialized) {
4340                         throw new Error("initializeWasm() must be awaited first!");
4341                 }
4342                 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_is_ok(o);
4343                 return nativeResponseValue;
4344         }
4345         // void CResult_InitFeaturesDecodeErrorZ_free(struct LDKCResult_InitFeaturesDecodeErrorZ _res);
4346         export function CResult_InitFeaturesDecodeErrorZ_free(_res: number): void {
4347                 if(!isWasmInitialized) {
4348                         throw new Error("initializeWasm() must be awaited first!");
4349                 }
4350                 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_free(_res);
4351                 // debug statements here
4352         }
4353         // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_ok(struct LDKChannelFeatures o);
4354         export function CResult_ChannelFeaturesDecodeErrorZ_ok(o: number): number {
4355                 if(!isWasmInitialized) {
4356                         throw new Error("initializeWasm() must be awaited first!");
4357                 }
4358                 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_ok(o);
4359                 return nativeResponseValue;
4360         }
4361         // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
4362         export function CResult_ChannelFeaturesDecodeErrorZ_err(e: number): number {
4363                 if(!isWasmInitialized) {
4364                         throw new Error("initializeWasm() must be awaited first!");
4365                 }
4366                 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_err(e);
4367                 return nativeResponseValue;
4368         }
4369         // bool CResult_ChannelFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_ChannelFeaturesDecodeErrorZ *NONNULL_PTR o);
4370         export function CResult_ChannelFeaturesDecodeErrorZ_is_ok(o: number): boolean {
4371                 if(!isWasmInitialized) {
4372                         throw new Error("initializeWasm() must be awaited first!");
4373                 }
4374                 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_is_ok(o);
4375                 return nativeResponseValue;
4376         }
4377         // void CResult_ChannelFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelFeaturesDecodeErrorZ _res);
4378         export function CResult_ChannelFeaturesDecodeErrorZ_free(_res: number): void {
4379                 if(!isWasmInitialized) {
4380                         throw new Error("initializeWasm() must be awaited first!");
4381                 }
4382                 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_free(_res);
4383                 // debug statements here
4384         }
4385         // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_ok(struct LDKNodeFeatures o);
4386         export function CResult_NodeFeaturesDecodeErrorZ_ok(o: number): number {
4387                 if(!isWasmInitialized) {
4388                         throw new Error("initializeWasm() must be awaited first!");
4389                 }
4390                 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_ok(o);
4391                 return nativeResponseValue;
4392         }
4393         // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
4394         export function CResult_NodeFeaturesDecodeErrorZ_err(e: number): number {
4395                 if(!isWasmInitialized) {
4396                         throw new Error("initializeWasm() must be awaited first!");
4397                 }
4398                 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_err(e);
4399                 return nativeResponseValue;
4400         }
4401         // bool CResult_NodeFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_NodeFeaturesDecodeErrorZ *NONNULL_PTR o);
4402         export function CResult_NodeFeaturesDecodeErrorZ_is_ok(o: number): boolean {
4403                 if(!isWasmInitialized) {
4404                         throw new Error("initializeWasm() must be awaited first!");
4405                 }
4406                 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_is_ok(o);
4407                 return nativeResponseValue;
4408         }
4409         // void CResult_NodeFeaturesDecodeErrorZ_free(struct LDKCResult_NodeFeaturesDecodeErrorZ _res);
4410         export function CResult_NodeFeaturesDecodeErrorZ_free(_res: number): void {
4411                 if(!isWasmInitialized) {
4412                         throw new Error("initializeWasm() must be awaited first!");
4413                 }
4414                 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_free(_res);
4415                 // debug statements here
4416         }
4417         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_ok(struct LDKInvoiceFeatures o);
4418         export function CResult_InvoiceFeaturesDecodeErrorZ_ok(o: number): number {
4419                 if(!isWasmInitialized) {
4420                         throw new Error("initializeWasm() must be awaited first!");
4421                 }
4422                 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_ok(o);
4423                 return nativeResponseValue;
4424         }
4425         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
4426         export function CResult_InvoiceFeaturesDecodeErrorZ_err(e: number): number {
4427                 if(!isWasmInitialized) {
4428                         throw new Error("initializeWasm() must be awaited first!");
4429                 }
4430                 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_err(e);
4431                 return nativeResponseValue;
4432         }
4433         // bool CResult_InvoiceFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_InvoiceFeaturesDecodeErrorZ *NONNULL_PTR o);
4434         export function CResult_InvoiceFeaturesDecodeErrorZ_is_ok(o: number): boolean {
4435                 if(!isWasmInitialized) {
4436                         throw new Error("initializeWasm() must be awaited first!");
4437                 }
4438                 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_is_ok(o);
4439                 return nativeResponseValue;
4440         }
4441         // void CResult_InvoiceFeaturesDecodeErrorZ_free(struct LDKCResult_InvoiceFeaturesDecodeErrorZ _res);
4442         export function CResult_InvoiceFeaturesDecodeErrorZ_free(_res: number): void {
4443                 if(!isWasmInitialized) {
4444                         throw new Error("initializeWasm() must be awaited first!");
4445                 }
4446                 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_free(_res);
4447                 // debug statements here
4448         }
4449         // struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ CResult_ChannelTypeFeaturesDecodeErrorZ_ok(struct LDKChannelTypeFeatures o);
4450         export function CResult_ChannelTypeFeaturesDecodeErrorZ_ok(o: number): number {
4451                 if(!isWasmInitialized) {
4452                         throw new Error("initializeWasm() must be awaited first!");
4453                 }
4454                 const nativeResponseValue = wasm.CResult_ChannelTypeFeaturesDecodeErrorZ_ok(o);
4455                 return nativeResponseValue;
4456         }
4457         // struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ CResult_ChannelTypeFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
4458         export function CResult_ChannelTypeFeaturesDecodeErrorZ_err(e: number): number {
4459                 if(!isWasmInitialized) {
4460                         throw new Error("initializeWasm() must be awaited first!");
4461                 }
4462                 const nativeResponseValue = wasm.CResult_ChannelTypeFeaturesDecodeErrorZ_err(e);
4463                 return nativeResponseValue;
4464         }
4465         // bool CResult_ChannelTypeFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR o);
4466         export function CResult_ChannelTypeFeaturesDecodeErrorZ_is_ok(o: number): boolean {
4467                 if(!isWasmInitialized) {
4468                         throw new Error("initializeWasm() must be awaited first!");
4469                 }
4470                 const nativeResponseValue = wasm.CResult_ChannelTypeFeaturesDecodeErrorZ_is_ok(o);
4471                 return nativeResponseValue;
4472         }
4473         // void CResult_ChannelTypeFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ _res);
4474         export function CResult_ChannelTypeFeaturesDecodeErrorZ_free(_res: number): void {
4475                 if(!isWasmInitialized) {
4476                         throw new Error("initializeWasm() must be awaited first!");
4477                 }
4478                 const nativeResponseValue = wasm.CResult_ChannelTypeFeaturesDecodeErrorZ_free(_res);
4479                 // debug statements here
4480         }
4481         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKDelayedPaymentOutputDescriptor o);
4482         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o: number): number {
4483                 if(!isWasmInitialized) {
4484                         throw new Error("initializeWasm() must be awaited first!");
4485                 }
4486                 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o);
4487                 return nativeResponseValue;
4488         }
4489         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
4490         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e: number): number {
4491                 if(!isWasmInitialized) {
4492                         throw new Error("initializeWasm() must be awaited first!");
4493                 }
4494                 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e);
4495                 return nativeResponseValue;
4496         }
4497         // bool CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_is_ok(const struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR o);
4498         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_is_ok(o: number): boolean {
4499                 if(!isWasmInitialized) {
4500                         throw new Error("initializeWasm() must be awaited first!");
4501                 }
4502                 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_is_ok(o);
4503                 return nativeResponseValue;
4504         }
4505         // void CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ _res);
4506         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(_res: number): void {
4507                 if(!isWasmInitialized) {
4508                         throw new Error("initializeWasm() must be awaited first!");
4509                 }
4510                 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(_res);
4511                 // debug statements here
4512         }
4513         // uint64_t CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone_ptr(LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR arg);
4514         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone_ptr(arg: number): number {
4515                 if(!isWasmInitialized) {
4516                         throw new Error("initializeWasm() must be awaited first!");
4517                 }
4518                 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone_ptr(arg);
4519                 return nativeResponseValue;
4520         }
4521         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
4522         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(orig: number): number {
4523                 if(!isWasmInitialized) {
4524                         throw new Error("initializeWasm() must be awaited first!");
4525                 }
4526                 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(orig);
4527                 return nativeResponseValue;
4528         }
4529         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKStaticPaymentOutputDescriptor o);
4530         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o: number): number {
4531                 if(!isWasmInitialized) {
4532                         throw new Error("initializeWasm() must be awaited first!");
4533                 }
4534                 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o);
4535                 return nativeResponseValue;
4536         }
4537         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
4538         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e: number): number {
4539                 if(!isWasmInitialized) {
4540                         throw new Error("initializeWasm() must be awaited first!");
4541                 }
4542                 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e);
4543                 return nativeResponseValue;
4544         }
4545         // bool CResult_StaticPaymentOutputDescriptorDecodeErrorZ_is_ok(const struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR o);
4546         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_is_ok(o: number): boolean {
4547                 if(!isWasmInitialized) {
4548                         throw new Error("initializeWasm() must be awaited first!");
4549                 }
4550                 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_is_ok(o);
4551                 return nativeResponseValue;
4552         }
4553         // void CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ _res);
4554         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(_res: number): void {
4555                 if(!isWasmInitialized) {
4556                         throw new Error("initializeWasm() must be awaited first!");
4557                 }
4558                 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(_res);
4559                 // debug statements here
4560         }
4561         // uint64_t CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone_ptr(LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR arg);
4562         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone_ptr(arg: number): number {
4563                 if(!isWasmInitialized) {
4564                         throw new Error("initializeWasm() must be awaited first!");
4565                 }
4566                 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone_ptr(arg);
4567                 return nativeResponseValue;
4568         }
4569         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
4570         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(orig: number): number {
4571                 if(!isWasmInitialized) {
4572                         throw new Error("initializeWasm() must be awaited first!");
4573                 }
4574                 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(orig);
4575                 return nativeResponseValue;
4576         }
4577         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_ok(struct LDKSpendableOutputDescriptor o);
4578         export function CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o: number): number {
4579                 if(!isWasmInitialized) {
4580                         throw new Error("initializeWasm() must be awaited first!");
4581                 }
4582                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o);
4583                 return nativeResponseValue;
4584         }
4585         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
4586         export function CResult_SpendableOutputDescriptorDecodeErrorZ_err(e: number): number {
4587                 if(!isWasmInitialized) {
4588                         throw new Error("initializeWasm() must be awaited first!");
4589                 }
4590                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_err(e);
4591                 return nativeResponseValue;
4592         }
4593         // bool CResult_SpendableOutputDescriptorDecodeErrorZ_is_ok(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR o);
4594         export function CResult_SpendableOutputDescriptorDecodeErrorZ_is_ok(o: number): boolean {
4595                 if(!isWasmInitialized) {
4596                         throw new Error("initializeWasm() must be awaited first!");
4597                 }
4598                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_is_ok(o);
4599                 return nativeResponseValue;
4600         }
4601         // void CResult_SpendableOutputDescriptorDecodeErrorZ_free(struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ _res);
4602         export function CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res: number): void {
4603                 if(!isWasmInitialized) {
4604                         throw new Error("initializeWasm() must be awaited first!");
4605                 }
4606                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res);
4607                 // debug statements here
4608         }
4609         // uint64_t CResult_SpendableOutputDescriptorDecodeErrorZ_clone_ptr(LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR arg);
4610         export function CResult_SpendableOutputDescriptorDecodeErrorZ_clone_ptr(arg: number): number {
4611                 if(!isWasmInitialized) {
4612                         throw new Error("initializeWasm() must be awaited first!");
4613                 }
4614                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_clone_ptr(arg);
4615                 return nativeResponseValue;
4616         }
4617         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
4618         export function CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig: number): number {
4619                 if(!isWasmInitialized) {
4620                         throw new Error("initializeWasm() must be awaited first!");
4621                 }
4622                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig);
4623                 return nativeResponseValue;
4624         }
4625         // struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_ok(void);
4626         export function CResult_NoneNoneZ_ok(): number {
4627                 if(!isWasmInitialized) {
4628                         throw new Error("initializeWasm() must be awaited first!");
4629                 }
4630                 const nativeResponseValue = wasm.CResult_NoneNoneZ_ok();
4631                 return nativeResponseValue;
4632         }
4633         // struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_err(void);
4634         export function CResult_NoneNoneZ_err(): number {
4635                 if(!isWasmInitialized) {
4636                         throw new Error("initializeWasm() must be awaited first!");
4637                 }
4638                 const nativeResponseValue = wasm.CResult_NoneNoneZ_err();
4639                 return nativeResponseValue;
4640         }
4641         // bool CResult_NoneNoneZ_is_ok(const struct LDKCResult_NoneNoneZ *NONNULL_PTR o);
4642         export function CResult_NoneNoneZ_is_ok(o: number): boolean {
4643                 if(!isWasmInitialized) {
4644                         throw new Error("initializeWasm() must be awaited first!");
4645                 }
4646                 const nativeResponseValue = wasm.CResult_NoneNoneZ_is_ok(o);
4647                 return nativeResponseValue;
4648         }
4649         // void CResult_NoneNoneZ_free(struct LDKCResult_NoneNoneZ _res);
4650         export function CResult_NoneNoneZ_free(_res: number): void {
4651                 if(!isWasmInitialized) {
4652                         throw new Error("initializeWasm() must be awaited first!");
4653                 }
4654                 const nativeResponseValue = wasm.CResult_NoneNoneZ_free(_res);
4655                 // debug statements here
4656         }
4657         // uint64_t CResult_NoneNoneZ_clone_ptr(LDKCResult_NoneNoneZ *NONNULL_PTR arg);
4658         export function CResult_NoneNoneZ_clone_ptr(arg: number): number {
4659                 if(!isWasmInitialized) {
4660                         throw new Error("initializeWasm() must be awaited first!");
4661                 }
4662                 const nativeResponseValue = wasm.CResult_NoneNoneZ_clone_ptr(arg);
4663                 return nativeResponseValue;
4664         }
4665         // struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_clone(const struct LDKCResult_NoneNoneZ *NONNULL_PTR orig);
4666         export function CResult_NoneNoneZ_clone(orig: number): number {
4667                 if(!isWasmInitialized) {
4668                         throw new Error("initializeWasm() must be awaited first!");
4669                 }
4670                 const nativeResponseValue = wasm.CResult_NoneNoneZ_clone(orig);
4671                 return nativeResponseValue;
4672         }
4673         // uint64_t C2Tuple_SignatureCVec_SignatureZZ_clone_ptr(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR arg);
4674         export function C2Tuple_SignatureCVec_SignatureZZ_clone_ptr(arg: number): number {
4675                 if(!isWasmInitialized) {
4676                         throw new Error("initializeWasm() must be awaited first!");
4677                 }
4678                 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_clone_ptr(arg);
4679                 return nativeResponseValue;
4680         }
4681         // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_clone(const struct LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR orig);
4682         export function C2Tuple_SignatureCVec_SignatureZZ_clone(orig: number): number {
4683                 if(!isWasmInitialized) {
4684                         throw new Error("initializeWasm() must be awaited first!");
4685                 }
4686                 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_clone(orig);
4687                 return nativeResponseValue;
4688         }
4689         // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(struct LDKSignature a, struct LDKCVec_SignatureZ b);
4690         export function C2Tuple_SignatureCVec_SignatureZZ_new(a: Uint8Array, b: Uint8Array[]): number {
4691                 if(!isWasmInitialized) {
4692                         throw new Error("initializeWasm() must be awaited first!");
4693                 }
4694                 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_new(encodeArray(a), b);
4695                 return nativeResponseValue;
4696         }
4697         // void C2Tuple_SignatureCVec_SignatureZZ_free(struct LDKC2Tuple_SignatureCVec_SignatureZZ _res);
4698         export function C2Tuple_SignatureCVec_SignatureZZ_free(_res: number): void {
4699                 if(!isWasmInitialized) {
4700                         throw new Error("initializeWasm() must be awaited first!");
4701                 }
4702                 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_free(_res);
4703                 // debug statements here
4704         }
4705         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(struct LDKC2Tuple_SignatureCVec_SignatureZZ o);
4706         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o: number): number {
4707                 if(!isWasmInitialized) {
4708                         throw new Error("initializeWasm() must be awaited first!");
4709                 }
4710                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o);
4711                 return nativeResponseValue;
4712         }
4713         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(void);
4714         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(): number {
4715                 if(!isWasmInitialized) {
4716                         throw new Error("initializeWasm() must be awaited first!");
4717                 }
4718                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err();
4719                 return nativeResponseValue;
4720         }
4721         // bool CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_is_ok(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR o);
4722         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_is_ok(o: number): boolean {
4723                 if(!isWasmInitialized) {
4724                         throw new Error("initializeWasm() must be awaited first!");
4725                 }
4726                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_is_ok(o);
4727                 return nativeResponseValue;
4728         }
4729         // void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ _res);
4730         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res: number): void {
4731                 if(!isWasmInitialized) {
4732                         throw new Error("initializeWasm() must be awaited first!");
4733                 }
4734                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res);
4735                 // debug statements here
4736         }
4737         // uint64_t CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone_ptr(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR arg);
4738         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone_ptr(arg: number): number {
4739                 if(!isWasmInitialized) {
4740                         throw new Error("initializeWasm() must be awaited first!");
4741                 }
4742                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone_ptr(arg);
4743                 return nativeResponseValue;
4744         }
4745         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR orig);
4746         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig: number): number {
4747                 if(!isWasmInitialized) {
4748                         throw new Error("initializeWasm() must be awaited first!");
4749                 }
4750                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig);
4751                 return nativeResponseValue;
4752         }
4753         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_ok(struct LDKSignature o);
4754         export function CResult_SignatureNoneZ_ok(o: Uint8Array): number {
4755                 if(!isWasmInitialized) {
4756                         throw new Error("initializeWasm() must be awaited first!");
4757                 }
4758                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_ok(encodeArray(o));
4759                 return nativeResponseValue;
4760         }
4761         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_err(void);
4762         export function CResult_SignatureNoneZ_err(): number {
4763                 if(!isWasmInitialized) {
4764                         throw new Error("initializeWasm() must be awaited first!");
4765                 }
4766                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_err();
4767                 return nativeResponseValue;
4768         }
4769         // bool CResult_SignatureNoneZ_is_ok(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR o);
4770         export function CResult_SignatureNoneZ_is_ok(o: number): boolean {
4771                 if(!isWasmInitialized) {
4772                         throw new Error("initializeWasm() must be awaited first!");
4773                 }
4774                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_is_ok(o);
4775                 return nativeResponseValue;
4776         }
4777         // void CResult_SignatureNoneZ_free(struct LDKCResult_SignatureNoneZ _res);
4778         export function CResult_SignatureNoneZ_free(_res: number): void {
4779                 if(!isWasmInitialized) {
4780                         throw new Error("initializeWasm() must be awaited first!");
4781                 }
4782                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_free(_res);
4783                 // debug statements here
4784         }
4785         // uint64_t CResult_SignatureNoneZ_clone_ptr(LDKCResult_SignatureNoneZ *NONNULL_PTR arg);
4786         export function CResult_SignatureNoneZ_clone_ptr(arg: number): number {
4787                 if(!isWasmInitialized) {
4788                         throw new Error("initializeWasm() must be awaited first!");
4789                 }
4790                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_clone_ptr(arg);
4791                 return nativeResponseValue;
4792         }
4793         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_clone(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR orig);
4794         export function CResult_SignatureNoneZ_clone(orig: number): number {
4795                 if(!isWasmInitialized) {
4796                         throw new Error("initializeWasm() must be awaited first!");
4797                 }
4798                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_clone(orig);
4799                 return nativeResponseValue;
4800         }
4801         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_ok(struct LDKSign o);
4802         export function CResult_SignDecodeErrorZ_ok(o: number): number {
4803                 if(!isWasmInitialized) {
4804                         throw new Error("initializeWasm() must be awaited first!");
4805                 }
4806                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_ok(o);
4807                 return nativeResponseValue;
4808         }
4809         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_err(struct LDKDecodeError e);
4810         export function CResult_SignDecodeErrorZ_err(e: number): number {
4811                 if(!isWasmInitialized) {
4812                         throw new Error("initializeWasm() must be awaited first!");
4813                 }
4814                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_err(e);
4815                 return nativeResponseValue;
4816         }
4817         // bool CResult_SignDecodeErrorZ_is_ok(const struct LDKCResult_SignDecodeErrorZ *NONNULL_PTR o);
4818         export function CResult_SignDecodeErrorZ_is_ok(o: number): boolean {
4819                 if(!isWasmInitialized) {
4820                         throw new Error("initializeWasm() must be awaited first!");
4821                 }
4822                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_is_ok(o);
4823                 return nativeResponseValue;
4824         }
4825         // void CResult_SignDecodeErrorZ_free(struct LDKCResult_SignDecodeErrorZ _res);
4826         export function CResult_SignDecodeErrorZ_free(_res: number): void {
4827                 if(!isWasmInitialized) {
4828                         throw new Error("initializeWasm() must be awaited first!");
4829                 }
4830                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_free(_res);
4831                 // debug statements here
4832         }
4833         // uint64_t CResult_SignDecodeErrorZ_clone_ptr(LDKCResult_SignDecodeErrorZ *NONNULL_PTR arg);
4834         export function CResult_SignDecodeErrorZ_clone_ptr(arg: number): number {
4835                 if(!isWasmInitialized) {
4836                         throw new Error("initializeWasm() must be awaited first!");
4837                 }
4838                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_clone_ptr(arg);
4839                 return nativeResponseValue;
4840         }
4841         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_clone(const struct LDKCResult_SignDecodeErrorZ *NONNULL_PTR orig);
4842         export function CResult_SignDecodeErrorZ_clone(orig: number): number {
4843                 if(!isWasmInitialized) {
4844                         throw new Error("initializeWasm() must be awaited first!");
4845                 }
4846                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_clone(orig);
4847                 return nativeResponseValue;
4848         }
4849         // void CVec_u8Z_free(struct LDKCVec_u8Z _res);
4850         export function CVec_u8Z_free(_res: Uint8Array): void {
4851                 if(!isWasmInitialized) {
4852                         throw new Error("initializeWasm() must be awaited first!");
4853                 }
4854                 const nativeResponseValue = wasm.CVec_u8Z_free(encodeArray(_res));
4855                 // debug statements here
4856         }
4857         // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_ok(struct LDKRecoverableSignature o);
4858         export function CResult_RecoverableSignatureNoneZ_ok(arg: Uint8Array): number {
4859                 if(!isWasmInitialized) {
4860                         throw new Error("initializeWasm() must be awaited first!");
4861                 }
4862                 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_ok(encodeArray(arg));
4863                 return nativeResponseValue;
4864         }
4865         // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_err(void);
4866         export function CResult_RecoverableSignatureNoneZ_err(): number {
4867                 if(!isWasmInitialized) {
4868                         throw new Error("initializeWasm() must be awaited first!");
4869                 }
4870                 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_err();
4871                 return nativeResponseValue;
4872         }
4873         // bool CResult_RecoverableSignatureNoneZ_is_ok(const struct LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR o);
4874         export function CResult_RecoverableSignatureNoneZ_is_ok(o: number): boolean {
4875                 if(!isWasmInitialized) {
4876                         throw new Error("initializeWasm() must be awaited first!");
4877                 }
4878                 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_is_ok(o);
4879                 return nativeResponseValue;
4880         }
4881         // void CResult_RecoverableSignatureNoneZ_free(struct LDKCResult_RecoverableSignatureNoneZ _res);
4882         export function CResult_RecoverableSignatureNoneZ_free(_res: number): void {
4883                 if(!isWasmInitialized) {
4884                         throw new Error("initializeWasm() must be awaited first!");
4885                 }
4886                 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_free(_res);
4887                 // debug statements here
4888         }
4889         // uint64_t CResult_RecoverableSignatureNoneZ_clone_ptr(LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR arg);
4890         export function CResult_RecoverableSignatureNoneZ_clone_ptr(arg: number): number {
4891                 if(!isWasmInitialized) {
4892                         throw new Error("initializeWasm() must be awaited first!");
4893                 }
4894                 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_clone_ptr(arg);
4895                 return nativeResponseValue;
4896         }
4897         // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_clone(const struct LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR orig);
4898         export function CResult_RecoverableSignatureNoneZ_clone(orig: number): number {
4899                 if(!isWasmInitialized) {
4900                         throw new Error("initializeWasm() must be awaited first!");
4901                 }
4902                 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_clone(orig);
4903                 return nativeResponseValue;
4904         }
4905         // void CVec_CVec_u8ZZ_free(struct LDKCVec_CVec_u8ZZ _res);
4906         export function CVec_CVec_u8ZZ_free(_res: Uint8Array[]): void {
4907                 if(!isWasmInitialized) {
4908                         throw new Error("initializeWasm() must be awaited first!");
4909                 }
4910                 const nativeResponseValue = wasm.CVec_CVec_u8ZZ_free(_res);
4911                 // debug statements here
4912         }
4913         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_ok(struct LDKCVec_CVec_u8ZZ o);
4914         export function CResult_CVec_CVec_u8ZZNoneZ_ok(o: Uint8Array[]): number {
4915                 if(!isWasmInitialized) {
4916                         throw new Error("initializeWasm() must be awaited first!");
4917                 }
4918                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_ok(o);
4919                 return nativeResponseValue;
4920         }
4921         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_err(void);
4922         export function CResult_CVec_CVec_u8ZZNoneZ_err(): number {
4923                 if(!isWasmInitialized) {
4924                         throw new Error("initializeWasm() must be awaited first!");
4925                 }
4926                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_err();
4927                 return nativeResponseValue;
4928         }
4929         // bool CResult_CVec_CVec_u8ZZNoneZ_is_ok(const struct LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR o);
4930         export function CResult_CVec_CVec_u8ZZNoneZ_is_ok(o: number): boolean {
4931                 if(!isWasmInitialized) {
4932                         throw new Error("initializeWasm() must be awaited first!");
4933                 }
4934                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_is_ok(o);
4935                 return nativeResponseValue;
4936         }
4937         // void CResult_CVec_CVec_u8ZZNoneZ_free(struct LDKCResult_CVec_CVec_u8ZZNoneZ _res);
4938         export function CResult_CVec_CVec_u8ZZNoneZ_free(_res: number): void {
4939                 if(!isWasmInitialized) {
4940                         throw new Error("initializeWasm() must be awaited first!");
4941                 }
4942                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_free(_res);
4943                 // debug statements here
4944         }
4945         // uint64_t CResult_CVec_CVec_u8ZZNoneZ_clone_ptr(LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR arg);
4946         export function CResult_CVec_CVec_u8ZZNoneZ_clone_ptr(arg: number): number {
4947                 if(!isWasmInitialized) {
4948                         throw new Error("initializeWasm() must be awaited first!");
4949                 }
4950                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_clone_ptr(arg);
4951                 return nativeResponseValue;
4952         }
4953         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_clone(const struct LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR orig);
4954         export function CResult_CVec_CVec_u8ZZNoneZ_clone(orig: number): number {
4955                 if(!isWasmInitialized) {
4956                         throw new Error("initializeWasm() must be awaited first!");
4957                 }
4958                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_clone(orig);
4959                 return nativeResponseValue;
4960         }
4961         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_ok(struct LDKInMemorySigner o);
4962         export function CResult_InMemorySignerDecodeErrorZ_ok(o: number): number {
4963                 if(!isWasmInitialized) {
4964                         throw new Error("initializeWasm() must be awaited first!");
4965                 }
4966                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_ok(o);
4967                 return nativeResponseValue;
4968         }
4969         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_err(struct LDKDecodeError e);
4970         export function CResult_InMemorySignerDecodeErrorZ_err(e: number): number {
4971                 if(!isWasmInitialized) {
4972                         throw new Error("initializeWasm() must be awaited first!");
4973                 }
4974                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_err(e);
4975                 return nativeResponseValue;
4976         }
4977         // bool CResult_InMemorySignerDecodeErrorZ_is_ok(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR o);
4978         export function CResult_InMemorySignerDecodeErrorZ_is_ok(o: number): boolean {
4979                 if(!isWasmInitialized) {
4980                         throw new Error("initializeWasm() must be awaited first!");
4981                 }
4982                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_is_ok(o);
4983                 return nativeResponseValue;
4984         }
4985         // void CResult_InMemorySignerDecodeErrorZ_free(struct LDKCResult_InMemorySignerDecodeErrorZ _res);
4986         export function CResult_InMemorySignerDecodeErrorZ_free(_res: number): void {
4987                 if(!isWasmInitialized) {
4988                         throw new Error("initializeWasm() must be awaited first!");
4989                 }
4990                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_free(_res);
4991                 // debug statements here
4992         }
4993         // uint64_t CResult_InMemorySignerDecodeErrorZ_clone_ptr(LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR arg);
4994         export function CResult_InMemorySignerDecodeErrorZ_clone_ptr(arg: number): number {
4995                 if(!isWasmInitialized) {
4996                         throw new Error("initializeWasm() must be awaited first!");
4997                 }
4998                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_clone_ptr(arg);
4999                 return nativeResponseValue;
5000         }
5001         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_clone(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR orig);
5002         export function CResult_InMemorySignerDecodeErrorZ_clone(orig: number): number {
5003                 if(!isWasmInitialized) {
5004                         throw new Error("initializeWasm() must be awaited first!");
5005                 }
5006                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_clone(orig);
5007                 return nativeResponseValue;
5008         }
5009         // void CVec_TxOutZ_free(struct LDKCVec_TxOutZ _res);
5010         export function CVec_TxOutZ_free(_res: number[]): void {
5011                 if(!isWasmInitialized) {
5012                         throw new Error("initializeWasm() must be awaited first!");
5013                 }
5014                 const nativeResponseValue = wasm.CVec_TxOutZ_free(_res);
5015                 // debug statements here
5016         }
5017         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_ok(struct LDKTransaction o);
5018         export function CResult_TransactionNoneZ_ok(o: Uint8Array): number {
5019                 if(!isWasmInitialized) {
5020                         throw new Error("initializeWasm() must be awaited first!");
5021                 }
5022                 const nativeResponseValue = wasm.CResult_TransactionNoneZ_ok(encodeArray(o));
5023                 return nativeResponseValue;
5024         }
5025         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_err(void);
5026         export function CResult_TransactionNoneZ_err(): number {
5027                 if(!isWasmInitialized) {
5028                         throw new Error("initializeWasm() must be awaited first!");
5029                 }
5030                 const nativeResponseValue = wasm.CResult_TransactionNoneZ_err();
5031                 return nativeResponseValue;
5032         }
5033         // bool CResult_TransactionNoneZ_is_ok(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR o);
5034         export function CResult_TransactionNoneZ_is_ok(o: number): boolean {
5035                 if(!isWasmInitialized) {
5036                         throw new Error("initializeWasm() must be awaited first!");
5037                 }
5038                 const nativeResponseValue = wasm.CResult_TransactionNoneZ_is_ok(o);
5039                 return nativeResponseValue;
5040         }
5041         // void CResult_TransactionNoneZ_free(struct LDKCResult_TransactionNoneZ _res);
5042         export function CResult_TransactionNoneZ_free(_res: number): void {
5043                 if(!isWasmInitialized) {
5044                         throw new Error("initializeWasm() must be awaited first!");
5045                 }
5046                 const nativeResponseValue = wasm.CResult_TransactionNoneZ_free(_res);
5047                 // debug statements here
5048         }
5049         // uint64_t CResult_TransactionNoneZ_clone_ptr(LDKCResult_TransactionNoneZ *NONNULL_PTR arg);
5050         export function CResult_TransactionNoneZ_clone_ptr(arg: number): number {
5051                 if(!isWasmInitialized) {
5052                         throw new Error("initializeWasm() must be awaited first!");
5053                 }
5054                 const nativeResponseValue = wasm.CResult_TransactionNoneZ_clone_ptr(arg);
5055                 return nativeResponseValue;
5056         }
5057         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_clone(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR orig);
5058         export function CResult_TransactionNoneZ_clone(orig: number): number {
5059                 if(!isWasmInitialized) {
5060                         throw new Error("initializeWasm() must be awaited first!");
5061                 }
5062                 const nativeResponseValue = wasm.CResult_TransactionNoneZ_clone(orig);
5063                 return nativeResponseValue;
5064         }
5065         // uint64_t C2Tuple_BlockHashChannelMonitorZ_clone_ptr(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR arg);
5066         export function C2Tuple_BlockHashChannelMonitorZ_clone_ptr(arg: number): number {
5067                 if(!isWasmInitialized) {
5068                         throw new Error("initializeWasm() must be awaited first!");
5069                 }
5070                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_clone_ptr(arg);
5071                 return nativeResponseValue;
5072         }
5073         // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_clone(const struct LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR orig);
5074         export function C2Tuple_BlockHashChannelMonitorZ_clone(orig: number): number {
5075                 if(!isWasmInitialized) {
5076                         throw new Error("initializeWasm() must be awaited first!");
5077                 }
5078                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_clone(orig);
5079                 return nativeResponseValue;
5080         }
5081         // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b);
5082         export function C2Tuple_BlockHashChannelMonitorZ_new(a: Uint8Array, b: number): number {
5083                 if(!isWasmInitialized) {
5084                         throw new Error("initializeWasm() must be awaited first!");
5085                 }
5086                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_new(encodeArray(a), b);
5087                 return nativeResponseValue;
5088         }
5089         // void C2Tuple_BlockHashChannelMonitorZ_free(struct LDKC2Tuple_BlockHashChannelMonitorZ _res);
5090         export function C2Tuple_BlockHashChannelMonitorZ_free(_res: number): void {
5091                 if(!isWasmInitialized) {
5092                         throw new Error("initializeWasm() must be awaited first!");
5093                 }
5094                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_free(_res);
5095                 // debug statements here
5096         }
5097         // void CVec_C2Tuple_BlockHashChannelMonitorZZ_free(struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ _res);
5098         export function CVec_C2Tuple_BlockHashChannelMonitorZZ_free(_res: number[]): void {
5099                 if(!isWasmInitialized) {
5100                         throw new Error("initializeWasm() must be awaited first!");
5101                 }
5102                 const nativeResponseValue = wasm.CVec_C2Tuple_BlockHashChannelMonitorZZ_free(_res);
5103                 // debug statements here
5104         }
5105         // struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ o);
5106         export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(o: number[]): number {
5107                 if(!isWasmInitialized) {
5108                         throw new Error("initializeWasm() must be awaited first!");
5109                 }
5110                 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(o);
5111                 return nativeResponseValue;
5112         }
5113         // struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(enum LDKIOError e);
5114         export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(e: IOError): number {
5115                 if(!isWasmInitialized) {
5116                         throw new Error("initializeWasm() must be awaited first!");
5117                 }
5118                 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(e);
5119                 return nativeResponseValue;
5120         }
5121         // bool CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_is_ok(const struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ *NONNULL_PTR o);
5122         export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_is_ok(o: number): boolean {
5123                 if(!isWasmInitialized) {
5124                         throw new Error("initializeWasm() must be awaited first!");
5125                 }
5126                 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_is_ok(o);
5127                 return nativeResponseValue;
5128         }
5129         // void CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ _res);
5130         export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(_res: number): void {
5131                 if(!isWasmInitialized) {
5132                         throw new Error("initializeWasm() must be awaited first!");
5133                 }
5134                 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(_res);
5135                 // debug statements here
5136         }
5137         // uint64_t CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone_ptr(LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ *NONNULL_PTR arg);
5138         export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone_ptr(arg: number): number {
5139                 if(!isWasmInitialized) {
5140                         throw new Error("initializeWasm() must be awaited first!");
5141                 }
5142                 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone_ptr(arg);
5143                 return nativeResponseValue;
5144         }
5145         // struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(const struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ *NONNULL_PTR orig);
5146         export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(orig: number): number {
5147                 if(!isWasmInitialized) {
5148                         throw new Error("initializeWasm() must be awaited first!");
5149                 }
5150                 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(orig);
5151                 return nativeResponseValue;
5152         }
5153         // struct LDKCOption_u16Z COption_u16Z_some(uint16_t o);
5154         export function COption_u16Z_some(o: number): number {
5155                 if(!isWasmInitialized) {
5156                         throw new Error("initializeWasm() must be awaited first!");
5157                 }
5158                 const nativeResponseValue = wasm.COption_u16Z_some(o);
5159                 return nativeResponseValue;
5160         }
5161         // struct LDKCOption_u16Z COption_u16Z_none(void);
5162         export function COption_u16Z_none(): number {
5163                 if(!isWasmInitialized) {
5164                         throw new Error("initializeWasm() must be awaited first!");
5165                 }
5166                 const nativeResponseValue = wasm.COption_u16Z_none();
5167                 return nativeResponseValue;
5168         }
5169         // void COption_u16Z_free(struct LDKCOption_u16Z _res);
5170         export function COption_u16Z_free(_res: number): void {
5171                 if(!isWasmInitialized) {
5172                         throw new Error("initializeWasm() must be awaited first!");
5173                 }
5174                 const nativeResponseValue = wasm.COption_u16Z_free(_res);
5175                 // debug statements here
5176         }
5177         // uint64_t COption_u16Z_clone_ptr(LDKCOption_u16Z *NONNULL_PTR arg);
5178         export function COption_u16Z_clone_ptr(arg: number): number {
5179                 if(!isWasmInitialized) {
5180                         throw new Error("initializeWasm() must be awaited first!");
5181                 }
5182                 const nativeResponseValue = wasm.COption_u16Z_clone_ptr(arg);
5183                 return nativeResponseValue;
5184         }
5185         // struct LDKCOption_u16Z COption_u16Z_clone(const struct LDKCOption_u16Z *NONNULL_PTR orig);
5186         export function COption_u16Z_clone(orig: number): number {
5187                 if(!isWasmInitialized) {
5188                         throw new Error("initializeWasm() must be awaited first!");
5189                 }
5190                 const nativeResponseValue = wasm.COption_u16Z_clone(orig);
5191                 return nativeResponseValue;
5192         }
5193         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void);
5194         export function CResult_NoneAPIErrorZ_ok(): number {
5195                 if(!isWasmInitialized) {
5196                         throw new Error("initializeWasm() must be awaited first!");
5197                 }
5198                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_ok();
5199                 return nativeResponseValue;
5200         }
5201         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_err(struct LDKAPIError e);
5202         export function CResult_NoneAPIErrorZ_err(e: number): number {
5203                 if(!isWasmInitialized) {
5204                         throw new Error("initializeWasm() must be awaited first!");
5205                 }
5206                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_err(e);
5207                 return nativeResponseValue;
5208         }
5209         // bool CResult_NoneAPIErrorZ_is_ok(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR o);
5210         export function CResult_NoneAPIErrorZ_is_ok(o: number): boolean {
5211                 if(!isWasmInitialized) {
5212                         throw new Error("initializeWasm() must be awaited first!");
5213                 }
5214                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_is_ok(o);
5215                 return nativeResponseValue;
5216         }
5217         // void CResult_NoneAPIErrorZ_free(struct LDKCResult_NoneAPIErrorZ _res);
5218         export function CResult_NoneAPIErrorZ_free(_res: number): void {
5219                 if(!isWasmInitialized) {
5220                         throw new Error("initializeWasm() must be awaited first!");
5221                 }
5222                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_free(_res);
5223                 // debug statements here
5224         }
5225         // uint64_t CResult_NoneAPIErrorZ_clone_ptr(LDKCResult_NoneAPIErrorZ *NONNULL_PTR arg);
5226         export function CResult_NoneAPIErrorZ_clone_ptr(arg: number): number {
5227                 if(!isWasmInitialized) {
5228                         throw new Error("initializeWasm() must be awaited first!");
5229                 }
5230                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_clone_ptr(arg);
5231                 return nativeResponseValue;
5232         }
5233         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_clone(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR orig);
5234         export function CResult_NoneAPIErrorZ_clone(orig: number): number {
5235                 if(!isWasmInitialized) {
5236                         throw new Error("initializeWasm() must be awaited first!");
5237                 }
5238                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_clone(orig);
5239                 return nativeResponseValue;
5240         }
5241         // void CVec_CResult_NoneAPIErrorZZ_free(struct LDKCVec_CResult_NoneAPIErrorZZ _res);
5242         export function CVec_CResult_NoneAPIErrorZZ_free(_res: number[]): void {
5243                 if(!isWasmInitialized) {
5244                         throw new Error("initializeWasm() must be awaited first!");
5245                 }
5246                 const nativeResponseValue = wasm.CVec_CResult_NoneAPIErrorZZ_free(_res);
5247                 // debug statements here
5248         }
5249         // void CVec_APIErrorZ_free(struct LDKCVec_APIErrorZ _res);
5250         export function CVec_APIErrorZ_free(_res: number[]): void {
5251                 if(!isWasmInitialized) {
5252                         throw new Error("initializeWasm() must be awaited first!");
5253                 }
5254                 const nativeResponseValue = wasm.CVec_APIErrorZ_free(_res);
5255                 // debug statements here
5256         }
5257         // struct LDKCResult__u832APIErrorZ CResult__u832APIErrorZ_ok(struct LDKThirtyTwoBytes o);
5258         export function CResult__u832APIErrorZ_ok(o: Uint8Array): number {
5259                 if(!isWasmInitialized) {
5260                         throw new Error("initializeWasm() must be awaited first!");
5261                 }
5262                 const nativeResponseValue = wasm.CResult__u832APIErrorZ_ok(encodeArray(o));
5263                 return nativeResponseValue;
5264         }
5265         // struct LDKCResult__u832APIErrorZ CResult__u832APIErrorZ_err(struct LDKAPIError e);
5266         export function CResult__u832APIErrorZ_err(e: number): number {
5267                 if(!isWasmInitialized) {
5268                         throw new Error("initializeWasm() must be awaited first!");
5269                 }
5270                 const nativeResponseValue = wasm.CResult__u832APIErrorZ_err(e);
5271                 return nativeResponseValue;
5272         }
5273         // bool CResult__u832APIErrorZ_is_ok(const struct LDKCResult__u832APIErrorZ *NONNULL_PTR o);
5274         export function CResult__u832APIErrorZ_is_ok(o: number): boolean {
5275                 if(!isWasmInitialized) {
5276                         throw new Error("initializeWasm() must be awaited first!");
5277                 }
5278                 const nativeResponseValue = wasm.CResult__u832APIErrorZ_is_ok(o);
5279                 return nativeResponseValue;
5280         }
5281         // void CResult__u832APIErrorZ_free(struct LDKCResult__u832APIErrorZ _res);
5282         export function CResult__u832APIErrorZ_free(_res: number): void {
5283                 if(!isWasmInitialized) {
5284                         throw new Error("initializeWasm() must be awaited first!");
5285                 }
5286                 const nativeResponseValue = wasm.CResult__u832APIErrorZ_free(_res);
5287                 // debug statements here
5288         }
5289         // uint64_t CResult__u832APIErrorZ_clone_ptr(LDKCResult__u832APIErrorZ *NONNULL_PTR arg);
5290         export function CResult__u832APIErrorZ_clone_ptr(arg: number): number {
5291                 if(!isWasmInitialized) {
5292                         throw new Error("initializeWasm() must be awaited first!");
5293                 }
5294                 const nativeResponseValue = wasm.CResult__u832APIErrorZ_clone_ptr(arg);
5295                 return nativeResponseValue;
5296         }
5297         // struct LDKCResult__u832APIErrorZ CResult__u832APIErrorZ_clone(const struct LDKCResult__u832APIErrorZ *NONNULL_PTR orig);
5298         export function CResult__u832APIErrorZ_clone(orig: number): number {
5299                 if(!isWasmInitialized) {
5300                         throw new Error("initializeWasm() must be awaited first!");
5301                 }
5302                 const nativeResponseValue = wasm.CResult__u832APIErrorZ_clone(orig);
5303                 return nativeResponseValue;
5304         }
5305         // struct LDKCResult_PaymentIdPaymentSendFailureZ CResult_PaymentIdPaymentSendFailureZ_ok(struct LDKThirtyTwoBytes o);
5306         export function CResult_PaymentIdPaymentSendFailureZ_ok(o: Uint8Array): number {
5307                 if(!isWasmInitialized) {
5308                         throw new Error("initializeWasm() must be awaited first!");
5309                 }
5310                 const nativeResponseValue = wasm.CResult_PaymentIdPaymentSendFailureZ_ok(encodeArray(o));
5311                 return nativeResponseValue;
5312         }
5313         // struct LDKCResult_PaymentIdPaymentSendFailureZ CResult_PaymentIdPaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
5314         export function CResult_PaymentIdPaymentSendFailureZ_err(e: number): number {
5315                 if(!isWasmInitialized) {
5316                         throw new Error("initializeWasm() must be awaited first!");
5317                 }
5318                 const nativeResponseValue = wasm.CResult_PaymentIdPaymentSendFailureZ_err(e);
5319                 return nativeResponseValue;
5320         }
5321         // bool CResult_PaymentIdPaymentSendFailureZ_is_ok(const struct LDKCResult_PaymentIdPaymentSendFailureZ *NONNULL_PTR o);
5322         export function CResult_PaymentIdPaymentSendFailureZ_is_ok(o: number): boolean {
5323                 if(!isWasmInitialized) {
5324                         throw new Error("initializeWasm() must be awaited first!");
5325                 }
5326                 const nativeResponseValue = wasm.CResult_PaymentIdPaymentSendFailureZ_is_ok(o);
5327                 return nativeResponseValue;
5328         }
5329         // void CResult_PaymentIdPaymentSendFailureZ_free(struct LDKCResult_PaymentIdPaymentSendFailureZ _res);
5330         export function CResult_PaymentIdPaymentSendFailureZ_free(_res: number): void {
5331                 if(!isWasmInitialized) {
5332                         throw new Error("initializeWasm() must be awaited first!");
5333                 }
5334                 const nativeResponseValue = wasm.CResult_PaymentIdPaymentSendFailureZ_free(_res);
5335                 // debug statements here
5336         }
5337         // uint64_t CResult_PaymentIdPaymentSendFailureZ_clone_ptr(LDKCResult_PaymentIdPaymentSendFailureZ *NONNULL_PTR arg);
5338         export function CResult_PaymentIdPaymentSendFailureZ_clone_ptr(arg: number): number {
5339                 if(!isWasmInitialized) {
5340                         throw new Error("initializeWasm() must be awaited first!");
5341                 }
5342                 const nativeResponseValue = wasm.CResult_PaymentIdPaymentSendFailureZ_clone_ptr(arg);
5343                 return nativeResponseValue;
5344         }
5345         // struct LDKCResult_PaymentIdPaymentSendFailureZ CResult_PaymentIdPaymentSendFailureZ_clone(const struct LDKCResult_PaymentIdPaymentSendFailureZ *NONNULL_PTR orig);
5346         export function CResult_PaymentIdPaymentSendFailureZ_clone(orig: number): number {
5347                 if(!isWasmInitialized) {
5348                         throw new Error("initializeWasm() must be awaited first!");
5349                 }
5350                 const nativeResponseValue = wasm.CResult_PaymentIdPaymentSendFailureZ_clone(orig);
5351                 return nativeResponseValue;
5352         }
5353         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void);
5354         export function CResult_NonePaymentSendFailureZ_ok(): number {
5355                 if(!isWasmInitialized) {
5356                         throw new Error("initializeWasm() must be awaited first!");
5357                 }
5358                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_ok();
5359                 return nativeResponseValue;
5360         }
5361         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
5362         export function CResult_NonePaymentSendFailureZ_err(e: number): number {
5363                 if(!isWasmInitialized) {
5364                         throw new Error("initializeWasm() must be awaited first!");
5365                 }
5366                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_err(e);
5367                 return nativeResponseValue;
5368         }
5369         // bool CResult_NonePaymentSendFailureZ_is_ok(const struct LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR o);
5370         export function CResult_NonePaymentSendFailureZ_is_ok(o: number): boolean {
5371                 if(!isWasmInitialized) {
5372                         throw new Error("initializeWasm() must be awaited first!");
5373                 }
5374                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_is_ok(o);
5375                 return nativeResponseValue;
5376         }
5377         // void CResult_NonePaymentSendFailureZ_free(struct LDKCResult_NonePaymentSendFailureZ _res);
5378         export function CResult_NonePaymentSendFailureZ_free(_res: number): void {
5379                 if(!isWasmInitialized) {
5380                         throw new Error("initializeWasm() must be awaited first!");
5381                 }
5382                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_free(_res);
5383                 // debug statements here
5384         }
5385         // uint64_t CResult_NonePaymentSendFailureZ_clone_ptr(LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR arg);
5386         export function CResult_NonePaymentSendFailureZ_clone_ptr(arg: number): number {
5387                 if(!isWasmInitialized) {
5388                         throw new Error("initializeWasm() must be awaited first!");
5389                 }
5390                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_clone_ptr(arg);
5391                 return nativeResponseValue;
5392         }
5393         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_clone(const struct LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR orig);
5394         export function CResult_NonePaymentSendFailureZ_clone(orig: number): number {
5395                 if(!isWasmInitialized) {
5396                         throw new Error("initializeWasm() must be awaited first!");
5397                 }
5398                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_clone(orig);
5399                 return nativeResponseValue;
5400         }
5401         // uint64_t C2Tuple_PaymentHashPaymentIdZ_clone_ptr(LDKC2Tuple_PaymentHashPaymentIdZ *NONNULL_PTR arg);
5402         export function C2Tuple_PaymentHashPaymentIdZ_clone_ptr(arg: number): number {
5403                 if(!isWasmInitialized) {
5404                         throw new Error("initializeWasm() must be awaited first!");
5405                 }
5406                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentIdZ_clone_ptr(arg);
5407                 return nativeResponseValue;
5408         }
5409         // struct LDKC2Tuple_PaymentHashPaymentIdZ C2Tuple_PaymentHashPaymentIdZ_clone(const struct LDKC2Tuple_PaymentHashPaymentIdZ *NONNULL_PTR orig);
5410         export function C2Tuple_PaymentHashPaymentIdZ_clone(orig: number): number {
5411                 if(!isWasmInitialized) {
5412                         throw new Error("initializeWasm() must be awaited first!");
5413                 }
5414                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentIdZ_clone(orig);
5415                 return nativeResponseValue;
5416         }
5417         // struct LDKC2Tuple_PaymentHashPaymentIdZ C2Tuple_PaymentHashPaymentIdZ_new(struct LDKThirtyTwoBytes a, struct LDKThirtyTwoBytes b);
5418         export function C2Tuple_PaymentHashPaymentIdZ_new(a: Uint8Array, b: Uint8Array): number {
5419                 if(!isWasmInitialized) {
5420                         throw new Error("initializeWasm() must be awaited first!");
5421                 }
5422                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentIdZ_new(encodeArray(a), encodeArray(b));
5423                 return nativeResponseValue;
5424         }
5425         // void C2Tuple_PaymentHashPaymentIdZ_free(struct LDKC2Tuple_PaymentHashPaymentIdZ _res);
5426         export function C2Tuple_PaymentHashPaymentIdZ_free(_res: number): void {
5427                 if(!isWasmInitialized) {
5428                         throw new Error("initializeWasm() must be awaited first!");
5429                 }
5430                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentIdZ_free(_res);
5431                 // debug statements here
5432         }
5433         // struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_ok(struct LDKC2Tuple_PaymentHashPaymentIdZ o);
5434         export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_ok(o: number): number {
5435                 if(!isWasmInitialized) {
5436                         throw new Error("initializeWasm() must be awaited first!");
5437                 }
5438                 const nativeResponseValue = wasm.CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_ok(o);
5439                 return nativeResponseValue;
5440         }
5441         // struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
5442         export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_err(e: number): number {
5443                 if(!isWasmInitialized) {
5444                         throw new Error("initializeWasm() must be awaited first!");
5445                 }
5446                 const nativeResponseValue = wasm.CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_err(e);
5447                 return nativeResponseValue;
5448         }
5449         // bool CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_is_ok(const struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ *NONNULL_PTR o);
5450         export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_is_ok(o: number): boolean {
5451                 if(!isWasmInitialized) {
5452                         throw new Error("initializeWasm() must be awaited first!");
5453                 }
5454                 const nativeResponseValue = wasm.CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_is_ok(o);
5455                 return nativeResponseValue;
5456         }
5457         // void CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_free(struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ _res);
5458         export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_free(_res: number): void {
5459                 if(!isWasmInitialized) {
5460                         throw new Error("initializeWasm() must be awaited first!");
5461                 }
5462                 const nativeResponseValue = wasm.CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_free(_res);
5463                 // debug statements here
5464         }
5465         // uint64_t CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone_ptr(LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ *NONNULL_PTR arg);
5466         export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone_ptr(arg: number): number {
5467                 if(!isWasmInitialized) {
5468                         throw new Error("initializeWasm() must be awaited first!");
5469                 }
5470                 const nativeResponseValue = wasm.CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone_ptr(arg);
5471                 return nativeResponseValue;
5472         }
5473         // struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone(const struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ *NONNULL_PTR orig);
5474         export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone(orig: number): number {
5475                 if(!isWasmInitialized) {
5476                         throw new Error("initializeWasm() must be awaited first!");
5477                 }
5478                 const nativeResponseValue = wasm.CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone(orig);
5479                 return nativeResponseValue;
5480         }
5481         // void CVec_NetAddressZ_free(struct LDKCVec_NetAddressZ _res);
5482         export function CVec_NetAddressZ_free(_res: number[]): void {
5483                 if(!isWasmInitialized) {
5484                         throw new Error("initializeWasm() must be awaited first!");
5485                 }
5486                 const nativeResponseValue = wasm.CVec_NetAddressZ_free(_res);
5487                 // debug statements here
5488         }
5489         // uint64_t C2Tuple_PaymentHashPaymentSecretZ_clone_ptr(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR arg);
5490         export function C2Tuple_PaymentHashPaymentSecretZ_clone_ptr(arg: number): number {
5491                 if(!isWasmInitialized) {
5492                         throw new Error("initializeWasm() must be awaited first!");
5493                 }
5494                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_clone_ptr(arg);
5495                 return nativeResponseValue;
5496         }
5497         // struct LDKC2Tuple_PaymentHashPaymentSecretZ C2Tuple_PaymentHashPaymentSecretZ_clone(const struct LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR orig);
5498         export function C2Tuple_PaymentHashPaymentSecretZ_clone(orig: number): number {
5499                 if(!isWasmInitialized) {
5500                         throw new Error("initializeWasm() must be awaited first!");
5501                 }
5502                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_clone(orig);
5503                 return nativeResponseValue;
5504         }
5505         // struct LDKC2Tuple_PaymentHashPaymentSecretZ C2Tuple_PaymentHashPaymentSecretZ_new(struct LDKThirtyTwoBytes a, struct LDKThirtyTwoBytes b);
5506         export function C2Tuple_PaymentHashPaymentSecretZ_new(a: Uint8Array, b: Uint8Array): number {
5507                 if(!isWasmInitialized) {
5508                         throw new Error("initializeWasm() must be awaited first!");
5509                 }
5510                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_new(encodeArray(a), encodeArray(b));
5511                 return nativeResponseValue;
5512         }
5513         // void C2Tuple_PaymentHashPaymentSecretZ_free(struct LDKC2Tuple_PaymentHashPaymentSecretZ _res);
5514         export function C2Tuple_PaymentHashPaymentSecretZ_free(_res: number): void {
5515                 if(!isWasmInitialized) {
5516                         throw new Error("initializeWasm() must be awaited first!");
5517                 }
5518                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_free(_res);
5519                 // debug statements here
5520         }
5521         // struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_ok(struct LDKC2Tuple_PaymentHashPaymentSecretZ o);
5522         export function CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_ok(o: number): number {
5523                 if(!isWasmInitialized) {
5524                         throw new Error("initializeWasm() must be awaited first!");
5525                 }
5526                 const nativeResponseValue = wasm.CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_ok(o);
5527                 return nativeResponseValue;
5528         }
5529         // struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_err(void);
5530         export function CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_err(): number {
5531                 if(!isWasmInitialized) {
5532                         throw new Error("initializeWasm() must be awaited first!");
5533                 }
5534                 const nativeResponseValue = wasm.CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_err();
5535                 return nativeResponseValue;
5536         }
5537         // bool CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_is_ok(const struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ *NONNULL_PTR o);
5538         export function CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_is_ok(o: number): boolean {
5539                 if(!isWasmInitialized) {
5540                         throw new Error("initializeWasm() must be awaited first!");
5541                 }
5542                 const nativeResponseValue = wasm.CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_is_ok(o);
5543                 return nativeResponseValue;
5544         }
5545         // void CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_free(struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ _res);
5546         export function CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_free(_res: number): void {
5547                 if(!isWasmInitialized) {
5548                         throw new Error("initializeWasm() must be awaited first!");
5549                 }
5550                 const nativeResponseValue = wasm.CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_free(_res);
5551                 // debug statements here
5552         }
5553         // uint64_t CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_clone_ptr(LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ *NONNULL_PTR arg);
5554         export function CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_clone_ptr(arg: number): number {
5555                 if(!isWasmInitialized) {
5556                         throw new Error("initializeWasm() must be awaited first!");
5557                 }
5558                 const nativeResponseValue = wasm.CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_clone_ptr(arg);
5559                 return nativeResponseValue;
5560         }
5561         // struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_clone(const struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ *NONNULL_PTR orig);
5562         export function CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_clone(orig: number): number {
5563                 if(!isWasmInitialized) {
5564                         throw new Error("initializeWasm() must be awaited first!");
5565                 }
5566                 const nativeResponseValue = wasm.CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_clone(orig);
5567                 return nativeResponseValue;
5568         }
5569         // struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_ok(struct LDKC2Tuple_PaymentHashPaymentSecretZ o);
5570         export function CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_ok(o: number): number {
5571                 if(!isWasmInitialized) {
5572                         throw new Error("initializeWasm() must be awaited first!");
5573                 }
5574                 const nativeResponseValue = wasm.CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_ok(o);
5575                 return nativeResponseValue;
5576         }
5577         // struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_err(struct LDKAPIError e);
5578         export function CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_err(e: number): number {
5579                 if(!isWasmInitialized) {
5580                         throw new Error("initializeWasm() must be awaited first!");
5581                 }
5582                 const nativeResponseValue = wasm.CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_err(e);
5583                 return nativeResponseValue;
5584         }
5585         // bool CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_is_ok(const struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ *NONNULL_PTR o);
5586         export function CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_is_ok(o: number): boolean {
5587                 if(!isWasmInitialized) {
5588                         throw new Error("initializeWasm() must be awaited first!");
5589                 }
5590                 const nativeResponseValue = wasm.CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_is_ok(o);
5591                 return nativeResponseValue;
5592         }
5593         // void CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_free(struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ _res);
5594         export function CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_free(_res: number): void {
5595                 if(!isWasmInitialized) {
5596                         throw new Error("initializeWasm() must be awaited first!");
5597                 }
5598                 const nativeResponseValue = wasm.CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_free(_res);
5599                 // debug statements here
5600         }
5601         // uint64_t CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_clone_ptr(LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ *NONNULL_PTR arg);
5602         export function CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_clone_ptr(arg: number): number {
5603                 if(!isWasmInitialized) {
5604                         throw new Error("initializeWasm() must be awaited first!");
5605                 }
5606                 const nativeResponseValue = wasm.CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_clone_ptr(arg);
5607                 return nativeResponseValue;
5608         }
5609         // struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_clone(const struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ *NONNULL_PTR orig);
5610         export function CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_clone(orig: number): number {
5611                 if(!isWasmInitialized) {
5612                         throw new Error("initializeWasm() must be awaited first!");
5613                 }
5614                 const nativeResponseValue = wasm.CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_clone(orig);
5615                 return nativeResponseValue;
5616         }
5617         // struct LDKCResult_PaymentSecretNoneZ CResult_PaymentSecretNoneZ_ok(struct LDKThirtyTwoBytes o);
5618         export function CResult_PaymentSecretNoneZ_ok(o: Uint8Array): number {
5619                 if(!isWasmInitialized) {
5620                         throw new Error("initializeWasm() must be awaited first!");
5621                 }
5622                 const nativeResponseValue = wasm.CResult_PaymentSecretNoneZ_ok(encodeArray(o));
5623                 return nativeResponseValue;
5624         }
5625         // struct LDKCResult_PaymentSecretNoneZ CResult_PaymentSecretNoneZ_err(void);
5626         export function CResult_PaymentSecretNoneZ_err(): number {
5627                 if(!isWasmInitialized) {
5628                         throw new Error("initializeWasm() must be awaited first!");
5629                 }
5630                 const nativeResponseValue = wasm.CResult_PaymentSecretNoneZ_err();
5631                 return nativeResponseValue;
5632         }
5633         // bool CResult_PaymentSecretNoneZ_is_ok(const struct LDKCResult_PaymentSecretNoneZ *NONNULL_PTR o);
5634         export function CResult_PaymentSecretNoneZ_is_ok(o: number): boolean {
5635                 if(!isWasmInitialized) {
5636                         throw new Error("initializeWasm() must be awaited first!");
5637                 }
5638                 const nativeResponseValue = wasm.CResult_PaymentSecretNoneZ_is_ok(o);
5639                 return nativeResponseValue;
5640         }
5641         // void CResult_PaymentSecretNoneZ_free(struct LDKCResult_PaymentSecretNoneZ _res);
5642         export function CResult_PaymentSecretNoneZ_free(_res: number): void {
5643                 if(!isWasmInitialized) {
5644                         throw new Error("initializeWasm() must be awaited first!");
5645                 }
5646                 const nativeResponseValue = wasm.CResult_PaymentSecretNoneZ_free(_res);
5647                 // debug statements here
5648         }
5649         // uint64_t CResult_PaymentSecretNoneZ_clone_ptr(LDKCResult_PaymentSecretNoneZ *NONNULL_PTR arg);
5650         export function CResult_PaymentSecretNoneZ_clone_ptr(arg: number): number {
5651                 if(!isWasmInitialized) {
5652                         throw new Error("initializeWasm() must be awaited first!");
5653                 }
5654                 const nativeResponseValue = wasm.CResult_PaymentSecretNoneZ_clone_ptr(arg);
5655                 return nativeResponseValue;
5656         }
5657         // struct LDKCResult_PaymentSecretNoneZ CResult_PaymentSecretNoneZ_clone(const struct LDKCResult_PaymentSecretNoneZ *NONNULL_PTR orig);
5658         export function CResult_PaymentSecretNoneZ_clone(orig: number): number {
5659                 if(!isWasmInitialized) {
5660                         throw new Error("initializeWasm() must be awaited first!");
5661                 }
5662                 const nativeResponseValue = wasm.CResult_PaymentSecretNoneZ_clone(orig);
5663                 return nativeResponseValue;
5664         }
5665         // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_ok(struct LDKThirtyTwoBytes o);
5666         export function CResult_PaymentSecretAPIErrorZ_ok(o: Uint8Array): number {
5667                 if(!isWasmInitialized) {
5668                         throw new Error("initializeWasm() must be awaited first!");
5669                 }
5670                 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_ok(encodeArray(o));
5671                 return nativeResponseValue;
5672         }
5673         // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_err(struct LDKAPIError e);
5674         export function CResult_PaymentSecretAPIErrorZ_err(e: number): number {
5675                 if(!isWasmInitialized) {
5676                         throw new Error("initializeWasm() must be awaited first!");
5677                 }
5678                 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_err(e);
5679                 return nativeResponseValue;
5680         }
5681         // bool CResult_PaymentSecretAPIErrorZ_is_ok(const struct LDKCResult_PaymentSecretAPIErrorZ *NONNULL_PTR o);
5682         export function CResult_PaymentSecretAPIErrorZ_is_ok(o: number): boolean {
5683                 if(!isWasmInitialized) {
5684                         throw new Error("initializeWasm() must be awaited first!");
5685                 }
5686                 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_is_ok(o);
5687                 return nativeResponseValue;
5688         }
5689         // void CResult_PaymentSecretAPIErrorZ_free(struct LDKCResult_PaymentSecretAPIErrorZ _res);
5690         export function CResult_PaymentSecretAPIErrorZ_free(_res: number): void {
5691                 if(!isWasmInitialized) {
5692                         throw new Error("initializeWasm() must be awaited first!");
5693                 }
5694                 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_free(_res);
5695                 // debug statements here
5696         }
5697         // uint64_t CResult_PaymentSecretAPIErrorZ_clone_ptr(LDKCResult_PaymentSecretAPIErrorZ *NONNULL_PTR arg);
5698         export function CResult_PaymentSecretAPIErrorZ_clone_ptr(arg: number): number {
5699                 if(!isWasmInitialized) {
5700                         throw new Error("initializeWasm() must be awaited first!");
5701                 }
5702                 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_clone_ptr(arg);
5703                 return nativeResponseValue;
5704         }
5705         // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_clone(const struct LDKCResult_PaymentSecretAPIErrorZ *NONNULL_PTR orig);
5706         export function CResult_PaymentSecretAPIErrorZ_clone(orig: number): number {
5707                 if(!isWasmInitialized) {
5708                         throw new Error("initializeWasm() must be awaited first!");
5709                 }
5710                 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_clone(orig);
5711                 return nativeResponseValue;
5712         }
5713         // struct LDKCResult_PaymentPreimageAPIErrorZ CResult_PaymentPreimageAPIErrorZ_ok(struct LDKThirtyTwoBytes o);
5714         export function CResult_PaymentPreimageAPIErrorZ_ok(o: Uint8Array): number {
5715                 if(!isWasmInitialized) {
5716                         throw new Error("initializeWasm() must be awaited first!");
5717                 }
5718                 const nativeResponseValue = wasm.CResult_PaymentPreimageAPIErrorZ_ok(encodeArray(o));
5719                 return nativeResponseValue;
5720         }
5721         // struct LDKCResult_PaymentPreimageAPIErrorZ CResult_PaymentPreimageAPIErrorZ_err(struct LDKAPIError e);
5722         export function CResult_PaymentPreimageAPIErrorZ_err(e: number): number {
5723                 if(!isWasmInitialized) {
5724                         throw new Error("initializeWasm() must be awaited first!");
5725                 }
5726                 const nativeResponseValue = wasm.CResult_PaymentPreimageAPIErrorZ_err(e);
5727                 return nativeResponseValue;
5728         }
5729         // bool CResult_PaymentPreimageAPIErrorZ_is_ok(const struct LDKCResult_PaymentPreimageAPIErrorZ *NONNULL_PTR o);
5730         export function CResult_PaymentPreimageAPIErrorZ_is_ok(o: number): boolean {
5731                 if(!isWasmInitialized) {
5732                         throw new Error("initializeWasm() must be awaited first!");
5733                 }
5734                 const nativeResponseValue = wasm.CResult_PaymentPreimageAPIErrorZ_is_ok(o);
5735                 return nativeResponseValue;
5736         }
5737         // void CResult_PaymentPreimageAPIErrorZ_free(struct LDKCResult_PaymentPreimageAPIErrorZ _res);
5738         export function CResult_PaymentPreimageAPIErrorZ_free(_res: number): void {
5739                 if(!isWasmInitialized) {
5740                         throw new Error("initializeWasm() must be awaited first!");
5741                 }
5742                 const nativeResponseValue = wasm.CResult_PaymentPreimageAPIErrorZ_free(_res);
5743                 // debug statements here
5744         }
5745         // uint64_t CResult_PaymentPreimageAPIErrorZ_clone_ptr(LDKCResult_PaymentPreimageAPIErrorZ *NONNULL_PTR arg);
5746         export function CResult_PaymentPreimageAPIErrorZ_clone_ptr(arg: number): number {
5747                 if(!isWasmInitialized) {
5748                         throw new Error("initializeWasm() must be awaited first!");
5749                 }
5750                 const nativeResponseValue = wasm.CResult_PaymentPreimageAPIErrorZ_clone_ptr(arg);
5751                 return nativeResponseValue;
5752         }
5753         // struct LDKCResult_PaymentPreimageAPIErrorZ CResult_PaymentPreimageAPIErrorZ_clone(const struct LDKCResult_PaymentPreimageAPIErrorZ *NONNULL_PTR orig);
5754         export function CResult_PaymentPreimageAPIErrorZ_clone(orig: number): number {
5755                 if(!isWasmInitialized) {
5756                         throw new Error("initializeWasm() must be awaited first!");
5757                 }
5758                 const nativeResponseValue = wasm.CResult_PaymentPreimageAPIErrorZ_clone(orig);
5759                 return nativeResponseValue;
5760         }
5761         // void CVec_ChannelMonitorZ_free(struct LDKCVec_ChannelMonitorZ _res);
5762         export function CVec_ChannelMonitorZ_free(_res: number[]): void {
5763                 if(!isWasmInitialized) {
5764                         throw new Error("initializeWasm() must be awaited first!");
5765                 }
5766                 const nativeResponseValue = wasm.CVec_ChannelMonitorZ_free(_res);
5767                 // debug statements here
5768         }
5769         // struct LDKC2Tuple_BlockHashChannelManagerZ C2Tuple_BlockHashChannelManagerZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelManager b);
5770         export function C2Tuple_BlockHashChannelManagerZ_new(a: Uint8Array, b: number): number {
5771                 if(!isWasmInitialized) {
5772                         throw new Error("initializeWasm() must be awaited first!");
5773                 }
5774                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_new(encodeArray(a), b);
5775                 return nativeResponseValue;
5776         }
5777         // void C2Tuple_BlockHashChannelManagerZ_free(struct LDKC2Tuple_BlockHashChannelManagerZ _res);
5778         export function C2Tuple_BlockHashChannelManagerZ_free(_res: number): void {
5779                 if(!isWasmInitialized) {
5780                         throw new Error("initializeWasm() must be awaited first!");
5781                 }
5782                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_free(_res);
5783                 // debug statements here
5784         }
5785         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelManagerZ o);
5786         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o: number): number {
5787                 if(!isWasmInitialized) {
5788                         throw new Error("initializeWasm() must be awaited first!");
5789                 }
5790                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o);
5791                 return nativeResponseValue;
5792         }
5793         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(struct LDKDecodeError e);
5794         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e: number): number {
5795                 if(!isWasmInitialized) {
5796                         throw new Error("initializeWasm() must be awaited first!");
5797                 }
5798                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e);
5799                 return nativeResponseValue;
5800         }
5801         // bool CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_is_ok(const struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *NONNULL_PTR o);
5802         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_is_ok(o: number): boolean {
5803                 if(!isWasmInitialized) {
5804                         throw new Error("initializeWasm() must be awaited first!");
5805                 }
5806                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_is_ok(o);
5807                 return nativeResponseValue;
5808         }
5809         // void CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res);
5810         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res: number): void {
5811                 if(!isWasmInitialized) {
5812                         throw new Error("initializeWasm() must be awaited first!");
5813                 }
5814                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res);
5815                 // debug statements here
5816         }
5817         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_ok(struct LDKChannelConfig o);
5818         export function CResult_ChannelConfigDecodeErrorZ_ok(o: number): number {
5819                 if(!isWasmInitialized) {
5820                         throw new Error("initializeWasm() must be awaited first!");
5821                 }
5822                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_ok(o);
5823                 return nativeResponseValue;
5824         }
5825         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_err(struct LDKDecodeError e);
5826         export function CResult_ChannelConfigDecodeErrorZ_err(e: number): number {
5827                 if(!isWasmInitialized) {
5828                         throw new Error("initializeWasm() must be awaited first!");
5829                 }
5830                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_err(e);
5831                 return nativeResponseValue;
5832         }
5833         // bool CResult_ChannelConfigDecodeErrorZ_is_ok(const struct LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR o);
5834         export function CResult_ChannelConfigDecodeErrorZ_is_ok(o: number): boolean {
5835                 if(!isWasmInitialized) {
5836                         throw new Error("initializeWasm() must be awaited first!");
5837                 }
5838                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_is_ok(o);
5839                 return nativeResponseValue;
5840         }
5841         // void CResult_ChannelConfigDecodeErrorZ_free(struct LDKCResult_ChannelConfigDecodeErrorZ _res);
5842         export function CResult_ChannelConfigDecodeErrorZ_free(_res: number): void {
5843                 if(!isWasmInitialized) {
5844                         throw new Error("initializeWasm() must be awaited first!");
5845                 }
5846                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_free(_res);
5847                 // debug statements here
5848         }
5849         // uint64_t CResult_ChannelConfigDecodeErrorZ_clone_ptr(LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR arg);
5850         export function CResult_ChannelConfigDecodeErrorZ_clone_ptr(arg: number): number {
5851                 if(!isWasmInitialized) {
5852                         throw new Error("initializeWasm() must be awaited first!");
5853                 }
5854                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_clone_ptr(arg);
5855                 return nativeResponseValue;
5856         }
5857         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_clone(const struct LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR orig);
5858         export function CResult_ChannelConfigDecodeErrorZ_clone(orig: number): number {
5859                 if(!isWasmInitialized) {
5860                         throw new Error("initializeWasm() must be awaited first!");
5861                 }
5862                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_clone(orig);
5863                 return nativeResponseValue;
5864         }
5865         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_ok(struct LDKOutPoint o);
5866         export function CResult_OutPointDecodeErrorZ_ok(o: number): number {
5867                 if(!isWasmInitialized) {
5868                         throw new Error("initializeWasm() must be awaited first!");
5869                 }
5870                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_ok(o);
5871                 return nativeResponseValue;
5872         }
5873         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_err(struct LDKDecodeError e);
5874         export function CResult_OutPointDecodeErrorZ_err(e: number): number {
5875                 if(!isWasmInitialized) {
5876                         throw new Error("initializeWasm() must be awaited first!");
5877                 }
5878                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_err(e);
5879                 return nativeResponseValue;
5880         }
5881         // bool CResult_OutPointDecodeErrorZ_is_ok(const struct LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR o);
5882         export function CResult_OutPointDecodeErrorZ_is_ok(o: number): boolean {
5883                 if(!isWasmInitialized) {
5884                         throw new Error("initializeWasm() must be awaited first!");
5885                 }
5886                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_is_ok(o);
5887                 return nativeResponseValue;
5888         }
5889         // void CResult_OutPointDecodeErrorZ_free(struct LDKCResult_OutPointDecodeErrorZ _res);
5890         export function CResult_OutPointDecodeErrorZ_free(_res: number): void {
5891                 if(!isWasmInitialized) {
5892                         throw new Error("initializeWasm() must be awaited first!");
5893                 }
5894                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_free(_res);
5895                 // debug statements here
5896         }
5897         // uint64_t CResult_OutPointDecodeErrorZ_clone_ptr(LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR arg);
5898         export function CResult_OutPointDecodeErrorZ_clone_ptr(arg: number): number {
5899                 if(!isWasmInitialized) {
5900                         throw new Error("initializeWasm() must be awaited first!");
5901                 }
5902                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_clone_ptr(arg);
5903                 return nativeResponseValue;
5904         }
5905         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_clone(const struct LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR orig);
5906         export function CResult_OutPointDecodeErrorZ_clone(orig: number): number {
5907                 if(!isWasmInitialized) {
5908                         throw new Error("initializeWasm() must be awaited first!");
5909                 }
5910                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_clone(orig);
5911                 return nativeResponseValue;
5912         }
5913         // struct LDKCOption_TypeZ COption_TypeZ_some(struct LDKType o);
5914         export function COption_TypeZ_some(o: number): number {
5915                 if(!isWasmInitialized) {
5916                         throw new Error("initializeWasm() must be awaited first!");
5917                 }
5918                 const nativeResponseValue = wasm.COption_TypeZ_some(o);
5919                 return nativeResponseValue;
5920         }
5921         // struct LDKCOption_TypeZ COption_TypeZ_none(void);
5922         export function COption_TypeZ_none(): number {
5923                 if(!isWasmInitialized) {
5924                         throw new Error("initializeWasm() must be awaited first!");
5925                 }
5926                 const nativeResponseValue = wasm.COption_TypeZ_none();
5927                 return nativeResponseValue;
5928         }
5929         // void COption_TypeZ_free(struct LDKCOption_TypeZ _res);
5930         export function COption_TypeZ_free(_res: number): void {
5931                 if(!isWasmInitialized) {
5932                         throw new Error("initializeWasm() must be awaited first!");
5933                 }
5934                 const nativeResponseValue = wasm.COption_TypeZ_free(_res);
5935                 // debug statements here
5936         }
5937         // uint64_t COption_TypeZ_clone_ptr(LDKCOption_TypeZ *NONNULL_PTR arg);
5938         export function COption_TypeZ_clone_ptr(arg: number): number {
5939                 if(!isWasmInitialized) {
5940                         throw new Error("initializeWasm() must be awaited first!");
5941                 }
5942                 const nativeResponseValue = wasm.COption_TypeZ_clone_ptr(arg);
5943                 return nativeResponseValue;
5944         }
5945         // struct LDKCOption_TypeZ COption_TypeZ_clone(const struct LDKCOption_TypeZ *NONNULL_PTR orig);
5946         export function COption_TypeZ_clone(orig: number): number {
5947                 if(!isWasmInitialized) {
5948                         throw new Error("initializeWasm() must be awaited first!");
5949                 }
5950                 const nativeResponseValue = wasm.COption_TypeZ_clone(orig);
5951                 return nativeResponseValue;
5952         }
5953         // struct LDKCResult_COption_TypeZDecodeErrorZ CResult_COption_TypeZDecodeErrorZ_ok(struct LDKCOption_TypeZ o);
5954         export function CResult_COption_TypeZDecodeErrorZ_ok(o: number): number {
5955                 if(!isWasmInitialized) {
5956                         throw new Error("initializeWasm() must be awaited first!");
5957                 }
5958                 const nativeResponseValue = wasm.CResult_COption_TypeZDecodeErrorZ_ok(o);
5959                 return nativeResponseValue;
5960         }
5961         // struct LDKCResult_COption_TypeZDecodeErrorZ CResult_COption_TypeZDecodeErrorZ_err(struct LDKDecodeError e);
5962         export function CResult_COption_TypeZDecodeErrorZ_err(e: number): number {
5963                 if(!isWasmInitialized) {
5964                         throw new Error("initializeWasm() must be awaited first!");
5965                 }
5966                 const nativeResponseValue = wasm.CResult_COption_TypeZDecodeErrorZ_err(e);
5967                 return nativeResponseValue;
5968         }
5969         // bool CResult_COption_TypeZDecodeErrorZ_is_ok(const struct LDKCResult_COption_TypeZDecodeErrorZ *NONNULL_PTR o);
5970         export function CResult_COption_TypeZDecodeErrorZ_is_ok(o: number): boolean {
5971                 if(!isWasmInitialized) {
5972                         throw new Error("initializeWasm() must be awaited first!");
5973                 }
5974                 const nativeResponseValue = wasm.CResult_COption_TypeZDecodeErrorZ_is_ok(o);
5975                 return nativeResponseValue;
5976         }
5977         // void CResult_COption_TypeZDecodeErrorZ_free(struct LDKCResult_COption_TypeZDecodeErrorZ _res);
5978         export function CResult_COption_TypeZDecodeErrorZ_free(_res: number): void {
5979                 if(!isWasmInitialized) {
5980                         throw new Error("initializeWasm() must be awaited first!");
5981                 }
5982                 const nativeResponseValue = wasm.CResult_COption_TypeZDecodeErrorZ_free(_res);
5983                 // debug statements here
5984         }
5985         // uint64_t CResult_COption_TypeZDecodeErrorZ_clone_ptr(LDKCResult_COption_TypeZDecodeErrorZ *NONNULL_PTR arg);
5986         export function CResult_COption_TypeZDecodeErrorZ_clone_ptr(arg: number): number {
5987                 if(!isWasmInitialized) {
5988                         throw new Error("initializeWasm() must be awaited first!");
5989                 }
5990                 const nativeResponseValue = wasm.CResult_COption_TypeZDecodeErrorZ_clone_ptr(arg);
5991                 return nativeResponseValue;
5992         }
5993         // struct LDKCResult_COption_TypeZDecodeErrorZ CResult_COption_TypeZDecodeErrorZ_clone(const struct LDKCResult_COption_TypeZDecodeErrorZ *NONNULL_PTR orig);
5994         export function CResult_COption_TypeZDecodeErrorZ_clone(orig: number): number {
5995                 if(!isWasmInitialized) {
5996                         throw new Error("initializeWasm() must be awaited first!");
5997                 }
5998                 const nativeResponseValue = wasm.CResult_COption_TypeZDecodeErrorZ_clone(orig);
5999                 return nativeResponseValue;
6000         }
6001         // struct LDKCResult_PaymentIdPaymentErrorZ CResult_PaymentIdPaymentErrorZ_ok(struct LDKThirtyTwoBytes o);
6002         export function CResult_PaymentIdPaymentErrorZ_ok(o: Uint8Array): number {
6003                 if(!isWasmInitialized) {
6004                         throw new Error("initializeWasm() must be awaited first!");
6005                 }
6006                 const nativeResponseValue = wasm.CResult_PaymentIdPaymentErrorZ_ok(encodeArray(o));
6007                 return nativeResponseValue;
6008         }
6009         // struct LDKCResult_PaymentIdPaymentErrorZ CResult_PaymentIdPaymentErrorZ_err(struct LDKPaymentError e);
6010         export function CResult_PaymentIdPaymentErrorZ_err(e: number): number {
6011                 if(!isWasmInitialized) {
6012                         throw new Error("initializeWasm() must be awaited first!");
6013                 }
6014                 const nativeResponseValue = wasm.CResult_PaymentIdPaymentErrorZ_err(e);
6015                 return nativeResponseValue;
6016         }
6017         // bool CResult_PaymentIdPaymentErrorZ_is_ok(const struct LDKCResult_PaymentIdPaymentErrorZ *NONNULL_PTR o);
6018         export function CResult_PaymentIdPaymentErrorZ_is_ok(o: number): boolean {
6019                 if(!isWasmInitialized) {
6020                         throw new Error("initializeWasm() must be awaited first!");
6021                 }
6022                 const nativeResponseValue = wasm.CResult_PaymentIdPaymentErrorZ_is_ok(o);
6023                 return nativeResponseValue;
6024         }
6025         // void CResult_PaymentIdPaymentErrorZ_free(struct LDKCResult_PaymentIdPaymentErrorZ _res);
6026         export function CResult_PaymentIdPaymentErrorZ_free(_res: number): void {
6027                 if(!isWasmInitialized) {
6028                         throw new Error("initializeWasm() must be awaited first!");
6029                 }
6030                 const nativeResponseValue = wasm.CResult_PaymentIdPaymentErrorZ_free(_res);
6031                 // debug statements here
6032         }
6033         // uint64_t CResult_PaymentIdPaymentErrorZ_clone_ptr(LDKCResult_PaymentIdPaymentErrorZ *NONNULL_PTR arg);
6034         export function CResult_PaymentIdPaymentErrorZ_clone_ptr(arg: number): number {
6035                 if(!isWasmInitialized) {
6036                         throw new Error("initializeWasm() must be awaited first!");
6037                 }
6038                 const nativeResponseValue = wasm.CResult_PaymentIdPaymentErrorZ_clone_ptr(arg);
6039                 return nativeResponseValue;
6040         }
6041         // struct LDKCResult_PaymentIdPaymentErrorZ CResult_PaymentIdPaymentErrorZ_clone(const struct LDKCResult_PaymentIdPaymentErrorZ *NONNULL_PTR orig);
6042         export function CResult_PaymentIdPaymentErrorZ_clone(orig: number): number {
6043                 if(!isWasmInitialized) {
6044                         throw new Error("initializeWasm() must be awaited first!");
6045                 }
6046                 const nativeResponseValue = wasm.CResult_PaymentIdPaymentErrorZ_clone(orig);
6047                 return nativeResponseValue;
6048         }
6049         // struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_ok(enum LDKSiPrefix o);
6050         export function CResult_SiPrefixNoneZ_ok(o: SiPrefix): number {
6051                 if(!isWasmInitialized) {
6052                         throw new Error("initializeWasm() must be awaited first!");
6053                 }
6054                 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_ok(o);
6055                 return nativeResponseValue;
6056         }
6057         // struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_err(void);
6058         export function CResult_SiPrefixNoneZ_err(): number {
6059                 if(!isWasmInitialized) {
6060                         throw new Error("initializeWasm() must be awaited first!");
6061                 }
6062                 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_err();
6063                 return nativeResponseValue;
6064         }
6065         // bool CResult_SiPrefixNoneZ_is_ok(const struct LDKCResult_SiPrefixNoneZ *NONNULL_PTR o);
6066         export function CResult_SiPrefixNoneZ_is_ok(o: number): boolean {
6067                 if(!isWasmInitialized) {
6068                         throw new Error("initializeWasm() must be awaited first!");
6069                 }
6070                 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_is_ok(o);
6071                 return nativeResponseValue;
6072         }
6073         // void CResult_SiPrefixNoneZ_free(struct LDKCResult_SiPrefixNoneZ _res);
6074         export function CResult_SiPrefixNoneZ_free(_res: number): void {
6075                 if(!isWasmInitialized) {
6076                         throw new Error("initializeWasm() must be awaited first!");
6077                 }
6078                 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_free(_res);
6079                 // debug statements here
6080         }
6081         // uint64_t CResult_SiPrefixNoneZ_clone_ptr(LDKCResult_SiPrefixNoneZ *NONNULL_PTR arg);
6082         export function CResult_SiPrefixNoneZ_clone_ptr(arg: number): number {
6083                 if(!isWasmInitialized) {
6084                         throw new Error("initializeWasm() must be awaited first!");
6085                 }
6086                 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_clone_ptr(arg);
6087                 return nativeResponseValue;
6088         }
6089         // struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_clone(const struct LDKCResult_SiPrefixNoneZ *NONNULL_PTR orig);
6090         export function CResult_SiPrefixNoneZ_clone(orig: number): number {
6091                 if(!isWasmInitialized) {
6092                         throw new Error("initializeWasm() must be awaited first!");
6093                 }
6094                 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_clone(orig);
6095                 return nativeResponseValue;
6096         }
6097         // struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_ok(struct LDKInvoice o);
6098         export function CResult_InvoiceNoneZ_ok(o: number): number {
6099                 if(!isWasmInitialized) {
6100                         throw new Error("initializeWasm() must be awaited first!");
6101                 }
6102                 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_ok(o);
6103                 return nativeResponseValue;
6104         }
6105         // struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_err(void);
6106         export function CResult_InvoiceNoneZ_err(): number {
6107                 if(!isWasmInitialized) {
6108                         throw new Error("initializeWasm() must be awaited first!");
6109                 }
6110                 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_err();
6111                 return nativeResponseValue;
6112         }
6113         // bool CResult_InvoiceNoneZ_is_ok(const struct LDKCResult_InvoiceNoneZ *NONNULL_PTR o);
6114         export function CResult_InvoiceNoneZ_is_ok(o: number): boolean {
6115                 if(!isWasmInitialized) {
6116                         throw new Error("initializeWasm() must be awaited first!");
6117                 }
6118                 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_is_ok(o);
6119                 return nativeResponseValue;
6120         }
6121         // void CResult_InvoiceNoneZ_free(struct LDKCResult_InvoiceNoneZ _res);
6122         export function CResult_InvoiceNoneZ_free(_res: number): void {
6123                 if(!isWasmInitialized) {
6124                         throw new Error("initializeWasm() must be awaited first!");
6125                 }
6126                 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_free(_res);
6127                 // debug statements here
6128         }
6129         // uint64_t CResult_InvoiceNoneZ_clone_ptr(LDKCResult_InvoiceNoneZ *NONNULL_PTR arg);
6130         export function CResult_InvoiceNoneZ_clone_ptr(arg: number): number {
6131                 if(!isWasmInitialized) {
6132                         throw new Error("initializeWasm() must be awaited first!");
6133                 }
6134                 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_clone_ptr(arg);
6135                 return nativeResponseValue;
6136         }
6137         // struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_clone(const struct LDKCResult_InvoiceNoneZ *NONNULL_PTR orig);
6138         export function CResult_InvoiceNoneZ_clone(orig: number): number {
6139                 if(!isWasmInitialized) {
6140                         throw new Error("initializeWasm() must be awaited first!");
6141                 }
6142                 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_clone(orig);
6143                 return nativeResponseValue;
6144         }
6145         // struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_ok(struct LDKSignedRawInvoice o);
6146         export function CResult_SignedRawInvoiceNoneZ_ok(o: number): number {
6147                 if(!isWasmInitialized) {
6148                         throw new Error("initializeWasm() must be awaited first!");
6149                 }
6150                 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_ok(o);
6151                 return nativeResponseValue;
6152         }
6153         // struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_err(void);
6154         export function CResult_SignedRawInvoiceNoneZ_err(): number {
6155                 if(!isWasmInitialized) {
6156                         throw new Error("initializeWasm() must be awaited first!");
6157                 }
6158                 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_err();
6159                 return nativeResponseValue;
6160         }
6161         // bool CResult_SignedRawInvoiceNoneZ_is_ok(const struct LDKCResult_SignedRawInvoiceNoneZ *NONNULL_PTR o);
6162         export function CResult_SignedRawInvoiceNoneZ_is_ok(o: number): boolean {
6163                 if(!isWasmInitialized) {
6164                         throw new Error("initializeWasm() must be awaited first!");
6165                 }
6166                 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_is_ok(o);
6167                 return nativeResponseValue;
6168         }
6169         // void CResult_SignedRawInvoiceNoneZ_free(struct LDKCResult_SignedRawInvoiceNoneZ _res);
6170         export function CResult_SignedRawInvoiceNoneZ_free(_res: number): void {
6171                 if(!isWasmInitialized) {
6172                         throw new Error("initializeWasm() must be awaited first!");
6173                 }
6174                 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_free(_res);
6175                 // debug statements here
6176         }
6177         // uint64_t CResult_SignedRawInvoiceNoneZ_clone_ptr(LDKCResult_SignedRawInvoiceNoneZ *NONNULL_PTR arg);
6178         export function CResult_SignedRawInvoiceNoneZ_clone_ptr(arg: number): number {
6179                 if(!isWasmInitialized) {
6180                         throw new Error("initializeWasm() must be awaited first!");
6181                 }
6182                 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_clone_ptr(arg);
6183                 return nativeResponseValue;
6184         }
6185         // struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_clone(const struct LDKCResult_SignedRawInvoiceNoneZ *NONNULL_PTR orig);
6186         export function CResult_SignedRawInvoiceNoneZ_clone(orig: number): number {
6187                 if(!isWasmInitialized) {
6188                         throw new Error("initializeWasm() must be awaited first!");
6189                 }
6190                 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_clone(orig);
6191                 return nativeResponseValue;
6192         }
6193         // uint64_t C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone_ptr(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR arg);
6194         export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone_ptr(arg: number): number {
6195                 if(!isWasmInitialized) {
6196                         throw new Error("initializeWasm() must be awaited first!");
6197                 }
6198                 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone_ptr(arg);
6199                 return nativeResponseValue;
6200         }
6201         // struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(const struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR orig);
6202         export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(orig: number): number {
6203                 if(!isWasmInitialized) {
6204                         throw new Error("initializeWasm() must be awaited first!");
6205                 }
6206                 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(orig);
6207                 return nativeResponseValue;
6208         }
6209         // struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(struct LDKRawInvoice a, struct LDKThirtyTwoBytes b, struct LDKInvoiceSignature c);
6210         export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(a: number, b: Uint8Array, c: number): number {
6211                 if(!isWasmInitialized) {
6212                         throw new Error("initializeWasm() must be awaited first!");
6213                 }
6214                 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(a, encodeArray(b), c);
6215                 return nativeResponseValue;
6216         }
6217         // void C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ _res);
6218         export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(_res: number): void {
6219                 if(!isWasmInitialized) {
6220                         throw new Error("initializeWasm() must be awaited first!");
6221                 }
6222                 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(_res);
6223                 // debug statements here
6224         }
6225         // struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_ok(struct LDKPayeePubKey o);
6226         export function CResult_PayeePubKeyErrorZ_ok(o: number): number {
6227                 if(!isWasmInitialized) {
6228                         throw new Error("initializeWasm() must be awaited first!");
6229                 }
6230                 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_ok(o);
6231                 return nativeResponseValue;
6232         }
6233         // struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_err(enum LDKSecp256k1Error e);
6234         export function CResult_PayeePubKeyErrorZ_err(e: Secp256k1Error): number {
6235                 if(!isWasmInitialized) {
6236                         throw new Error("initializeWasm() must be awaited first!");
6237                 }
6238                 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_err(e);
6239                 return nativeResponseValue;
6240         }
6241         // bool CResult_PayeePubKeyErrorZ_is_ok(const struct LDKCResult_PayeePubKeyErrorZ *NONNULL_PTR o);
6242         export function CResult_PayeePubKeyErrorZ_is_ok(o: number): boolean {
6243                 if(!isWasmInitialized) {
6244                         throw new Error("initializeWasm() must be awaited first!");
6245                 }
6246                 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_is_ok(o);
6247                 return nativeResponseValue;
6248         }
6249         // void CResult_PayeePubKeyErrorZ_free(struct LDKCResult_PayeePubKeyErrorZ _res);
6250         export function CResult_PayeePubKeyErrorZ_free(_res: number): void {
6251                 if(!isWasmInitialized) {
6252                         throw new Error("initializeWasm() must be awaited first!");
6253                 }
6254                 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_free(_res);
6255                 // debug statements here
6256         }
6257         // uint64_t CResult_PayeePubKeyErrorZ_clone_ptr(LDKCResult_PayeePubKeyErrorZ *NONNULL_PTR arg);
6258         export function CResult_PayeePubKeyErrorZ_clone_ptr(arg: number): number {
6259                 if(!isWasmInitialized) {
6260                         throw new Error("initializeWasm() must be awaited first!");
6261                 }
6262                 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_clone_ptr(arg);
6263                 return nativeResponseValue;
6264         }
6265         // struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_clone(const struct LDKCResult_PayeePubKeyErrorZ *NONNULL_PTR orig);
6266         export function CResult_PayeePubKeyErrorZ_clone(orig: number): number {
6267                 if(!isWasmInitialized) {
6268                         throw new Error("initializeWasm() must be awaited first!");
6269                 }
6270                 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_clone(orig);
6271                 return nativeResponseValue;
6272         }
6273         // void CVec_PrivateRouteZ_free(struct LDKCVec_PrivateRouteZ _res);
6274         export function CVec_PrivateRouteZ_free(_res: number[]): void {
6275                 if(!isWasmInitialized) {
6276                         throw new Error("initializeWasm() must be awaited first!");
6277                 }
6278                 const nativeResponseValue = wasm.CVec_PrivateRouteZ_free(_res);
6279                 // debug statements here
6280         }
6281         // struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_ok(struct LDKPositiveTimestamp o);
6282         export function CResult_PositiveTimestampCreationErrorZ_ok(o: number): number {
6283                 if(!isWasmInitialized) {
6284                         throw new Error("initializeWasm() must be awaited first!");
6285                 }
6286                 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_ok(o);
6287                 return nativeResponseValue;
6288         }
6289         // struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_err(enum LDKCreationError e);
6290         export function CResult_PositiveTimestampCreationErrorZ_err(e: CreationError): number {
6291                 if(!isWasmInitialized) {
6292                         throw new Error("initializeWasm() must be awaited first!");
6293                 }
6294                 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_err(e);
6295                 return nativeResponseValue;
6296         }
6297         // bool CResult_PositiveTimestampCreationErrorZ_is_ok(const struct LDKCResult_PositiveTimestampCreationErrorZ *NONNULL_PTR o);
6298         export function CResult_PositiveTimestampCreationErrorZ_is_ok(o: number): boolean {
6299                 if(!isWasmInitialized) {
6300                         throw new Error("initializeWasm() must be awaited first!");
6301                 }
6302                 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_is_ok(o);
6303                 return nativeResponseValue;
6304         }
6305         // void CResult_PositiveTimestampCreationErrorZ_free(struct LDKCResult_PositiveTimestampCreationErrorZ _res);
6306         export function CResult_PositiveTimestampCreationErrorZ_free(_res: number): void {
6307                 if(!isWasmInitialized) {
6308                         throw new Error("initializeWasm() must be awaited first!");
6309                 }
6310                 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_free(_res);
6311                 // debug statements here
6312         }
6313         // uint64_t CResult_PositiveTimestampCreationErrorZ_clone_ptr(LDKCResult_PositiveTimestampCreationErrorZ *NONNULL_PTR arg);
6314         export function CResult_PositiveTimestampCreationErrorZ_clone_ptr(arg: number): number {
6315                 if(!isWasmInitialized) {
6316                         throw new Error("initializeWasm() must be awaited first!");
6317                 }
6318                 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_clone_ptr(arg);
6319                 return nativeResponseValue;
6320         }
6321         // struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_clone(const struct LDKCResult_PositiveTimestampCreationErrorZ *NONNULL_PTR orig);
6322         export function CResult_PositiveTimestampCreationErrorZ_clone(orig: number): number {
6323                 if(!isWasmInitialized) {
6324                         throw new Error("initializeWasm() must be awaited first!");
6325                 }
6326                 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_clone(orig);
6327                 return nativeResponseValue;
6328         }
6329         // struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_ok(void);
6330         export function CResult_NoneSemanticErrorZ_ok(): number {
6331                 if(!isWasmInitialized) {
6332                         throw new Error("initializeWasm() must be awaited first!");
6333                 }
6334                 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_ok();
6335                 return nativeResponseValue;
6336         }
6337         // struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_err(enum LDKSemanticError e);
6338         export function CResult_NoneSemanticErrorZ_err(e: SemanticError): number {
6339                 if(!isWasmInitialized) {
6340                         throw new Error("initializeWasm() must be awaited first!");
6341                 }
6342                 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_err(e);
6343                 return nativeResponseValue;
6344         }
6345         // bool CResult_NoneSemanticErrorZ_is_ok(const struct LDKCResult_NoneSemanticErrorZ *NONNULL_PTR o);
6346         export function CResult_NoneSemanticErrorZ_is_ok(o: number): boolean {
6347                 if(!isWasmInitialized) {
6348                         throw new Error("initializeWasm() must be awaited first!");
6349                 }
6350                 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_is_ok(o);
6351                 return nativeResponseValue;
6352         }
6353         // void CResult_NoneSemanticErrorZ_free(struct LDKCResult_NoneSemanticErrorZ _res);
6354         export function CResult_NoneSemanticErrorZ_free(_res: number): void {
6355                 if(!isWasmInitialized) {
6356                         throw new Error("initializeWasm() must be awaited first!");
6357                 }
6358                 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_free(_res);
6359                 // debug statements here
6360         }
6361         // uint64_t CResult_NoneSemanticErrorZ_clone_ptr(LDKCResult_NoneSemanticErrorZ *NONNULL_PTR arg);
6362         export function CResult_NoneSemanticErrorZ_clone_ptr(arg: number): number {
6363                 if(!isWasmInitialized) {
6364                         throw new Error("initializeWasm() must be awaited first!");
6365                 }
6366                 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_clone_ptr(arg);
6367                 return nativeResponseValue;
6368         }
6369         // struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_clone(const struct LDKCResult_NoneSemanticErrorZ *NONNULL_PTR orig);
6370         export function CResult_NoneSemanticErrorZ_clone(orig: number): number {
6371                 if(!isWasmInitialized) {
6372                         throw new Error("initializeWasm() must be awaited first!");
6373                 }
6374                 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_clone(orig);
6375                 return nativeResponseValue;
6376         }
6377         // struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_ok(struct LDKInvoice o);
6378         export function CResult_InvoiceSemanticErrorZ_ok(o: number): number {
6379                 if(!isWasmInitialized) {
6380                         throw new Error("initializeWasm() must be awaited first!");
6381                 }
6382                 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_ok(o);
6383                 return nativeResponseValue;
6384         }
6385         // struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_err(enum LDKSemanticError e);
6386         export function CResult_InvoiceSemanticErrorZ_err(e: SemanticError): number {
6387                 if(!isWasmInitialized) {
6388                         throw new Error("initializeWasm() must be awaited first!");
6389                 }
6390                 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_err(e);
6391                 return nativeResponseValue;
6392         }
6393         // bool CResult_InvoiceSemanticErrorZ_is_ok(const struct LDKCResult_InvoiceSemanticErrorZ *NONNULL_PTR o);
6394         export function CResult_InvoiceSemanticErrorZ_is_ok(o: number): boolean {
6395                 if(!isWasmInitialized) {
6396                         throw new Error("initializeWasm() must be awaited first!");
6397                 }
6398                 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_is_ok(o);
6399                 return nativeResponseValue;
6400         }
6401         // void CResult_InvoiceSemanticErrorZ_free(struct LDKCResult_InvoiceSemanticErrorZ _res);
6402         export function CResult_InvoiceSemanticErrorZ_free(_res: number): void {
6403                 if(!isWasmInitialized) {
6404                         throw new Error("initializeWasm() must be awaited first!");
6405                 }
6406                 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_free(_res);
6407                 // debug statements here
6408         }
6409         // uint64_t CResult_InvoiceSemanticErrorZ_clone_ptr(LDKCResult_InvoiceSemanticErrorZ *NONNULL_PTR arg);
6410         export function CResult_InvoiceSemanticErrorZ_clone_ptr(arg: number): number {
6411                 if(!isWasmInitialized) {
6412                         throw new Error("initializeWasm() must be awaited first!");
6413                 }
6414                 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_clone_ptr(arg);
6415                 return nativeResponseValue;
6416         }
6417         // struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_clone(const struct LDKCResult_InvoiceSemanticErrorZ *NONNULL_PTR orig);
6418         export function CResult_InvoiceSemanticErrorZ_clone(orig: number): number {
6419                 if(!isWasmInitialized) {
6420                         throw new Error("initializeWasm() must be awaited first!");
6421                 }
6422                 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_clone(orig);
6423                 return nativeResponseValue;
6424         }
6425         // struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_ok(struct LDKDescription o);
6426         export function CResult_DescriptionCreationErrorZ_ok(o: number): number {
6427                 if(!isWasmInitialized) {
6428                         throw new Error("initializeWasm() must be awaited first!");
6429                 }
6430                 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_ok(o);
6431                 return nativeResponseValue;
6432         }
6433         // struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_err(enum LDKCreationError e);
6434         export function CResult_DescriptionCreationErrorZ_err(e: CreationError): number {
6435                 if(!isWasmInitialized) {
6436                         throw new Error("initializeWasm() must be awaited first!");
6437                 }
6438                 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_err(e);
6439                 return nativeResponseValue;
6440         }
6441         // bool CResult_DescriptionCreationErrorZ_is_ok(const struct LDKCResult_DescriptionCreationErrorZ *NONNULL_PTR o);
6442         export function CResult_DescriptionCreationErrorZ_is_ok(o: number): boolean {
6443                 if(!isWasmInitialized) {
6444                         throw new Error("initializeWasm() must be awaited first!");
6445                 }
6446                 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_is_ok(o);
6447                 return nativeResponseValue;
6448         }
6449         // void CResult_DescriptionCreationErrorZ_free(struct LDKCResult_DescriptionCreationErrorZ _res);
6450         export function CResult_DescriptionCreationErrorZ_free(_res: number): void {
6451                 if(!isWasmInitialized) {
6452                         throw new Error("initializeWasm() must be awaited first!");
6453                 }
6454                 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_free(_res);
6455                 // debug statements here
6456         }
6457         // uint64_t CResult_DescriptionCreationErrorZ_clone_ptr(LDKCResult_DescriptionCreationErrorZ *NONNULL_PTR arg);
6458         export function CResult_DescriptionCreationErrorZ_clone_ptr(arg: number): number {
6459                 if(!isWasmInitialized) {
6460                         throw new Error("initializeWasm() must be awaited first!");
6461                 }
6462                 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_clone_ptr(arg);
6463                 return nativeResponseValue;
6464         }
6465         // struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_clone(const struct LDKCResult_DescriptionCreationErrorZ *NONNULL_PTR orig);
6466         export function CResult_DescriptionCreationErrorZ_clone(orig: number): number {
6467                 if(!isWasmInitialized) {
6468                         throw new Error("initializeWasm() must be awaited first!");
6469                 }
6470                 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_clone(orig);
6471                 return nativeResponseValue;
6472         }
6473         // struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_ok(struct LDKExpiryTime o);
6474         export function CResult_ExpiryTimeCreationErrorZ_ok(o: number): number {
6475                 if(!isWasmInitialized) {
6476                         throw new Error("initializeWasm() must be awaited first!");
6477                 }
6478                 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_ok(o);
6479                 return nativeResponseValue;
6480         }
6481         // struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_err(enum LDKCreationError e);
6482         export function CResult_ExpiryTimeCreationErrorZ_err(e: CreationError): number {
6483                 if(!isWasmInitialized) {
6484                         throw new Error("initializeWasm() must be awaited first!");
6485                 }
6486                 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_err(e);
6487                 return nativeResponseValue;
6488         }
6489         // bool CResult_ExpiryTimeCreationErrorZ_is_ok(const struct LDKCResult_ExpiryTimeCreationErrorZ *NONNULL_PTR o);
6490         export function CResult_ExpiryTimeCreationErrorZ_is_ok(o: number): boolean {
6491                 if(!isWasmInitialized) {
6492                         throw new Error("initializeWasm() must be awaited first!");
6493                 }
6494                 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_is_ok(o);
6495                 return nativeResponseValue;
6496         }
6497         // void CResult_ExpiryTimeCreationErrorZ_free(struct LDKCResult_ExpiryTimeCreationErrorZ _res);
6498         export function CResult_ExpiryTimeCreationErrorZ_free(_res: number): void {
6499                 if(!isWasmInitialized) {
6500                         throw new Error("initializeWasm() must be awaited first!");
6501                 }
6502                 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_free(_res);
6503                 // debug statements here
6504         }
6505         // uint64_t CResult_ExpiryTimeCreationErrorZ_clone_ptr(LDKCResult_ExpiryTimeCreationErrorZ *NONNULL_PTR arg);
6506         export function CResult_ExpiryTimeCreationErrorZ_clone_ptr(arg: number): number {
6507                 if(!isWasmInitialized) {
6508                         throw new Error("initializeWasm() must be awaited first!");
6509                 }
6510                 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_clone_ptr(arg);
6511                 return nativeResponseValue;
6512         }
6513         // struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_clone(const struct LDKCResult_ExpiryTimeCreationErrorZ *NONNULL_PTR orig);
6514         export function CResult_ExpiryTimeCreationErrorZ_clone(orig: number): number {
6515                 if(!isWasmInitialized) {
6516                         throw new Error("initializeWasm() must be awaited first!");
6517                 }
6518                 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_clone(orig);
6519                 return nativeResponseValue;
6520         }
6521         // struct LDKCResult_PrivateRouteCreationErrorZ CResult_PrivateRouteCreationErrorZ_ok(struct LDKPrivateRoute o);
6522         export function CResult_PrivateRouteCreationErrorZ_ok(o: number): number {
6523                 if(!isWasmInitialized) {
6524                         throw new Error("initializeWasm() must be awaited first!");
6525                 }
6526                 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_ok(o);
6527                 return nativeResponseValue;
6528         }
6529         // struct LDKCResult_PrivateRouteCreationErrorZ CResult_PrivateRouteCreationErrorZ_err(enum LDKCreationError e);
6530         export function CResult_PrivateRouteCreationErrorZ_err(e: CreationError): number {
6531                 if(!isWasmInitialized) {
6532                         throw new Error("initializeWasm() must be awaited first!");
6533                 }
6534                 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_err(e);
6535                 return nativeResponseValue;
6536         }
6537         // bool CResult_PrivateRouteCreationErrorZ_is_ok(const struct LDKCResult_PrivateRouteCreationErrorZ *NONNULL_PTR o);
6538         export function CResult_PrivateRouteCreationErrorZ_is_ok(o: number): boolean {
6539                 if(!isWasmInitialized) {
6540                         throw new Error("initializeWasm() must be awaited first!");
6541                 }
6542                 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_is_ok(o);
6543                 return nativeResponseValue;
6544         }
6545         // void CResult_PrivateRouteCreationErrorZ_free(struct LDKCResult_PrivateRouteCreationErrorZ _res);
6546         export function CResult_PrivateRouteCreationErrorZ_free(_res: number): void {
6547                 if(!isWasmInitialized) {
6548                         throw new Error("initializeWasm() must be awaited first!");
6549                 }
6550                 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_free(_res);
6551                 // debug statements here
6552         }
6553         // uint64_t CResult_PrivateRouteCreationErrorZ_clone_ptr(LDKCResult_PrivateRouteCreationErrorZ *NONNULL_PTR arg);
6554         export function CResult_PrivateRouteCreationErrorZ_clone_ptr(arg: number): number {
6555                 if(!isWasmInitialized) {
6556                         throw new Error("initializeWasm() must be awaited first!");
6557                 }
6558                 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_clone_ptr(arg);
6559                 return nativeResponseValue;
6560         }
6561         // struct LDKCResult_PrivateRouteCreationErrorZ CResult_PrivateRouteCreationErrorZ_clone(const struct LDKCResult_PrivateRouteCreationErrorZ *NONNULL_PTR orig);
6562         export function CResult_PrivateRouteCreationErrorZ_clone(orig: number): number {
6563                 if(!isWasmInitialized) {
6564                         throw new Error("initializeWasm() must be awaited first!");
6565                 }
6566                 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_clone(orig);
6567                 return nativeResponseValue;
6568         }
6569         // struct LDKCResult_StringErrorZ CResult_StringErrorZ_ok(struct LDKStr o);
6570         export function CResult_StringErrorZ_ok(o: String): number {
6571                 if(!isWasmInitialized) {
6572                         throw new Error("initializeWasm() must be awaited first!");
6573                 }
6574                 const nativeResponseValue = wasm.CResult_StringErrorZ_ok(o);
6575                 return nativeResponseValue;
6576         }
6577         // struct LDKCResult_StringErrorZ CResult_StringErrorZ_err(enum LDKSecp256k1Error e);
6578         export function CResult_StringErrorZ_err(e: Secp256k1Error): number {
6579                 if(!isWasmInitialized) {
6580                         throw new Error("initializeWasm() must be awaited first!");
6581                 }
6582                 const nativeResponseValue = wasm.CResult_StringErrorZ_err(e);
6583                 return nativeResponseValue;
6584         }
6585         // bool CResult_StringErrorZ_is_ok(const struct LDKCResult_StringErrorZ *NONNULL_PTR o);
6586         export function CResult_StringErrorZ_is_ok(o: number): boolean {
6587                 if(!isWasmInitialized) {
6588                         throw new Error("initializeWasm() must be awaited first!");
6589                 }
6590                 const nativeResponseValue = wasm.CResult_StringErrorZ_is_ok(o);
6591                 return nativeResponseValue;
6592         }
6593         // void CResult_StringErrorZ_free(struct LDKCResult_StringErrorZ _res);
6594         export function CResult_StringErrorZ_free(_res: number): void {
6595                 if(!isWasmInitialized) {
6596                         throw new Error("initializeWasm() must be awaited first!");
6597                 }
6598                 const nativeResponseValue = wasm.CResult_StringErrorZ_free(_res);
6599                 // debug statements here
6600         }
6601         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_ok(struct LDKChannelMonitorUpdate o);
6602         export function CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o: number): number {
6603                 if(!isWasmInitialized) {
6604                         throw new Error("initializeWasm() must be awaited first!");
6605                 }
6606                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o);
6607                 return nativeResponseValue;
6608         }
6609         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_err(struct LDKDecodeError e);
6610         export function CResult_ChannelMonitorUpdateDecodeErrorZ_err(e: number): number {
6611                 if(!isWasmInitialized) {
6612                         throw new Error("initializeWasm() must be awaited first!");
6613                 }
6614                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_err(e);
6615                 return nativeResponseValue;
6616         }
6617         // bool CResult_ChannelMonitorUpdateDecodeErrorZ_is_ok(const struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR o);
6618         export function CResult_ChannelMonitorUpdateDecodeErrorZ_is_ok(o: number): boolean {
6619                 if(!isWasmInitialized) {
6620                         throw new Error("initializeWasm() must be awaited first!");
6621                 }
6622                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_is_ok(o);
6623                 return nativeResponseValue;
6624         }
6625         // void CResult_ChannelMonitorUpdateDecodeErrorZ_free(struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ _res);
6626         export function CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res: number): void {
6627                 if(!isWasmInitialized) {
6628                         throw new Error("initializeWasm() must be awaited first!");
6629                 }
6630                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res);
6631                 // debug statements here
6632         }
6633         // uint64_t CResult_ChannelMonitorUpdateDecodeErrorZ_clone_ptr(LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR arg);
6634         export function CResult_ChannelMonitorUpdateDecodeErrorZ_clone_ptr(arg: number): number {
6635                 if(!isWasmInitialized) {
6636                         throw new Error("initializeWasm() must be awaited first!");
6637                 }
6638                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_clone_ptr(arg);
6639                 return nativeResponseValue;
6640         }
6641         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR orig);
6642         export function CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig: number): number {
6643                 if(!isWasmInitialized) {
6644                         throw new Error("initializeWasm() must be awaited first!");
6645                 }
6646                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig);
6647                 return nativeResponseValue;
6648         }
6649         // struct LDKCOption_MonitorEventZ COption_MonitorEventZ_some(struct LDKMonitorEvent o);
6650         export function COption_MonitorEventZ_some(o: number): number {
6651                 if(!isWasmInitialized) {
6652                         throw new Error("initializeWasm() must be awaited first!");
6653                 }
6654                 const nativeResponseValue = wasm.COption_MonitorEventZ_some(o);
6655                 return nativeResponseValue;
6656         }
6657         // struct LDKCOption_MonitorEventZ COption_MonitorEventZ_none(void);
6658         export function COption_MonitorEventZ_none(): number {
6659                 if(!isWasmInitialized) {
6660                         throw new Error("initializeWasm() must be awaited first!");
6661                 }
6662                 const nativeResponseValue = wasm.COption_MonitorEventZ_none();
6663                 return nativeResponseValue;
6664         }
6665         // void COption_MonitorEventZ_free(struct LDKCOption_MonitorEventZ _res);
6666         export function COption_MonitorEventZ_free(_res: number): void {
6667                 if(!isWasmInitialized) {
6668                         throw new Error("initializeWasm() must be awaited first!");
6669                 }
6670                 const nativeResponseValue = wasm.COption_MonitorEventZ_free(_res);
6671                 // debug statements here
6672         }
6673         // uint64_t COption_MonitorEventZ_clone_ptr(LDKCOption_MonitorEventZ *NONNULL_PTR arg);
6674         export function COption_MonitorEventZ_clone_ptr(arg: number): number {
6675                 if(!isWasmInitialized) {
6676                         throw new Error("initializeWasm() must be awaited first!");
6677                 }
6678                 const nativeResponseValue = wasm.COption_MonitorEventZ_clone_ptr(arg);
6679                 return nativeResponseValue;
6680         }
6681         // struct LDKCOption_MonitorEventZ COption_MonitorEventZ_clone(const struct LDKCOption_MonitorEventZ *NONNULL_PTR orig);
6682         export function COption_MonitorEventZ_clone(orig: number): number {
6683                 if(!isWasmInitialized) {
6684                         throw new Error("initializeWasm() must be awaited first!");
6685                 }
6686                 const nativeResponseValue = wasm.COption_MonitorEventZ_clone(orig);
6687                 return nativeResponseValue;
6688         }
6689         // struct LDKCResult_COption_MonitorEventZDecodeErrorZ CResult_COption_MonitorEventZDecodeErrorZ_ok(struct LDKCOption_MonitorEventZ o);
6690         export function CResult_COption_MonitorEventZDecodeErrorZ_ok(o: number): number {
6691                 if(!isWasmInitialized) {
6692                         throw new Error("initializeWasm() must be awaited first!");
6693                 }
6694                 const nativeResponseValue = wasm.CResult_COption_MonitorEventZDecodeErrorZ_ok(o);
6695                 return nativeResponseValue;
6696         }
6697         // struct LDKCResult_COption_MonitorEventZDecodeErrorZ CResult_COption_MonitorEventZDecodeErrorZ_err(struct LDKDecodeError e);
6698         export function CResult_COption_MonitorEventZDecodeErrorZ_err(e: number): number {
6699                 if(!isWasmInitialized) {
6700                         throw new Error("initializeWasm() must be awaited first!");
6701                 }
6702                 const nativeResponseValue = wasm.CResult_COption_MonitorEventZDecodeErrorZ_err(e);
6703                 return nativeResponseValue;
6704         }
6705         // bool CResult_COption_MonitorEventZDecodeErrorZ_is_ok(const struct LDKCResult_COption_MonitorEventZDecodeErrorZ *NONNULL_PTR o);
6706         export function CResult_COption_MonitorEventZDecodeErrorZ_is_ok(o: number): boolean {
6707                 if(!isWasmInitialized) {
6708                         throw new Error("initializeWasm() must be awaited first!");
6709                 }
6710                 const nativeResponseValue = wasm.CResult_COption_MonitorEventZDecodeErrorZ_is_ok(o);
6711                 return nativeResponseValue;
6712         }
6713         // void CResult_COption_MonitorEventZDecodeErrorZ_free(struct LDKCResult_COption_MonitorEventZDecodeErrorZ _res);
6714         export function CResult_COption_MonitorEventZDecodeErrorZ_free(_res: number): void {
6715                 if(!isWasmInitialized) {
6716                         throw new Error("initializeWasm() must be awaited first!");
6717                 }
6718                 const nativeResponseValue = wasm.CResult_COption_MonitorEventZDecodeErrorZ_free(_res);
6719                 // debug statements here
6720         }
6721         // uint64_t CResult_COption_MonitorEventZDecodeErrorZ_clone_ptr(LDKCResult_COption_MonitorEventZDecodeErrorZ *NONNULL_PTR arg);
6722         export function CResult_COption_MonitorEventZDecodeErrorZ_clone_ptr(arg: number): number {
6723                 if(!isWasmInitialized) {
6724                         throw new Error("initializeWasm() must be awaited first!");
6725                 }
6726                 const nativeResponseValue = wasm.CResult_COption_MonitorEventZDecodeErrorZ_clone_ptr(arg);
6727                 return nativeResponseValue;
6728         }
6729         // struct LDKCResult_COption_MonitorEventZDecodeErrorZ CResult_COption_MonitorEventZDecodeErrorZ_clone(const struct LDKCResult_COption_MonitorEventZDecodeErrorZ *NONNULL_PTR orig);
6730         export function CResult_COption_MonitorEventZDecodeErrorZ_clone(orig: number): number {
6731                 if(!isWasmInitialized) {
6732                         throw new Error("initializeWasm() must be awaited first!");
6733                 }
6734                 const nativeResponseValue = wasm.CResult_COption_MonitorEventZDecodeErrorZ_clone(orig);
6735                 return nativeResponseValue;
6736         }
6737         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_ok(struct LDKHTLCUpdate o);
6738         export function CResult_HTLCUpdateDecodeErrorZ_ok(o: number): number {
6739                 if(!isWasmInitialized) {
6740                         throw new Error("initializeWasm() must be awaited first!");
6741                 }
6742                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_ok(o);
6743                 return nativeResponseValue;
6744         }
6745         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_err(struct LDKDecodeError e);
6746         export function CResult_HTLCUpdateDecodeErrorZ_err(e: number): number {
6747                 if(!isWasmInitialized) {
6748                         throw new Error("initializeWasm() must be awaited first!");
6749                 }
6750                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_err(e);
6751                 return nativeResponseValue;
6752         }
6753         // bool CResult_HTLCUpdateDecodeErrorZ_is_ok(const struct LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR o);
6754         export function CResult_HTLCUpdateDecodeErrorZ_is_ok(o: number): boolean {
6755                 if(!isWasmInitialized) {
6756                         throw new Error("initializeWasm() must be awaited first!");
6757                 }
6758                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_is_ok(o);
6759                 return nativeResponseValue;
6760         }
6761         // void CResult_HTLCUpdateDecodeErrorZ_free(struct LDKCResult_HTLCUpdateDecodeErrorZ _res);
6762         export function CResult_HTLCUpdateDecodeErrorZ_free(_res: number): void {
6763                 if(!isWasmInitialized) {
6764                         throw new Error("initializeWasm() must be awaited first!");
6765                 }
6766                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_free(_res);
6767                 // debug statements here
6768         }
6769         // uint64_t CResult_HTLCUpdateDecodeErrorZ_clone_ptr(LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR arg);
6770         export function CResult_HTLCUpdateDecodeErrorZ_clone_ptr(arg: number): number {
6771                 if(!isWasmInitialized) {
6772                         throw new Error("initializeWasm() must be awaited first!");
6773                 }
6774                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_clone_ptr(arg);
6775                 return nativeResponseValue;
6776         }
6777         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_clone(const struct LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR orig);
6778         export function CResult_HTLCUpdateDecodeErrorZ_clone(orig: number): number {
6779                 if(!isWasmInitialized) {
6780                         throw new Error("initializeWasm() must be awaited first!");
6781                 }
6782                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_clone(orig);
6783                 return nativeResponseValue;
6784         }
6785         // uint64_t C2Tuple_OutPointScriptZ_clone_ptr(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR arg);
6786         export function C2Tuple_OutPointScriptZ_clone_ptr(arg: number): number {
6787                 if(!isWasmInitialized) {
6788                         throw new Error("initializeWasm() must be awaited first!");
6789                 }
6790                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_clone_ptr(arg);
6791                 return nativeResponseValue;
6792         }
6793         // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_clone(const struct LDKC2Tuple_OutPointScriptZ *NONNULL_PTR orig);
6794         export function C2Tuple_OutPointScriptZ_clone(orig: number): number {
6795                 if(!isWasmInitialized) {
6796                         throw new Error("initializeWasm() must be awaited first!");
6797                 }
6798                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_clone(orig);
6799                 return nativeResponseValue;
6800         }
6801         // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_new(struct LDKOutPoint a, struct LDKCVec_u8Z b);
6802         export function C2Tuple_OutPointScriptZ_new(a: number, b: Uint8Array): number {
6803                 if(!isWasmInitialized) {
6804                         throw new Error("initializeWasm() must be awaited first!");
6805                 }
6806                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_new(a, encodeArray(b));
6807                 return nativeResponseValue;
6808         }
6809         // void C2Tuple_OutPointScriptZ_free(struct LDKC2Tuple_OutPointScriptZ _res);
6810         export function C2Tuple_OutPointScriptZ_free(_res: number): void {
6811                 if(!isWasmInitialized) {
6812                         throw new Error("initializeWasm() must be awaited first!");
6813                 }
6814                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_free(_res);
6815                 // debug statements here
6816         }
6817         // uint64_t C2Tuple_u32ScriptZ_clone_ptr(LDKC2Tuple_u32ScriptZ *NONNULL_PTR arg);
6818         export function C2Tuple_u32ScriptZ_clone_ptr(arg: number): number {
6819                 if(!isWasmInitialized) {
6820                         throw new Error("initializeWasm() must be awaited first!");
6821                 }
6822                 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_clone_ptr(arg);
6823                 return nativeResponseValue;
6824         }
6825         // struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_clone(const struct LDKC2Tuple_u32ScriptZ *NONNULL_PTR orig);
6826         export function C2Tuple_u32ScriptZ_clone(orig: number): number {
6827                 if(!isWasmInitialized) {
6828                         throw new Error("initializeWasm() must be awaited first!");
6829                 }
6830                 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_clone(orig);
6831                 return nativeResponseValue;
6832         }
6833         // struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_new(uint32_t a, struct LDKCVec_u8Z b);
6834         export function C2Tuple_u32ScriptZ_new(a: number, b: Uint8Array): number {
6835                 if(!isWasmInitialized) {
6836                         throw new Error("initializeWasm() must be awaited first!");
6837                 }
6838                 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_new(a, encodeArray(b));
6839                 return nativeResponseValue;
6840         }
6841         // void C2Tuple_u32ScriptZ_free(struct LDKC2Tuple_u32ScriptZ _res);
6842         export function C2Tuple_u32ScriptZ_free(_res: number): void {
6843                 if(!isWasmInitialized) {
6844                         throw new Error("initializeWasm() must be awaited first!");
6845                 }
6846                 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_free(_res);
6847                 // debug statements here
6848         }
6849         // void CVec_C2Tuple_u32ScriptZZ_free(struct LDKCVec_C2Tuple_u32ScriptZZ _res);
6850         export function CVec_C2Tuple_u32ScriptZZ_free(_res: number[]): void {
6851                 if(!isWasmInitialized) {
6852                         throw new Error("initializeWasm() must be awaited first!");
6853                 }
6854                 const nativeResponseValue = wasm.CVec_C2Tuple_u32ScriptZZ_free(_res);
6855                 // debug statements here
6856         }
6857         // uint64_t C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone_ptr(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR arg);
6858         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone_ptr(arg: number): number {
6859                 if(!isWasmInitialized) {
6860                         throw new Error("initializeWasm() must be awaited first!");
6861                 }
6862                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone_ptr(arg);
6863                 return nativeResponseValue;
6864         }
6865         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(const struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR orig);
6866         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(orig: number): number {
6867                 if(!isWasmInitialized) {
6868                         throw new Error("initializeWasm() must be awaited first!");
6869                 }
6870                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(orig);
6871                 return nativeResponseValue;
6872         }
6873         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32ScriptZZ b);
6874         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(a: Uint8Array, b: number[]): number {
6875                 if(!isWasmInitialized) {
6876                         throw new Error("initializeWasm() must be awaited first!");
6877                 }
6878                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(encodeArray(a), b);
6879                 return nativeResponseValue;
6880         }
6881         // void C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ _res);
6882         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(_res: number): void {
6883                 if(!isWasmInitialized) {
6884                         throw new Error("initializeWasm() must be awaited first!");
6885                 }
6886                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(_res);
6887                 // debug statements here
6888         }
6889         // void CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ _res);
6890         export function CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res: number[]): void {
6891                 if(!isWasmInitialized) {
6892                         throw new Error("initializeWasm() must be awaited first!");
6893                 }
6894                 const nativeResponseValue = wasm.CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res);
6895                 // debug statements here
6896         }
6897         // void CVec_EventZ_free(struct LDKCVec_EventZ _res);
6898         export function CVec_EventZ_free(_res: number[]): void {
6899                 if(!isWasmInitialized) {
6900                         throw new Error("initializeWasm() must be awaited first!");
6901                 }
6902                 const nativeResponseValue = wasm.CVec_EventZ_free(_res);
6903                 // debug statements here
6904         }
6905         // void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res);
6906         export function CVec_TransactionZ_free(_res: Uint8Array[]): void {
6907                 if(!isWasmInitialized) {
6908                         throw new Error("initializeWasm() must be awaited first!");
6909                 }
6910                 const nativeResponseValue = wasm.CVec_TransactionZ_free(_res);
6911                 // debug statements here
6912         }
6913         // uint64_t C2Tuple_u32TxOutZ_clone_ptr(LDKC2Tuple_u32TxOutZ *NONNULL_PTR arg);
6914         export function C2Tuple_u32TxOutZ_clone_ptr(arg: number): number {
6915                 if(!isWasmInitialized) {
6916                         throw new Error("initializeWasm() must be awaited first!");
6917                 }
6918                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_clone_ptr(arg);
6919                 return nativeResponseValue;
6920         }
6921         // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_clone(const struct LDKC2Tuple_u32TxOutZ *NONNULL_PTR orig);
6922         export function C2Tuple_u32TxOutZ_clone(orig: number): number {
6923                 if(!isWasmInitialized) {
6924                         throw new Error("initializeWasm() must be awaited first!");
6925                 }
6926                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_clone(orig);
6927                 return nativeResponseValue;
6928         }
6929         // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_new(uint32_t a, struct LDKTxOut b);
6930         export function C2Tuple_u32TxOutZ_new(a: number, b: number): number {
6931                 if(!isWasmInitialized) {
6932                         throw new Error("initializeWasm() must be awaited first!");
6933                 }
6934                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_new(a, b);
6935                 return nativeResponseValue;
6936         }
6937         // void C2Tuple_u32TxOutZ_free(struct LDKC2Tuple_u32TxOutZ _res);
6938         export function C2Tuple_u32TxOutZ_free(_res: number): void {
6939                 if(!isWasmInitialized) {
6940                         throw new Error("initializeWasm() must be awaited first!");
6941                 }
6942                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_free(_res);
6943                 // debug statements here
6944         }
6945         // void CVec_C2Tuple_u32TxOutZZ_free(struct LDKCVec_C2Tuple_u32TxOutZZ _res);
6946         export function CVec_C2Tuple_u32TxOutZZ_free(_res: number[]): void {
6947                 if(!isWasmInitialized) {
6948                         throw new Error("initializeWasm() must be awaited first!");
6949                 }
6950                 const nativeResponseValue = wasm.CVec_C2Tuple_u32TxOutZZ_free(_res);
6951                 // debug statements here
6952         }
6953         // uint64_t C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone_ptr(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR arg);
6954         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone_ptr(arg: number): number {
6955                 if(!isWasmInitialized) {
6956                         throw new Error("initializeWasm() must be awaited first!");
6957                 }
6958                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone_ptr(arg);
6959                 return nativeResponseValue;
6960         }
6961         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(const struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR orig);
6962         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig: number): number {
6963                 if(!isWasmInitialized) {
6964                         throw new Error("initializeWasm() must be awaited first!");
6965                 }
6966                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig);
6967                 return nativeResponseValue;
6968         }
6969         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32TxOutZZ b);
6970         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a: Uint8Array, b: number[]): number {
6971                 if(!isWasmInitialized) {
6972                         throw new Error("initializeWasm() must be awaited first!");
6973                 }
6974                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(encodeArray(a), b);
6975                 return nativeResponseValue;
6976         }
6977         // void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res);
6978         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res: number): void {
6979                 if(!isWasmInitialized) {
6980                         throw new Error("initializeWasm() must be awaited first!");
6981                 }
6982                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res);
6983                 // debug statements here
6984         }
6985         // void CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ _res);
6986         export function CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res: number[]): void {
6987                 if(!isWasmInitialized) {
6988                         throw new Error("initializeWasm() must be awaited first!");
6989                 }
6990                 const nativeResponseValue = wasm.CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res);
6991                 // debug statements here
6992         }
6993         // void CVec_BalanceZ_free(struct LDKCVec_BalanceZ _res);
6994         export function CVec_BalanceZ_free(_res: number[]): void {
6995                 if(!isWasmInitialized) {
6996                         throw new Error("initializeWasm() must be awaited first!");
6997                 }
6998                 const nativeResponseValue = wasm.CVec_BalanceZ_free(_res);
6999                 // debug statements here
7000         }
7001         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelMonitorZ o);
7002         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o: number): number {
7003                 if(!isWasmInitialized) {
7004                         throw new Error("initializeWasm() must be awaited first!");
7005                 }
7006                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o);
7007                 return nativeResponseValue;
7008         }
7009         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(struct LDKDecodeError e);
7010         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e: number): number {
7011                 if(!isWasmInitialized) {
7012                         throw new Error("initializeWasm() must be awaited first!");
7013                 }
7014                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e);
7015                 return nativeResponseValue;
7016         }
7017         // bool CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_is_ok(const struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR o);
7018         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_is_ok(o: number): boolean {
7019                 if(!isWasmInitialized) {
7020                         throw new Error("initializeWasm() must be awaited first!");
7021                 }
7022                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_is_ok(o);
7023                 return nativeResponseValue;
7024         }
7025         // void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res);
7026         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res: number): void {
7027                 if(!isWasmInitialized) {
7028                         throw new Error("initializeWasm() must be awaited first!");
7029                 }
7030                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res);
7031                 // debug statements here
7032         }
7033         // uint64_t CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone_ptr(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR arg);
7034         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone_ptr(arg: number): number {
7035                 if(!isWasmInitialized) {
7036                         throw new Error("initializeWasm() must be awaited first!");
7037                 }
7038                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone_ptr(arg);
7039                 return nativeResponseValue;
7040         }
7041         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(const struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR orig);
7042         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(orig: number): number {
7043                 if(!isWasmInitialized) {
7044                         throw new Error("initializeWasm() must be awaited first!");
7045                 }
7046                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(orig);
7047                 return nativeResponseValue;
7048         }
7049         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_ok(void);
7050         export function CResult_NoneLightningErrorZ_ok(): number {
7051                 if(!isWasmInitialized) {
7052                         throw new Error("initializeWasm() must be awaited first!");
7053                 }
7054                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_ok();
7055                 return nativeResponseValue;
7056         }
7057         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_err(struct LDKLightningError e);
7058         export function CResult_NoneLightningErrorZ_err(e: number): number {
7059                 if(!isWasmInitialized) {
7060                         throw new Error("initializeWasm() must be awaited first!");
7061                 }
7062                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_err(e);
7063                 return nativeResponseValue;
7064         }
7065         // bool CResult_NoneLightningErrorZ_is_ok(const struct LDKCResult_NoneLightningErrorZ *NONNULL_PTR o);
7066         export function CResult_NoneLightningErrorZ_is_ok(o: number): boolean {
7067                 if(!isWasmInitialized) {
7068                         throw new Error("initializeWasm() must be awaited first!");
7069                 }
7070                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_is_ok(o);
7071                 return nativeResponseValue;
7072         }
7073         // void CResult_NoneLightningErrorZ_free(struct LDKCResult_NoneLightningErrorZ _res);
7074         export function CResult_NoneLightningErrorZ_free(_res: number): void {
7075                 if(!isWasmInitialized) {
7076                         throw new Error("initializeWasm() must be awaited first!");
7077                 }
7078                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_free(_res);
7079                 // debug statements here
7080         }
7081         // uint64_t CResult_NoneLightningErrorZ_clone_ptr(LDKCResult_NoneLightningErrorZ *NONNULL_PTR arg);
7082         export function CResult_NoneLightningErrorZ_clone_ptr(arg: number): number {
7083                 if(!isWasmInitialized) {
7084                         throw new Error("initializeWasm() must be awaited first!");
7085                 }
7086                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_clone_ptr(arg);
7087                 return nativeResponseValue;
7088         }
7089         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_clone(const struct LDKCResult_NoneLightningErrorZ *NONNULL_PTR orig);
7090         export function CResult_NoneLightningErrorZ_clone(orig: number): number {
7091                 if(!isWasmInitialized) {
7092                         throw new Error("initializeWasm() must be awaited first!");
7093                 }
7094                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_clone(orig);
7095                 return nativeResponseValue;
7096         }
7097         // uint64_t C2Tuple_PublicKeyTypeZ_clone_ptr(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR arg);
7098         export function C2Tuple_PublicKeyTypeZ_clone_ptr(arg: number): number {
7099                 if(!isWasmInitialized) {
7100                         throw new Error("initializeWasm() must be awaited first!");
7101                 }
7102                 const nativeResponseValue = wasm.C2Tuple_PublicKeyTypeZ_clone_ptr(arg);
7103                 return nativeResponseValue;
7104         }
7105         // struct LDKC2Tuple_PublicKeyTypeZ C2Tuple_PublicKeyTypeZ_clone(const struct LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR orig);
7106         export function C2Tuple_PublicKeyTypeZ_clone(orig: number): number {
7107                 if(!isWasmInitialized) {
7108                         throw new Error("initializeWasm() must be awaited first!");
7109                 }
7110                 const nativeResponseValue = wasm.C2Tuple_PublicKeyTypeZ_clone(orig);
7111                 return nativeResponseValue;
7112         }
7113         // struct LDKC2Tuple_PublicKeyTypeZ C2Tuple_PublicKeyTypeZ_new(struct LDKPublicKey a, struct LDKType b);
7114         export function C2Tuple_PublicKeyTypeZ_new(a: Uint8Array, b: number): number {
7115                 if(!isWasmInitialized) {
7116                         throw new Error("initializeWasm() must be awaited first!");
7117                 }
7118                 const nativeResponseValue = wasm.C2Tuple_PublicKeyTypeZ_new(encodeArray(a), b);
7119                 return nativeResponseValue;
7120         }
7121         // void C2Tuple_PublicKeyTypeZ_free(struct LDKC2Tuple_PublicKeyTypeZ _res);
7122         export function C2Tuple_PublicKeyTypeZ_free(_res: number): void {
7123                 if(!isWasmInitialized) {
7124                         throw new Error("initializeWasm() must be awaited first!");
7125                 }
7126                 const nativeResponseValue = wasm.C2Tuple_PublicKeyTypeZ_free(_res);
7127                 // debug statements here
7128         }
7129         // void CVec_C2Tuple_PublicKeyTypeZZ_free(struct LDKCVec_C2Tuple_PublicKeyTypeZZ _res);
7130         export function CVec_C2Tuple_PublicKeyTypeZZ_free(_res: number[]): void {
7131                 if(!isWasmInitialized) {
7132                         throw new Error("initializeWasm() must be awaited first!");
7133                 }
7134                 const nativeResponseValue = wasm.CVec_C2Tuple_PublicKeyTypeZZ_free(_res);
7135                 // debug statements here
7136         }
7137         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_ok(bool o);
7138         export function CResult_boolLightningErrorZ_ok(o: boolean): number {
7139                 if(!isWasmInitialized) {
7140                         throw new Error("initializeWasm() must be awaited first!");
7141                 }
7142                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_ok(o);
7143                 return nativeResponseValue;
7144         }
7145         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_err(struct LDKLightningError e);
7146         export function CResult_boolLightningErrorZ_err(e: number): number {
7147                 if(!isWasmInitialized) {
7148                         throw new Error("initializeWasm() must be awaited first!");
7149                 }
7150                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_err(e);
7151                 return nativeResponseValue;
7152         }
7153         // bool CResult_boolLightningErrorZ_is_ok(const struct LDKCResult_boolLightningErrorZ *NONNULL_PTR o);
7154         export function CResult_boolLightningErrorZ_is_ok(o: number): boolean {
7155                 if(!isWasmInitialized) {
7156                         throw new Error("initializeWasm() must be awaited first!");
7157                 }
7158                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_is_ok(o);
7159                 return nativeResponseValue;
7160         }
7161         // void CResult_boolLightningErrorZ_free(struct LDKCResult_boolLightningErrorZ _res);
7162         export function CResult_boolLightningErrorZ_free(_res: number): void {
7163                 if(!isWasmInitialized) {
7164                         throw new Error("initializeWasm() must be awaited first!");
7165                 }
7166                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_free(_res);
7167                 // debug statements here
7168         }
7169         // uint64_t CResult_boolLightningErrorZ_clone_ptr(LDKCResult_boolLightningErrorZ *NONNULL_PTR arg);
7170         export function CResult_boolLightningErrorZ_clone_ptr(arg: number): number {
7171                 if(!isWasmInitialized) {
7172                         throw new Error("initializeWasm() must be awaited first!");
7173                 }
7174                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_clone_ptr(arg);
7175                 return nativeResponseValue;
7176         }
7177         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_clone(const struct LDKCResult_boolLightningErrorZ *NONNULL_PTR orig);
7178         export function CResult_boolLightningErrorZ_clone(orig: number): number {
7179                 if(!isWasmInitialized) {
7180                         throw new Error("initializeWasm() must be awaited first!");
7181                 }
7182                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_clone(orig);
7183                 return nativeResponseValue;
7184         }
7185         // uint64_t C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone_ptr(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR arg);
7186         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone_ptr(arg: number): number {
7187                 if(!isWasmInitialized) {
7188                         throw new Error("initializeWasm() must be awaited first!");
7189                 }
7190                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone_ptr(arg);
7191                 return nativeResponseValue;
7192         }
7193         // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(const struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR orig);
7194         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig: number): number {
7195                 if(!isWasmInitialized) {
7196                         throw new Error("initializeWasm() must be awaited first!");
7197                 }
7198                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig);
7199                 return nativeResponseValue;
7200         }
7201         // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(struct LDKChannelAnnouncement a, struct LDKChannelUpdate b, struct LDKChannelUpdate c);
7202         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a: number, b: number, c: number): number {
7203                 if(!isWasmInitialized) {
7204                         throw new Error("initializeWasm() must be awaited first!");
7205                 }
7206                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a, b, c);
7207                 return nativeResponseValue;
7208         }
7209         // void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res);
7210         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res: number): void {
7211                 if(!isWasmInitialized) {
7212                         throw new Error("initializeWasm() must be awaited first!");
7213                 }
7214                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res);
7215                 // debug statements here
7216         }
7217         // void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res);
7218         export function CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res: number[]): void {
7219                 if(!isWasmInitialized) {
7220                         throw new Error("initializeWasm() must be awaited first!");
7221                 }
7222                 const nativeResponseValue = wasm.CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res);
7223                 // debug statements here
7224         }
7225         // void CVec_NodeAnnouncementZ_free(struct LDKCVec_NodeAnnouncementZ _res);
7226         export function CVec_NodeAnnouncementZ_free(_res: number[]): void {
7227                 if(!isWasmInitialized) {
7228                         throw new Error("initializeWasm() must be awaited first!");
7229                 }
7230                 const nativeResponseValue = wasm.CVec_NodeAnnouncementZ_free(_res);
7231                 // debug statements here
7232         }
7233         // void CVec_PublicKeyZ_free(struct LDKCVec_PublicKeyZ _res);
7234         export function CVec_PublicKeyZ_free(_res: Uint8Array[]): void {
7235                 if(!isWasmInitialized) {
7236                         throw new Error("initializeWasm() must be awaited first!");
7237                 }
7238                 const nativeResponseValue = wasm.CVec_PublicKeyZ_free(_res);
7239                 // debug statements here
7240         }
7241         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_ok(struct LDKCVec_u8Z o);
7242         export function CResult_CVec_u8ZPeerHandleErrorZ_ok(o: Uint8Array): number {
7243                 if(!isWasmInitialized) {
7244                         throw new Error("initializeWasm() must be awaited first!");
7245                 }
7246                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_ok(encodeArray(o));
7247                 return nativeResponseValue;
7248         }
7249         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_err(struct LDKPeerHandleError e);
7250         export function CResult_CVec_u8ZPeerHandleErrorZ_err(e: number): number {
7251                 if(!isWasmInitialized) {
7252                         throw new Error("initializeWasm() must be awaited first!");
7253                 }
7254                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_err(e);
7255                 return nativeResponseValue;
7256         }
7257         // bool CResult_CVec_u8ZPeerHandleErrorZ_is_ok(const struct LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR o);
7258         export function CResult_CVec_u8ZPeerHandleErrorZ_is_ok(o: number): boolean {
7259                 if(!isWasmInitialized) {
7260                         throw new Error("initializeWasm() must be awaited first!");
7261                 }
7262                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_is_ok(o);
7263                 return nativeResponseValue;
7264         }
7265         // void CResult_CVec_u8ZPeerHandleErrorZ_free(struct LDKCResult_CVec_u8ZPeerHandleErrorZ _res);
7266         export function CResult_CVec_u8ZPeerHandleErrorZ_free(_res: number): void {
7267                 if(!isWasmInitialized) {
7268                         throw new Error("initializeWasm() must be awaited first!");
7269                 }
7270                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_free(_res);
7271                 // debug statements here
7272         }
7273         // uint64_t CResult_CVec_u8ZPeerHandleErrorZ_clone_ptr(LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR arg);
7274         export function CResult_CVec_u8ZPeerHandleErrorZ_clone_ptr(arg: number): number {
7275                 if(!isWasmInitialized) {
7276                         throw new Error("initializeWasm() must be awaited first!");
7277                 }
7278                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_clone_ptr(arg);
7279                 return nativeResponseValue;
7280         }
7281         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_clone(const struct LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR orig);
7282         export function CResult_CVec_u8ZPeerHandleErrorZ_clone(orig: number): number {
7283                 if(!isWasmInitialized) {
7284                         throw new Error("initializeWasm() must be awaited first!");
7285                 }
7286                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_clone(orig);
7287                 return nativeResponseValue;
7288         }
7289         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_ok(void);
7290         export function CResult_NonePeerHandleErrorZ_ok(): number {
7291                 if(!isWasmInitialized) {
7292                         throw new Error("initializeWasm() must be awaited first!");
7293                 }
7294                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_ok();
7295                 return nativeResponseValue;
7296         }
7297         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_err(struct LDKPeerHandleError e);
7298         export function CResult_NonePeerHandleErrorZ_err(e: number): number {
7299                 if(!isWasmInitialized) {
7300                         throw new Error("initializeWasm() must be awaited first!");
7301                 }
7302                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_err(e);
7303                 return nativeResponseValue;
7304         }
7305         // bool CResult_NonePeerHandleErrorZ_is_ok(const struct LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR o);
7306         export function CResult_NonePeerHandleErrorZ_is_ok(o: number): boolean {
7307                 if(!isWasmInitialized) {
7308                         throw new Error("initializeWasm() must be awaited first!");
7309                 }
7310                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_is_ok(o);
7311                 return nativeResponseValue;
7312         }
7313         // void CResult_NonePeerHandleErrorZ_free(struct LDKCResult_NonePeerHandleErrorZ _res);
7314         export function CResult_NonePeerHandleErrorZ_free(_res: number): void {
7315                 if(!isWasmInitialized) {
7316                         throw new Error("initializeWasm() must be awaited first!");
7317                 }
7318                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_free(_res);
7319                 // debug statements here
7320         }
7321         // uint64_t CResult_NonePeerHandleErrorZ_clone_ptr(LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR arg);
7322         export function CResult_NonePeerHandleErrorZ_clone_ptr(arg: number): number {
7323                 if(!isWasmInitialized) {
7324                         throw new Error("initializeWasm() must be awaited first!");
7325                 }
7326                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_clone_ptr(arg);
7327                 return nativeResponseValue;
7328         }
7329         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_clone(const struct LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR orig);
7330         export function CResult_NonePeerHandleErrorZ_clone(orig: number): number {
7331                 if(!isWasmInitialized) {
7332                         throw new Error("initializeWasm() must be awaited first!");
7333                 }
7334                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_clone(orig);
7335                 return nativeResponseValue;
7336         }
7337         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_ok(bool o);
7338         export function CResult_boolPeerHandleErrorZ_ok(o: boolean): number {
7339                 if(!isWasmInitialized) {
7340                         throw new Error("initializeWasm() must be awaited first!");
7341                 }
7342                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_ok(o);
7343                 return nativeResponseValue;
7344         }
7345         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_err(struct LDKPeerHandleError e);
7346         export function CResult_boolPeerHandleErrorZ_err(e: number): number {
7347                 if(!isWasmInitialized) {
7348                         throw new Error("initializeWasm() must be awaited first!");
7349                 }
7350                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_err(e);
7351                 return nativeResponseValue;
7352         }
7353         // bool CResult_boolPeerHandleErrorZ_is_ok(const struct LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR o);
7354         export function CResult_boolPeerHandleErrorZ_is_ok(o: number): boolean {
7355                 if(!isWasmInitialized) {
7356                         throw new Error("initializeWasm() must be awaited first!");
7357                 }
7358                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_is_ok(o);
7359                 return nativeResponseValue;
7360         }
7361         // void CResult_boolPeerHandleErrorZ_free(struct LDKCResult_boolPeerHandleErrorZ _res);
7362         export function CResult_boolPeerHandleErrorZ_free(_res: number): void {
7363                 if(!isWasmInitialized) {
7364                         throw new Error("initializeWasm() must be awaited first!");
7365                 }
7366                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_free(_res);
7367                 // debug statements here
7368         }
7369         // uint64_t CResult_boolPeerHandleErrorZ_clone_ptr(LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR arg);
7370         export function CResult_boolPeerHandleErrorZ_clone_ptr(arg: number): number {
7371                 if(!isWasmInitialized) {
7372                         throw new Error("initializeWasm() must be awaited first!");
7373                 }
7374                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_clone_ptr(arg);
7375                 return nativeResponseValue;
7376         }
7377         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_clone(const struct LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR orig);
7378         export function CResult_boolPeerHandleErrorZ_clone(orig: number): number {
7379                 if(!isWasmInitialized) {
7380                         throw new Error("initializeWasm() must be awaited first!");
7381                 }
7382                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_clone(orig);
7383                 return nativeResponseValue;
7384         }
7385         // struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_ok(struct LDKNodeId o);
7386         export function CResult_NodeIdDecodeErrorZ_ok(o: number): number {
7387                 if(!isWasmInitialized) {
7388                         throw new Error("initializeWasm() must be awaited first!");
7389                 }
7390                 const nativeResponseValue = wasm.CResult_NodeIdDecodeErrorZ_ok(o);
7391                 return nativeResponseValue;
7392         }
7393         // struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_err(struct LDKDecodeError e);
7394         export function CResult_NodeIdDecodeErrorZ_err(e: number): number {
7395                 if(!isWasmInitialized) {
7396                         throw new Error("initializeWasm() must be awaited first!");
7397                 }
7398                 const nativeResponseValue = wasm.CResult_NodeIdDecodeErrorZ_err(e);
7399                 return nativeResponseValue;
7400         }
7401         // bool CResult_NodeIdDecodeErrorZ_is_ok(const struct LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR o);
7402         export function CResult_NodeIdDecodeErrorZ_is_ok(o: number): boolean {
7403                 if(!isWasmInitialized) {
7404                         throw new Error("initializeWasm() must be awaited first!");
7405                 }
7406                 const nativeResponseValue = wasm.CResult_NodeIdDecodeErrorZ_is_ok(o);
7407                 return nativeResponseValue;
7408         }
7409         // void CResult_NodeIdDecodeErrorZ_free(struct LDKCResult_NodeIdDecodeErrorZ _res);
7410         export function CResult_NodeIdDecodeErrorZ_free(_res: number): void {
7411                 if(!isWasmInitialized) {
7412                         throw new Error("initializeWasm() must be awaited first!");
7413                 }
7414                 const nativeResponseValue = wasm.CResult_NodeIdDecodeErrorZ_free(_res);
7415                 // debug statements here
7416         }
7417         // uint64_t CResult_NodeIdDecodeErrorZ_clone_ptr(LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR arg);
7418         export function CResult_NodeIdDecodeErrorZ_clone_ptr(arg: number): number {
7419                 if(!isWasmInitialized) {
7420                         throw new Error("initializeWasm() must be awaited first!");
7421                 }
7422                 const nativeResponseValue = wasm.CResult_NodeIdDecodeErrorZ_clone_ptr(arg);
7423                 return nativeResponseValue;
7424         }
7425         // struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_clone(const struct LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR orig);
7426         export function CResult_NodeIdDecodeErrorZ_clone(orig: number): number {
7427                 if(!isWasmInitialized) {
7428                         throw new Error("initializeWasm() must be awaited first!");
7429                 }
7430                 const nativeResponseValue = wasm.CResult_NodeIdDecodeErrorZ_clone(orig);
7431                 return nativeResponseValue;
7432         }
7433         // struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ CResult_COption_NetworkUpdateZDecodeErrorZ_ok(struct LDKCOption_NetworkUpdateZ o);
7434         export function CResult_COption_NetworkUpdateZDecodeErrorZ_ok(o: number): number {
7435                 if(!isWasmInitialized) {
7436                         throw new Error("initializeWasm() must be awaited first!");
7437                 }
7438                 const nativeResponseValue = wasm.CResult_COption_NetworkUpdateZDecodeErrorZ_ok(o);
7439                 return nativeResponseValue;
7440         }
7441         // struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ CResult_COption_NetworkUpdateZDecodeErrorZ_err(struct LDKDecodeError e);
7442         export function CResult_COption_NetworkUpdateZDecodeErrorZ_err(e: number): number {
7443                 if(!isWasmInitialized) {
7444                         throw new Error("initializeWasm() must be awaited first!");
7445                 }
7446                 const nativeResponseValue = wasm.CResult_COption_NetworkUpdateZDecodeErrorZ_err(e);
7447                 return nativeResponseValue;
7448         }
7449         // bool CResult_COption_NetworkUpdateZDecodeErrorZ_is_ok(const struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ *NONNULL_PTR o);
7450         export function CResult_COption_NetworkUpdateZDecodeErrorZ_is_ok(o: number): boolean {
7451                 if(!isWasmInitialized) {
7452                         throw new Error("initializeWasm() must be awaited first!");
7453                 }
7454                 const nativeResponseValue = wasm.CResult_COption_NetworkUpdateZDecodeErrorZ_is_ok(o);
7455                 return nativeResponseValue;
7456         }
7457         // void CResult_COption_NetworkUpdateZDecodeErrorZ_free(struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ _res);
7458         export function CResult_COption_NetworkUpdateZDecodeErrorZ_free(_res: number): void {
7459                 if(!isWasmInitialized) {
7460                         throw new Error("initializeWasm() must be awaited first!");
7461                 }
7462                 const nativeResponseValue = wasm.CResult_COption_NetworkUpdateZDecodeErrorZ_free(_res);
7463                 // debug statements here
7464         }
7465         // uint64_t CResult_COption_NetworkUpdateZDecodeErrorZ_clone_ptr(LDKCResult_COption_NetworkUpdateZDecodeErrorZ *NONNULL_PTR arg);
7466         export function CResult_COption_NetworkUpdateZDecodeErrorZ_clone_ptr(arg: number): number {
7467                 if(!isWasmInitialized) {
7468                         throw new Error("initializeWasm() must be awaited first!");
7469                 }
7470                 const nativeResponseValue = wasm.CResult_COption_NetworkUpdateZDecodeErrorZ_clone_ptr(arg);
7471                 return nativeResponseValue;
7472         }
7473         // struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ CResult_COption_NetworkUpdateZDecodeErrorZ_clone(const struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ *NONNULL_PTR orig);
7474         export function CResult_COption_NetworkUpdateZDecodeErrorZ_clone(orig: number): number {
7475                 if(!isWasmInitialized) {
7476                         throw new Error("initializeWasm() must be awaited first!");
7477                 }
7478                 const nativeResponseValue = wasm.CResult_COption_NetworkUpdateZDecodeErrorZ_clone(orig);
7479                 return nativeResponseValue;
7480         }
7481         // struct LDKCOption_AccessZ COption_AccessZ_some(struct LDKAccess o);
7482         export function COption_AccessZ_some(o: number): number {
7483                 if(!isWasmInitialized) {
7484                         throw new Error("initializeWasm() must be awaited first!");
7485                 }
7486                 const nativeResponseValue = wasm.COption_AccessZ_some(o);
7487                 return nativeResponseValue;
7488         }
7489         // struct LDKCOption_AccessZ COption_AccessZ_none(void);
7490         export function COption_AccessZ_none(): number {
7491                 if(!isWasmInitialized) {
7492                         throw new Error("initializeWasm() must be awaited first!");
7493                 }
7494                 const nativeResponseValue = wasm.COption_AccessZ_none();
7495                 return nativeResponseValue;
7496         }
7497         // void COption_AccessZ_free(struct LDKCOption_AccessZ _res);
7498         export function COption_AccessZ_free(_res: number): void {
7499                 if(!isWasmInitialized) {
7500                         throw new Error("initializeWasm() must be awaited first!");
7501                 }
7502                 const nativeResponseValue = wasm.COption_AccessZ_free(_res);
7503                 // debug statements here
7504         }
7505         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_ok(struct LDKDirectionalChannelInfo o);
7506         export function CResult_DirectionalChannelInfoDecodeErrorZ_ok(o: number): number {
7507                 if(!isWasmInitialized) {
7508                         throw new Error("initializeWasm() must be awaited first!");
7509                 }
7510                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_ok(o);
7511                 return nativeResponseValue;
7512         }
7513         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
7514         export function CResult_DirectionalChannelInfoDecodeErrorZ_err(e: number): number {
7515                 if(!isWasmInitialized) {
7516                         throw new Error("initializeWasm() must be awaited first!");
7517                 }
7518                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_err(e);
7519                 return nativeResponseValue;
7520         }
7521         // bool CResult_DirectionalChannelInfoDecodeErrorZ_is_ok(const struct LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR o);
7522         export function CResult_DirectionalChannelInfoDecodeErrorZ_is_ok(o: number): boolean {
7523                 if(!isWasmInitialized) {
7524                         throw new Error("initializeWasm() must be awaited first!");
7525                 }
7526                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_is_ok(o);
7527                 return nativeResponseValue;
7528         }
7529         // void CResult_DirectionalChannelInfoDecodeErrorZ_free(struct LDKCResult_DirectionalChannelInfoDecodeErrorZ _res);
7530         export function CResult_DirectionalChannelInfoDecodeErrorZ_free(_res: number): void {
7531                 if(!isWasmInitialized) {
7532                         throw new Error("initializeWasm() must be awaited first!");
7533                 }
7534                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_free(_res);
7535                 // debug statements here
7536         }
7537         // uint64_t CResult_DirectionalChannelInfoDecodeErrorZ_clone_ptr(LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR arg);
7538         export function CResult_DirectionalChannelInfoDecodeErrorZ_clone_ptr(arg: number): number {
7539                 if(!isWasmInitialized) {
7540                         throw new Error("initializeWasm() must be awaited first!");
7541                 }
7542                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_clone_ptr(arg);
7543                 return nativeResponseValue;
7544         }
7545         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_clone(const struct LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR orig);
7546         export function CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig: number): number {
7547                 if(!isWasmInitialized) {
7548                         throw new Error("initializeWasm() must be awaited first!");
7549                 }
7550                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig);
7551                 return nativeResponseValue;
7552         }
7553         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_ok(struct LDKChannelInfo o);
7554         export function CResult_ChannelInfoDecodeErrorZ_ok(o: number): number {
7555                 if(!isWasmInitialized) {
7556                         throw new Error("initializeWasm() must be awaited first!");
7557                 }
7558                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_ok(o);
7559                 return nativeResponseValue;
7560         }
7561         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
7562         export function CResult_ChannelInfoDecodeErrorZ_err(e: number): number {
7563                 if(!isWasmInitialized) {
7564                         throw new Error("initializeWasm() must be awaited first!");
7565                 }
7566                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_err(e);
7567                 return nativeResponseValue;
7568         }
7569         // bool CResult_ChannelInfoDecodeErrorZ_is_ok(const struct LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR o);
7570         export function CResult_ChannelInfoDecodeErrorZ_is_ok(o: number): boolean {
7571                 if(!isWasmInitialized) {
7572                         throw new Error("initializeWasm() must be awaited first!");
7573                 }
7574                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_is_ok(o);
7575                 return nativeResponseValue;
7576         }
7577         // void CResult_ChannelInfoDecodeErrorZ_free(struct LDKCResult_ChannelInfoDecodeErrorZ _res);
7578         export function CResult_ChannelInfoDecodeErrorZ_free(_res: number): void {
7579                 if(!isWasmInitialized) {
7580                         throw new Error("initializeWasm() must be awaited first!");
7581                 }
7582                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_free(_res);
7583                 // debug statements here
7584         }
7585         // uint64_t CResult_ChannelInfoDecodeErrorZ_clone_ptr(LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR arg);
7586         export function CResult_ChannelInfoDecodeErrorZ_clone_ptr(arg: number): number {
7587                 if(!isWasmInitialized) {
7588                         throw new Error("initializeWasm() must be awaited first!");
7589                 }
7590                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_clone_ptr(arg);
7591                 return nativeResponseValue;
7592         }
7593         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_clone(const struct LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR orig);
7594         export function CResult_ChannelInfoDecodeErrorZ_clone(orig: number): number {
7595                 if(!isWasmInitialized) {
7596                         throw new Error("initializeWasm() must be awaited first!");
7597                 }
7598                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_clone(orig);
7599                 return nativeResponseValue;
7600         }
7601         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_ok(struct LDKRoutingFees o);
7602         export function CResult_RoutingFeesDecodeErrorZ_ok(o: number): number {
7603                 if(!isWasmInitialized) {
7604                         throw new Error("initializeWasm() must be awaited first!");
7605                 }
7606                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_ok(o);
7607                 return nativeResponseValue;
7608         }
7609         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_err(struct LDKDecodeError e);
7610         export function CResult_RoutingFeesDecodeErrorZ_err(e: number): number {
7611                 if(!isWasmInitialized) {
7612                         throw new Error("initializeWasm() must be awaited first!");
7613                 }
7614                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_err(e);
7615                 return nativeResponseValue;
7616         }
7617         // bool CResult_RoutingFeesDecodeErrorZ_is_ok(const struct LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR o);
7618         export function CResult_RoutingFeesDecodeErrorZ_is_ok(o: number): boolean {
7619                 if(!isWasmInitialized) {
7620                         throw new Error("initializeWasm() must be awaited first!");
7621                 }
7622                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_is_ok(o);
7623                 return nativeResponseValue;
7624         }
7625         // void CResult_RoutingFeesDecodeErrorZ_free(struct LDKCResult_RoutingFeesDecodeErrorZ _res);
7626         export function CResult_RoutingFeesDecodeErrorZ_free(_res: number): void {
7627                 if(!isWasmInitialized) {
7628                         throw new Error("initializeWasm() must be awaited first!");
7629                 }
7630                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_free(_res);
7631                 // debug statements here
7632         }
7633         // uint64_t CResult_RoutingFeesDecodeErrorZ_clone_ptr(LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR arg);
7634         export function CResult_RoutingFeesDecodeErrorZ_clone_ptr(arg: number): number {
7635                 if(!isWasmInitialized) {
7636                         throw new Error("initializeWasm() must be awaited first!");
7637                 }
7638                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_clone_ptr(arg);
7639                 return nativeResponseValue;
7640         }
7641         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_clone(const struct LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR orig);
7642         export function CResult_RoutingFeesDecodeErrorZ_clone(orig: number): number {
7643                 if(!isWasmInitialized) {
7644                         throw new Error("initializeWasm() must be awaited first!");
7645                 }
7646                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_clone(orig);
7647                 return nativeResponseValue;
7648         }
7649         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_ok(struct LDKNodeAnnouncementInfo o);
7650         export function CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o: number): number {
7651                 if(!isWasmInitialized) {
7652                         throw new Error("initializeWasm() must be awaited first!");
7653                 }
7654                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o);
7655                 return nativeResponseValue;
7656         }
7657         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_err(struct LDKDecodeError e);
7658         export function CResult_NodeAnnouncementInfoDecodeErrorZ_err(e: number): number {
7659                 if(!isWasmInitialized) {
7660                         throw new Error("initializeWasm() must be awaited first!");
7661                 }
7662                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_err(e);
7663                 return nativeResponseValue;
7664         }
7665         // bool CResult_NodeAnnouncementInfoDecodeErrorZ_is_ok(const struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR o);
7666         export function CResult_NodeAnnouncementInfoDecodeErrorZ_is_ok(o: number): boolean {
7667                 if(!isWasmInitialized) {
7668                         throw new Error("initializeWasm() must be awaited first!");
7669                 }
7670                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_is_ok(o);
7671                 return nativeResponseValue;
7672         }
7673         // void CResult_NodeAnnouncementInfoDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res);
7674         export function CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res: number): void {
7675                 if(!isWasmInitialized) {
7676                         throw new Error("initializeWasm() must be awaited first!");
7677                 }
7678                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res);
7679                 // debug statements here
7680         }
7681         // uint64_t CResult_NodeAnnouncementInfoDecodeErrorZ_clone_ptr(LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR arg);
7682         export function CResult_NodeAnnouncementInfoDecodeErrorZ_clone_ptr(arg: number): number {
7683                 if(!isWasmInitialized) {
7684                         throw new Error("initializeWasm() must be awaited first!");
7685                 }
7686                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_clone_ptr(arg);
7687                 return nativeResponseValue;
7688         }
7689         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR orig);
7690         export function CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig: number): number {
7691                 if(!isWasmInitialized) {
7692                         throw new Error("initializeWasm() must be awaited first!");
7693                 }
7694                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig);
7695                 return nativeResponseValue;
7696         }
7697         // void CVec_u64Z_free(struct LDKCVec_u64Z _res);
7698         export function CVec_u64Z_free(_res: number[]): void {
7699                 if(!isWasmInitialized) {
7700                         throw new Error("initializeWasm() must be awaited first!");
7701                 }
7702                 const nativeResponseValue = wasm.CVec_u64Z_free(_res);
7703                 // debug statements here
7704         }
7705         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_ok(struct LDKNodeInfo o);
7706         export function CResult_NodeInfoDecodeErrorZ_ok(o: number): number {
7707                 if(!isWasmInitialized) {
7708                         throw new Error("initializeWasm() must be awaited first!");
7709                 }
7710                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_ok(o);
7711                 return nativeResponseValue;
7712         }
7713         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_err(struct LDKDecodeError e);
7714         export function CResult_NodeInfoDecodeErrorZ_err(e: number): number {
7715                 if(!isWasmInitialized) {
7716                         throw new Error("initializeWasm() must be awaited first!");
7717                 }
7718                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_err(e);
7719                 return nativeResponseValue;
7720         }
7721         // bool CResult_NodeInfoDecodeErrorZ_is_ok(const struct LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR o);
7722         export function CResult_NodeInfoDecodeErrorZ_is_ok(o: number): boolean {
7723                 if(!isWasmInitialized) {
7724                         throw new Error("initializeWasm() must be awaited first!");
7725                 }
7726                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_is_ok(o);
7727                 return nativeResponseValue;
7728         }
7729         // void CResult_NodeInfoDecodeErrorZ_free(struct LDKCResult_NodeInfoDecodeErrorZ _res);
7730         export function CResult_NodeInfoDecodeErrorZ_free(_res: number): void {
7731                 if(!isWasmInitialized) {
7732                         throw new Error("initializeWasm() must be awaited first!");
7733                 }
7734                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_free(_res);
7735                 // debug statements here
7736         }
7737         // uint64_t CResult_NodeInfoDecodeErrorZ_clone_ptr(LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR arg);
7738         export function CResult_NodeInfoDecodeErrorZ_clone_ptr(arg: number): number {
7739                 if(!isWasmInitialized) {
7740                         throw new Error("initializeWasm() must be awaited first!");
7741                 }
7742                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_clone_ptr(arg);
7743                 return nativeResponseValue;
7744         }
7745         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_clone(const struct LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR orig);
7746         export function CResult_NodeInfoDecodeErrorZ_clone(orig: number): number {
7747                 if(!isWasmInitialized) {
7748                         throw new Error("initializeWasm() must be awaited first!");
7749                 }
7750                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_clone(orig);
7751                 return nativeResponseValue;
7752         }
7753         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_ok(struct LDKNetworkGraph o);
7754         export function CResult_NetworkGraphDecodeErrorZ_ok(o: number): number {
7755                 if(!isWasmInitialized) {
7756                         throw new Error("initializeWasm() must be awaited first!");
7757                 }
7758                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_ok(o);
7759                 return nativeResponseValue;
7760         }
7761         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_err(struct LDKDecodeError e);
7762         export function CResult_NetworkGraphDecodeErrorZ_err(e: number): number {
7763                 if(!isWasmInitialized) {
7764                         throw new Error("initializeWasm() must be awaited first!");
7765                 }
7766                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_err(e);
7767                 return nativeResponseValue;
7768         }
7769         // bool CResult_NetworkGraphDecodeErrorZ_is_ok(const struct LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR o);
7770         export function CResult_NetworkGraphDecodeErrorZ_is_ok(o: number): boolean {
7771                 if(!isWasmInitialized) {
7772                         throw new Error("initializeWasm() must be awaited first!");
7773                 }
7774                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_is_ok(o);
7775                 return nativeResponseValue;
7776         }
7777         // void CResult_NetworkGraphDecodeErrorZ_free(struct LDKCResult_NetworkGraphDecodeErrorZ _res);
7778         export function CResult_NetworkGraphDecodeErrorZ_free(_res: number): void {
7779                 if(!isWasmInitialized) {
7780                         throw new Error("initializeWasm() must be awaited first!");
7781                 }
7782                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_free(_res);
7783                 // debug statements here
7784         }
7785         // uint64_t CResult_NetworkGraphDecodeErrorZ_clone_ptr(LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR arg);
7786         export function CResult_NetworkGraphDecodeErrorZ_clone_ptr(arg: number): number {
7787                 if(!isWasmInitialized) {
7788                         throw new Error("initializeWasm() must be awaited first!");
7789                 }
7790                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_clone_ptr(arg);
7791                 return nativeResponseValue;
7792         }
7793         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_clone(const struct LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR orig);
7794         export function CResult_NetworkGraphDecodeErrorZ_clone(orig: number): number {
7795                 if(!isWasmInitialized) {
7796                         throw new Error("initializeWasm() must be awaited first!");
7797                 }
7798                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_clone(orig);
7799                 return nativeResponseValue;
7800         }
7801         // struct LDKCOption_CVec_NetAddressZZ COption_CVec_NetAddressZZ_some(struct LDKCVec_NetAddressZ o);
7802         export function COption_CVec_NetAddressZZ_some(o: number[]): number {
7803                 if(!isWasmInitialized) {
7804                         throw new Error("initializeWasm() must be awaited first!");
7805                 }
7806                 const nativeResponseValue = wasm.COption_CVec_NetAddressZZ_some(o);
7807                 return nativeResponseValue;
7808         }
7809         // struct LDKCOption_CVec_NetAddressZZ COption_CVec_NetAddressZZ_none(void);
7810         export function COption_CVec_NetAddressZZ_none(): number {
7811                 if(!isWasmInitialized) {
7812                         throw new Error("initializeWasm() must be awaited first!");
7813                 }
7814                 const nativeResponseValue = wasm.COption_CVec_NetAddressZZ_none();
7815                 return nativeResponseValue;
7816         }
7817         // void COption_CVec_NetAddressZZ_free(struct LDKCOption_CVec_NetAddressZZ _res);
7818         export function COption_CVec_NetAddressZZ_free(_res: number): void {
7819                 if(!isWasmInitialized) {
7820                         throw new Error("initializeWasm() must be awaited first!");
7821                 }
7822                 const nativeResponseValue = wasm.COption_CVec_NetAddressZZ_free(_res);
7823                 // debug statements here
7824         }
7825         // uint64_t COption_CVec_NetAddressZZ_clone_ptr(LDKCOption_CVec_NetAddressZZ *NONNULL_PTR arg);
7826         export function COption_CVec_NetAddressZZ_clone_ptr(arg: number): number {
7827                 if(!isWasmInitialized) {
7828                         throw new Error("initializeWasm() must be awaited first!");
7829                 }
7830                 const nativeResponseValue = wasm.COption_CVec_NetAddressZZ_clone_ptr(arg);
7831                 return nativeResponseValue;
7832         }
7833         // struct LDKCOption_CVec_NetAddressZZ COption_CVec_NetAddressZZ_clone(const struct LDKCOption_CVec_NetAddressZZ *NONNULL_PTR orig);
7834         export function COption_CVec_NetAddressZZ_clone(orig: number): number {
7835                 if(!isWasmInitialized) {
7836                         throw new Error("initializeWasm() must be awaited first!");
7837                 }
7838                 const nativeResponseValue = wasm.COption_CVec_NetAddressZZ_clone(orig);
7839                 return nativeResponseValue;
7840         }
7841         // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_ok(struct LDKNetAddress o);
7842         export function CResult_NetAddressDecodeErrorZ_ok(o: number): number {
7843                 if(!isWasmInitialized) {
7844                         throw new Error("initializeWasm() must be awaited first!");
7845                 }
7846                 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_ok(o);
7847                 return nativeResponseValue;
7848         }
7849         // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_err(struct LDKDecodeError e);
7850         export function CResult_NetAddressDecodeErrorZ_err(e: number): number {
7851                 if(!isWasmInitialized) {
7852                         throw new Error("initializeWasm() must be awaited first!");
7853                 }
7854                 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_err(e);
7855                 return nativeResponseValue;
7856         }
7857         // bool CResult_NetAddressDecodeErrorZ_is_ok(const struct LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR o);
7858         export function CResult_NetAddressDecodeErrorZ_is_ok(o: number): boolean {
7859                 if(!isWasmInitialized) {
7860                         throw new Error("initializeWasm() must be awaited first!");
7861                 }
7862                 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_is_ok(o);
7863                 return nativeResponseValue;
7864         }
7865         // void CResult_NetAddressDecodeErrorZ_free(struct LDKCResult_NetAddressDecodeErrorZ _res);
7866         export function CResult_NetAddressDecodeErrorZ_free(_res: number): void {
7867                 if(!isWasmInitialized) {
7868                         throw new Error("initializeWasm() must be awaited first!");
7869                 }
7870                 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_free(_res);
7871                 // debug statements here
7872         }
7873         // uint64_t CResult_NetAddressDecodeErrorZ_clone_ptr(LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR arg);
7874         export function CResult_NetAddressDecodeErrorZ_clone_ptr(arg: number): number {
7875                 if(!isWasmInitialized) {
7876                         throw new Error("initializeWasm() must be awaited first!");
7877                 }
7878                 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_clone_ptr(arg);
7879                 return nativeResponseValue;
7880         }
7881         // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_clone(const struct LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR orig);
7882         export function CResult_NetAddressDecodeErrorZ_clone(orig: number): number {
7883                 if(!isWasmInitialized) {
7884                         throw new Error("initializeWasm() must be awaited first!");
7885                 }
7886                 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_clone(orig);
7887                 return nativeResponseValue;
7888         }
7889         // void CVec_UpdateAddHTLCZ_free(struct LDKCVec_UpdateAddHTLCZ _res);
7890         export function CVec_UpdateAddHTLCZ_free(_res: number[]): void {
7891                 if(!isWasmInitialized) {
7892                         throw new Error("initializeWasm() must be awaited first!");
7893                 }
7894                 const nativeResponseValue = wasm.CVec_UpdateAddHTLCZ_free(_res);
7895                 // debug statements here
7896         }
7897         // void CVec_UpdateFulfillHTLCZ_free(struct LDKCVec_UpdateFulfillHTLCZ _res);
7898         export function CVec_UpdateFulfillHTLCZ_free(_res: number[]): void {
7899                 if(!isWasmInitialized) {
7900                         throw new Error("initializeWasm() must be awaited first!");
7901                 }
7902                 const nativeResponseValue = wasm.CVec_UpdateFulfillHTLCZ_free(_res);
7903                 // debug statements here
7904         }
7905         // void CVec_UpdateFailHTLCZ_free(struct LDKCVec_UpdateFailHTLCZ _res);
7906         export function CVec_UpdateFailHTLCZ_free(_res: number[]): void {
7907                 if(!isWasmInitialized) {
7908                         throw new Error("initializeWasm() must be awaited first!");
7909                 }
7910                 const nativeResponseValue = wasm.CVec_UpdateFailHTLCZ_free(_res);
7911                 // debug statements here
7912         }
7913         // void CVec_UpdateFailMalformedHTLCZ_free(struct LDKCVec_UpdateFailMalformedHTLCZ _res);
7914         export function CVec_UpdateFailMalformedHTLCZ_free(_res: number[]): void {
7915                 if(!isWasmInitialized) {
7916                         throw new Error("initializeWasm() must be awaited first!");
7917                 }
7918                 const nativeResponseValue = wasm.CVec_UpdateFailMalformedHTLCZ_free(_res);
7919                 // debug statements here
7920         }
7921         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_ok(struct LDKAcceptChannel o);
7922         export function CResult_AcceptChannelDecodeErrorZ_ok(o: number): number {
7923                 if(!isWasmInitialized) {
7924                         throw new Error("initializeWasm() must be awaited first!");
7925                 }
7926                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_ok(o);
7927                 return nativeResponseValue;
7928         }
7929         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_err(struct LDKDecodeError e);
7930         export function CResult_AcceptChannelDecodeErrorZ_err(e: number): number {
7931                 if(!isWasmInitialized) {
7932                         throw new Error("initializeWasm() must be awaited first!");
7933                 }
7934                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_err(e);
7935                 return nativeResponseValue;
7936         }
7937         // bool CResult_AcceptChannelDecodeErrorZ_is_ok(const struct LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR o);
7938         export function CResult_AcceptChannelDecodeErrorZ_is_ok(o: number): boolean {
7939                 if(!isWasmInitialized) {
7940                         throw new Error("initializeWasm() must be awaited first!");
7941                 }
7942                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_is_ok(o);
7943                 return nativeResponseValue;
7944         }
7945         // void CResult_AcceptChannelDecodeErrorZ_free(struct LDKCResult_AcceptChannelDecodeErrorZ _res);
7946         export function CResult_AcceptChannelDecodeErrorZ_free(_res: number): void {
7947                 if(!isWasmInitialized) {
7948                         throw new Error("initializeWasm() must be awaited first!");
7949                 }
7950                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_free(_res);
7951                 // debug statements here
7952         }
7953         // uint64_t CResult_AcceptChannelDecodeErrorZ_clone_ptr(LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR arg);
7954         export function CResult_AcceptChannelDecodeErrorZ_clone_ptr(arg: number): number {
7955                 if(!isWasmInitialized) {
7956                         throw new Error("initializeWasm() must be awaited first!");
7957                 }
7958                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_clone_ptr(arg);
7959                 return nativeResponseValue;
7960         }
7961         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_clone(const struct LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR orig);
7962         export function CResult_AcceptChannelDecodeErrorZ_clone(orig: number): number {
7963                 if(!isWasmInitialized) {
7964                         throw new Error("initializeWasm() must be awaited first!");
7965                 }
7966                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_clone(orig);
7967                 return nativeResponseValue;
7968         }
7969         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_ok(struct LDKAnnouncementSignatures o);
7970         export function CResult_AnnouncementSignaturesDecodeErrorZ_ok(o: number): number {
7971                 if(!isWasmInitialized) {
7972                         throw new Error("initializeWasm() must be awaited first!");
7973                 }
7974                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_ok(o);
7975                 return nativeResponseValue;
7976         }
7977         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_err(struct LDKDecodeError e);
7978         export function CResult_AnnouncementSignaturesDecodeErrorZ_err(e: number): number {
7979                 if(!isWasmInitialized) {
7980                         throw new Error("initializeWasm() must be awaited first!");
7981                 }
7982                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_err(e);
7983                 return nativeResponseValue;
7984         }
7985         // bool CResult_AnnouncementSignaturesDecodeErrorZ_is_ok(const struct LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR o);
7986         export function CResult_AnnouncementSignaturesDecodeErrorZ_is_ok(o: number): boolean {
7987                 if(!isWasmInitialized) {
7988                         throw new Error("initializeWasm() must be awaited first!");
7989                 }
7990                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_is_ok(o);
7991                 return nativeResponseValue;
7992         }
7993         // void CResult_AnnouncementSignaturesDecodeErrorZ_free(struct LDKCResult_AnnouncementSignaturesDecodeErrorZ _res);
7994         export function CResult_AnnouncementSignaturesDecodeErrorZ_free(_res: number): void {
7995                 if(!isWasmInitialized) {
7996                         throw new Error("initializeWasm() must be awaited first!");
7997                 }
7998                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_free(_res);
7999                 // debug statements here
8000         }
8001         // uint64_t CResult_AnnouncementSignaturesDecodeErrorZ_clone_ptr(LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR arg);
8002         export function CResult_AnnouncementSignaturesDecodeErrorZ_clone_ptr(arg: number): number {
8003                 if(!isWasmInitialized) {
8004                         throw new Error("initializeWasm() must be awaited first!");
8005                 }
8006                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_clone_ptr(arg);
8007                 return nativeResponseValue;
8008         }
8009         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_clone(const struct LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR orig);
8010         export function CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig: number): number {
8011                 if(!isWasmInitialized) {
8012                         throw new Error("initializeWasm() must be awaited first!");
8013                 }
8014                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig);
8015                 return nativeResponseValue;
8016         }
8017         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_ok(struct LDKChannelReestablish o);
8018         export function CResult_ChannelReestablishDecodeErrorZ_ok(o: number): number {
8019                 if(!isWasmInitialized) {
8020                         throw new Error("initializeWasm() must be awaited first!");
8021                 }
8022                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_ok(o);
8023                 return nativeResponseValue;
8024         }
8025         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_err(struct LDKDecodeError e);
8026         export function CResult_ChannelReestablishDecodeErrorZ_err(e: number): number {
8027                 if(!isWasmInitialized) {
8028                         throw new Error("initializeWasm() must be awaited first!");
8029                 }
8030                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_err(e);
8031                 return nativeResponseValue;
8032         }
8033         // bool CResult_ChannelReestablishDecodeErrorZ_is_ok(const struct LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR o);
8034         export function CResult_ChannelReestablishDecodeErrorZ_is_ok(o: number): boolean {
8035                 if(!isWasmInitialized) {
8036                         throw new Error("initializeWasm() must be awaited first!");
8037                 }
8038                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_is_ok(o);
8039                 return nativeResponseValue;
8040         }
8041         // void CResult_ChannelReestablishDecodeErrorZ_free(struct LDKCResult_ChannelReestablishDecodeErrorZ _res);
8042         export function CResult_ChannelReestablishDecodeErrorZ_free(_res: number): void {
8043                 if(!isWasmInitialized) {
8044                         throw new Error("initializeWasm() must be awaited first!");
8045                 }
8046                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_free(_res);
8047                 // debug statements here
8048         }
8049         // uint64_t CResult_ChannelReestablishDecodeErrorZ_clone_ptr(LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR arg);
8050         export function CResult_ChannelReestablishDecodeErrorZ_clone_ptr(arg: number): number {
8051                 if(!isWasmInitialized) {
8052                         throw new Error("initializeWasm() must be awaited first!");
8053                 }
8054                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_clone_ptr(arg);
8055                 return nativeResponseValue;
8056         }
8057         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_clone(const struct LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR orig);
8058         export function CResult_ChannelReestablishDecodeErrorZ_clone(orig: number): number {
8059                 if(!isWasmInitialized) {
8060                         throw new Error("initializeWasm() must be awaited first!");
8061                 }
8062                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_clone(orig);
8063                 return nativeResponseValue;
8064         }
8065         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_ok(struct LDKClosingSigned o);
8066         export function CResult_ClosingSignedDecodeErrorZ_ok(o: number): number {
8067                 if(!isWasmInitialized) {
8068                         throw new Error("initializeWasm() must be awaited first!");
8069                 }
8070                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_ok(o);
8071                 return nativeResponseValue;
8072         }
8073         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_err(struct LDKDecodeError e);
8074         export function CResult_ClosingSignedDecodeErrorZ_err(e: number): number {
8075                 if(!isWasmInitialized) {
8076                         throw new Error("initializeWasm() must be awaited first!");
8077                 }
8078                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_err(e);
8079                 return nativeResponseValue;
8080         }
8081         // bool CResult_ClosingSignedDecodeErrorZ_is_ok(const struct LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR o);
8082         export function CResult_ClosingSignedDecodeErrorZ_is_ok(o: number): boolean {
8083                 if(!isWasmInitialized) {
8084                         throw new Error("initializeWasm() must be awaited first!");
8085                 }
8086                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_is_ok(o);
8087                 return nativeResponseValue;
8088         }
8089         // void CResult_ClosingSignedDecodeErrorZ_free(struct LDKCResult_ClosingSignedDecodeErrorZ _res);
8090         export function CResult_ClosingSignedDecodeErrorZ_free(_res: number): void {
8091                 if(!isWasmInitialized) {
8092                         throw new Error("initializeWasm() must be awaited first!");
8093                 }
8094                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_free(_res);
8095                 // debug statements here
8096         }
8097         // uint64_t CResult_ClosingSignedDecodeErrorZ_clone_ptr(LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR arg);
8098         export function CResult_ClosingSignedDecodeErrorZ_clone_ptr(arg: number): number {
8099                 if(!isWasmInitialized) {
8100                         throw new Error("initializeWasm() must be awaited first!");
8101                 }
8102                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_clone_ptr(arg);
8103                 return nativeResponseValue;
8104         }
8105         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR orig);
8106         export function CResult_ClosingSignedDecodeErrorZ_clone(orig: number): number {
8107                 if(!isWasmInitialized) {
8108                         throw new Error("initializeWasm() must be awaited first!");
8109                 }
8110                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_clone(orig);
8111                 return nativeResponseValue;
8112         }
8113         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(struct LDKClosingSignedFeeRange o);
8114         export function CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(o: number): number {
8115                 if(!isWasmInitialized) {
8116                         throw new Error("initializeWasm() must be awaited first!");
8117                 }
8118                 const nativeResponseValue = wasm.CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(o);
8119                 return nativeResponseValue;
8120         }
8121         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ CResult_ClosingSignedFeeRangeDecodeErrorZ_err(struct LDKDecodeError e);
8122         export function CResult_ClosingSignedFeeRangeDecodeErrorZ_err(e: number): number {
8123                 if(!isWasmInitialized) {
8124                         throw new Error("initializeWasm() must be awaited first!");
8125                 }
8126                 const nativeResponseValue = wasm.CResult_ClosingSignedFeeRangeDecodeErrorZ_err(e);
8127                 return nativeResponseValue;
8128         }
8129         // bool CResult_ClosingSignedFeeRangeDecodeErrorZ_is_ok(const struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ *NONNULL_PTR o);
8130         export function CResult_ClosingSignedFeeRangeDecodeErrorZ_is_ok(o: number): boolean {
8131                 if(!isWasmInitialized) {
8132                         throw new Error("initializeWasm() must be awaited first!");
8133                 }
8134                 const nativeResponseValue = wasm.CResult_ClosingSignedFeeRangeDecodeErrorZ_is_ok(o);
8135                 return nativeResponseValue;
8136         }
8137         // void CResult_ClosingSignedFeeRangeDecodeErrorZ_free(struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ _res);
8138         export function CResult_ClosingSignedFeeRangeDecodeErrorZ_free(_res: number): void {
8139                 if(!isWasmInitialized) {
8140                         throw new Error("initializeWasm() must be awaited first!");
8141                 }
8142                 const nativeResponseValue = wasm.CResult_ClosingSignedFeeRangeDecodeErrorZ_free(_res);
8143                 // debug statements here
8144         }
8145         // uint64_t CResult_ClosingSignedFeeRangeDecodeErrorZ_clone_ptr(LDKCResult_ClosingSignedFeeRangeDecodeErrorZ *NONNULL_PTR arg);
8146         export function CResult_ClosingSignedFeeRangeDecodeErrorZ_clone_ptr(arg: number): number {
8147                 if(!isWasmInitialized) {
8148                         throw new Error("initializeWasm() must be awaited first!");
8149                 }
8150                 const nativeResponseValue = wasm.CResult_ClosingSignedFeeRangeDecodeErrorZ_clone_ptr(arg);
8151                 return nativeResponseValue;
8152         }
8153         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ CResult_ClosingSignedFeeRangeDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ *NONNULL_PTR orig);
8154         export function CResult_ClosingSignedFeeRangeDecodeErrorZ_clone(orig: number): number {
8155                 if(!isWasmInitialized) {
8156                         throw new Error("initializeWasm() must be awaited first!");
8157                 }
8158                 const nativeResponseValue = wasm.CResult_ClosingSignedFeeRangeDecodeErrorZ_clone(orig);
8159                 return nativeResponseValue;
8160         }
8161         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_ok(struct LDKCommitmentSigned o);
8162         export function CResult_CommitmentSignedDecodeErrorZ_ok(o: number): number {
8163                 if(!isWasmInitialized) {
8164                         throw new Error("initializeWasm() must be awaited first!");
8165                 }
8166                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_ok(o);
8167                 return nativeResponseValue;
8168         }
8169         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_err(struct LDKDecodeError e);
8170         export function CResult_CommitmentSignedDecodeErrorZ_err(e: number): number {
8171                 if(!isWasmInitialized) {
8172                         throw new Error("initializeWasm() must be awaited first!");
8173                 }
8174                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_err(e);
8175                 return nativeResponseValue;
8176         }
8177         // bool CResult_CommitmentSignedDecodeErrorZ_is_ok(const struct LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR o);
8178         export function CResult_CommitmentSignedDecodeErrorZ_is_ok(o: number): boolean {
8179                 if(!isWasmInitialized) {
8180                         throw new Error("initializeWasm() must be awaited first!");
8181                 }
8182                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_is_ok(o);
8183                 return nativeResponseValue;
8184         }
8185         // void CResult_CommitmentSignedDecodeErrorZ_free(struct LDKCResult_CommitmentSignedDecodeErrorZ _res);
8186         export function CResult_CommitmentSignedDecodeErrorZ_free(_res: number): void {
8187                 if(!isWasmInitialized) {
8188                         throw new Error("initializeWasm() must be awaited first!");
8189                 }
8190                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_free(_res);
8191                 // debug statements here
8192         }
8193         // uint64_t CResult_CommitmentSignedDecodeErrorZ_clone_ptr(LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR arg);
8194         export function CResult_CommitmentSignedDecodeErrorZ_clone_ptr(arg: number): number {
8195                 if(!isWasmInitialized) {
8196                         throw new Error("initializeWasm() must be awaited first!");
8197                 }
8198                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_clone_ptr(arg);
8199                 return nativeResponseValue;
8200         }
8201         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_clone(const struct LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR orig);
8202         export function CResult_CommitmentSignedDecodeErrorZ_clone(orig: number): number {
8203                 if(!isWasmInitialized) {
8204                         throw new Error("initializeWasm() must be awaited first!");
8205                 }
8206                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_clone(orig);
8207                 return nativeResponseValue;
8208         }
8209         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_ok(struct LDKFundingCreated o);
8210         export function CResult_FundingCreatedDecodeErrorZ_ok(o: number): number {
8211                 if(!isWasmInitialized) {
8212                         throw new Error("initializeWasm() must be awaited first!");
8213                 }
8214                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_ok(o);
8215                 return nativeResponseValue;
8216         }
8217         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_err(struct LDKDecodeError e);
8218         export function CResult_FundingCreatedDecodeErrorZ_err(e: number): number {
8219                 if(!isWasmInitialized) {
8220                         throw new Error("initializeWasm() must be awaited first!");
8221                 }
8222                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_err(e);
8223                 return nativeResponseValue;
8224         }
8225         // bool CResult_FundingCreatedDecodeErrorZ_is_ok(const struct LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR o);
8226         export function CResult_FundingCreatedDecodeErrorZ_is_ok(o: number): boolean {
8227                 if(!isWasmInitialized) {
8228                         throw new Error("initializeWasm() must be awaited first!");
8229                 }
8230                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_is_ok(o);
8231                 return nativeResponseValue;
8232         }
8233         // void CResult_FundingCreatedDecodeErrorZ_free(struct LDKCResult_FundingCreatedDecodeErrorZ _res);
8234         export function CResult_FundingCreatedDecodeErrorZ_free(_res: number): void {
8235                 if(!isWasmInitialized) {
8236                         throw new Error("initializeWasm() must be awaited first!");
8237                 }
8238                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_free(_res);
8239                 // debug statements here
8240         }
8241         // uint64_t CResult_FundingCreatedDecodeErrorZ_clone_ptr(LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR arg);
8242         export function CResult_FundingCreatedDecodeErrorZ_clone_ptr(arg: number): number {
8243                 if(!isWasmInitialized) {
8244                         throw new Error("initializeWasm() must be awaited first!");
8245                 }
8246                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_clone_ptr(arg);
8247                 return nativeResponseValue;
8248         }
8249         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_clone(const struct LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR orig);
8250         export function CResult_FundingCreatedDecodeErrorZ_clone(orig: number): number {
8251                 if(!isWasmInitialized) {
8252                         throw new Error("initializeWasm() must be awaited first!");
8253                 }
8254                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_clone(orig);
8255                 return nativeResponseValue;
8256         }
8257         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_ok(struct LDKFundingSigned o);
8258         export function CResult_FundingSignedDecodeErrorZ_ok(o: number): number {
8259                 if(!isWasmInitialized) {
8260                         throw new Error("initializeWasm() must be awaited first!");
8261                 }
8262                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_ok(o);
8263                 return nativeResponseValue;
8264         }
8265         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_err(struct LDKDecodeError e);
8266         export function CResult_FundingSignedDecodeErrorZ_err(e: number): number {
8267                 if(!isWasmInitialized) {
8268                         throw new Error("initializeWasm() must be awaited first!");
8269                 }
8270                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_err(e);
8271                 return nativeResponseValue;
8272         }
8273         // bool CResult_FundingSignedDecodeErrorZ_is_ok(const struct LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR o);
8274         export function CResult_FundingSignedDecodeErrorZ_is_ok(o: number): boolean {
8275                 if(!isWasmInitialized) {
8276                         throw new Error("initializeWasm() must be awaited first!");
8277                 }
8278                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_is_ok(o);
8279                 return nativeResponseValue;
8280         }
8281         // void CResult_FundingSignedDecodeErrorZ_free(struct LDKCResult_FundingSignedDecodeErrorZ _res);
8282         export function CResult_FundingSignedDecodeErrorZ_free(_res: number): void {
8283                 if(!isWasmInitialized) {
8284                         throw new Error("initializeWasm() must be awaited first!");
8285                 }
8286                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_free(_res);
8287                 // debug statements here
8288         }
8289         // uint64_t CResult_FundingSignedDecodeErrorZ_clone_ptr(LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR arg);
8290         export function CResult_FundingSignedDecodeErrorZ_clone_ptr(arg: number): number {
8291                 if(!isWasmInitialized) {
8292                         throw new Error("initializeWasm() must be awaited first!");
8293                 }
8294                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_clone_ptr(arg);
8295                 return nativeResponseValue;
8296         }
8297         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_clone(const struct LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR orig);
8298         export function CResult_FundingSignedDecodeErrorZ_clone(orig: number): number {
8299                 if(!isWasmInitialized) {
8300                         throw new Error("initializeWasm() must be awaited first!");
8301                 }
8302                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_clone(orig);
8303                 return nativeResponseValue;
8304         }
8305         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_ok(struct LDKFundingLocked o);
8306         export function CResult_FundingLockedDecodeErrorZ_ok(o: number): number {
8307                 if(!isWasmInitialized) {
8308                         throw new Error("initializeWasm() must be awaited first!");
8309                 }
8310                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_ok(o);
8311                 return nativeResponseValue;
8312         }
8313         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_err(struct LDKDecodeError e);
8314         export function CResult_FundingLockedDecodeErrorZ_err(e: number): number {
8315                 if(!isWasmInitialized) {
8316                         throw new Error("initializeWasm() must be awaited first!");
8317                 }
8318                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_err(e);
8319                 return nativeResponseValue;
8320         }
8321         // bool CResult_FundingLockedDecodeErrorZ_is_ok(const struct LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR o);
8322         export function CResult_FundingLockedDecodeErrorZ_is_ok(o: number): boolean {
8323                 if(!isWasmInitialized) {
8324                         throw new Error("initializeWasm() must be awaited first!");
8325                 }
8326                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_is_ok(o);
8327                 return nativeResponseValue;
8328         }
8329         // void CResult_FundingLockedDecodeErrorZ_free(struct LDKCResult_FundingLockedDecodeErrorZ _res);
8330         export function CResult_FundingLockedDecodeErrorZ_free(_res: number): void {
8331                 if(!isWasmInitialized) {
8332                         throw new Error("initializeWasm() must be awaited first!");
8333                 }
8334                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_free(_res);
8335                 // debug statements here
8336         }
8337         // uint64_t CResult_FundingLockedDecodeErrorZ_clone_ptr(LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR arg);
8338         export function CResult_FundingLockedDecodeErrorZ_clone_ptr(arg: number): number {
8339                 if(!isWasmInitialized) {
8340                         throw new Error("initializeWasm() must be awaited first!");
8341                 }
8342                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_clone_ptr(arg);
8343                 return nativeResponseValue;
8344         }
8345         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_clone(const struct LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR orig);
8346         export function CResult_FundingLockedDecodeErrorZ_clone(orig: number): number {
8347                 if(!isWasmInitialized) {
8348                         throw new Error("initializeWasm() must be awaited first!");
8349                 }
8350                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_clone(orig);
8351                 return nativeResponseValue;
8352         }
8353         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_ok(struct LDKInit o);
8354         export function CResult_InitDecodeErrorZ_ok(o: number): number {
8355                 if(!isWasmInitialized) {
8356                         throw new Error("initializeWasm() must be awaited first!");
8357                 }
8358                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_ok(o);
8359                 return nativeResponseValue;
8360         }
8361         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_err(struct LDKDecodeError e);
8362         export function CResult_InitDecodeErrorZ_err(e: number): number {
8363                 if(!isWasmInitialized) {
8364                         throw new Error("initializeWasm() must be awaited first!");
8365                 }
8366                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_err(e);
8367                 return nativeResponseValue;
8368         }
8369         // bool CResult_InitDecodeErrorZ_is_ok(const struct LDKCResult_InitDecodeErrorZ *NONNULL_PTR o);
8370         export function CResult_InitDecodeErrorZ_is_ok(o: number): boolean {
8371                 if(!isWasmInitialized) {
8372                         throw new Error("initializeWasm() must be awaited first!");
8373                 }
8374                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_is_ok(o);
8375                 return nativeResponseValue;
8376         }
8377         // void CResult_InitDecodeErrorZ_free(struct LDKCResult_InitDecodeErrorZ _res);
8378         export function CResult_InitDecodeErrorZ_free(_res: number): void {
8379                 if(!isWasmInitialized) {
8380                         throw new Error("initializeWasm() must be awaited first!");
8381                 }
8382                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_free(_res);
8383                 // debug statements here
8384         }
8385         // uint64_t CResult_InitDecodeErrorZ_clone_ptr(LDKCResult_InitDecodeErrorZ *NONNULL_PTR arg);
8386         export function CResult_InitDecodeErrorZ_clone_ptr(arg: number): number {
8387                 if(!isWasmInitialized) {
8388                         throw new Error("initializeWasm() must be awaited first!");
8389                 }
8390                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_clone_ptr(arg);
8391                 return nativeResponseValue;
8392         }
8393         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_clone(const struct LDKCResult_InitDecodeErrorZ *NONNULL_PTR orig);
8394         export function CResult_InitDecodeErrorZ_clone(orig: number): number {
8395                 if(!isWasmInitialized) {
8396                         throw new Error("initializeWasm() must be awaited first!");
8397                 }
8398                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_clone(orig);
8399                 return nativeResponseValue;
8400         }
8401         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_ok(struct LDKOpenChannel o);
8402         export function CResult_OpenChannelDecodeErrorZ_ok(o: number): number {
8403                 if(!isWasmInitialized) {
8404                         throw new Error("initializeWasm() must be awaited first!");
8405                 }
8406                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_ok(o);
8407                 return nativeResponseValue;
8408         }
8409         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_err(struct LDKDecodeError e);
8410         export function CResult_OpenChannelDecodeErrorZ_err(e: number): number {
8411                 if(!isWasmInitialized) {
8412                         throw new Error("initializeWasm() must be awaited first!");
8413                 }
8414                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_err(e);
8415                 return nativeResponseValue;
8416         }
8417         // bool CResult_OpenChannelDecodeErrorZ_is_ok(const struct LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR o);
8418         export function CResult_OpenChannelDecodeErrorZ_is_ok(o: number): boolean {
8419                 if(!isWasmInitialized) {
8420                         throw new Error("initializeWasm() must be awaited first!");
8421                 }
8422                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_is_ok(o);
8423                 return nativeResponseValue;
8424         }
8425         // void CResult_OpenChannelDecodeErrorZ_free(struct LDKCResult_OpenChannelDecodeErrorZ _res);
8426         export function CResult_OpenChannelDecodeErrorZ_free(_res: number): void {
8427                 if(!isWasmInitialized) {
8428                         throw new Error("initializeWasm() must be awaited first!");
8429                 }
8430                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_free(_res);
8431                 // debug statements here
8432         }
8433         // uint64_t CResult_OpenChannelDecodeErrorZ_clone_ptr(LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR arg);
8434         export function CResult_OpenChannelDecodeErrorZ_clone_ptr(arg: number): number {
8435                 if(!isWasmInitialized) {
8436                         throw new Error("initializeWasm() must be awaited first!");
8437                 }
8438                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_clone_ptr(arg);
8439                 return nativeResponseValue;
8440         }
8441         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_clone(const struct LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR orig);
8442         export function CResult_OpenChannelDecodeErrorZ_clone(orig: number): number {
8443                 if(!isWasmInitialized) {
8444                         throw new Error("initializeWasm() must be awaited first!");
8445                 }
8446                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_clone(orig);
8447                 return nativeResponseValue;
8448         }
8449         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_ok(struct LDKRevokeAndACK o);
8450         export function CResult_RevokeAndACKDecodeErrorZ_ok(o: number): number {
8451                 if(!isWasmInitialized) {
8452                         throw new Error("initializeWasm() must be awaited first!");
8453                 }
8454                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_ok(o);
8455                 return nativeResponseValue;
8456         }
8457         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_err(struct LDKDecodeError e);
8458         export function CResult_RevokeAndACKDecodeErrorZ_err(e: number): number {
8459                 if(!isWasmInitialized) {
8460                         throw new Error("initializeWasm() must be awaited first!");
8461                 }
8462                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_err(e);
8463                 return nativeResponseValue;
8464         }
8465         // bool CResult_RevokeAndACKDecodeErrorZ_is_ok(const struct LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR o);
8466         export function CResult_RevokeAndACKDecodeErrorZ_is_ok(o: number): boolean {
8467                 if(!isWasmInitialized) {
8468                         throw new Error("initializeWasm() must be awaited first!");
8469                 }
8470                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_is_ok(o);
8471                 return nativeResponseValue;
8472         }
8473         // void CResult_RevokeAndACKDecodeErrorZ_free(struct LDKCResult_RevokeAndACKDecodeErrorZ _res);
8474         export function CResult_RevokeAndACKDecodeErrorZ_free(_res: number): void {
8475                 if(!isWasmInitialized) {
8476                         throw new Error("initializeWasm() must be awaited first!");
8477                 }
8478                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_free(_res);
8479                 // debug statements here
8480         }
8481         // uint64_t CResult_RevokeAndACKDecodeErrorZ_clone_ptr(LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR arg);
8482         export function CResult_RevokeAndACKDecodeErrorZ_clone_ptr(arg: number): number {
8483                 if(!isWasmInitialized) {
8484                         throw new Error("initializeWasm() must be awaited first!");
8485                 }
8486                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_clone_ptr(arg);
8487                 return nativeResponseValue;
8488         }
8489         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_clone(const struct LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR orig);
8490         export function CResult_RevokeAndACKDecodeErrorZ_clone(orig: number): number {
8491                 if(!isWasmInitialized) {
8492                         throw new Error("initializeWasm() must be awaited first!");
8493                 }
8494                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_clone(orig);
8495                 return nativeResponseValue;
8496         }
8497         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_ok(struct LDKShutdown o);
8498         export function CResult_ShutdownDecodeErrorZ_ok(o: number): number {
8499                 if(!isWasmInitialized) {
8500                         throw new Error("initializeWasm() must be awaited first!");
8501                 }
8502                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_ok(o);
8503                 return nativeResponseValue;
8504         }
8505         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_err(struct LDKDecodeError e);
8506         export function CResult_ShutdownDecodeErrorZ_err(e: number): number {
8507                 if(!isWasmInitialized) {
8508                         throw new Error("initializeWasm() must be awaited first!");
8509                 }
8510                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_err(e);
8511                 return nativeResponseValue;
8512         }
8513         // bool CResult_ShutdownDecodeErrorZ_is_ok(const struct LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR o);
8514         export function CResult_ShutdownDecodeErrorZ_is_ok(o: number): boolean {
8515                 if(!isWasmInitialized) {
8516                         throw new Error("initializeWasm() must be awaited first!");
8517                 }
8518                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_is_ok(o);
8519                 return nativeResponseValue;
8520         }
8521         // void CResult_ShutdownDecodeErrorZ_free(struct LDKCResult_ShutdownDecodeErrorZ _res);
8522         export function CResult_ShutdownDecodeErrorZ_free(_res: number): void {
8523                 if(!isWasmInitialized) {
8524                         throw new Error("initializeWasm() must be awaited first!");
8525                 }
8526                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_free(_res);
8527                 // debug statements here
8528         }
8529         // uint64_t CResult_ShutdownDecodeErrorZ_clone_ptr(LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR arg);
8530         export function CResult_ShutdownDecodeErrorZ_clone_ptr(arg: number): number {
8531                 if(!isWasmInitialized) {
8532                         throw new Error("initializeWasm() must be awaited first!");
8533                 }
8534                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_clone_ptr(arg);
8535                 return nativeResponseValue;
8536         }
8537         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_clone(const struct LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR orig);
8538         export function CResult_ShutdownDecodeErrorZ_clone(orig: number): number {
8539                 if(!isWasmInitialized) {
8540                         throw new Error("initializeWasm() must be awaited first!");
8541                 }
8542                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_clone(orig);
8543                 return nativeResponseValue;
8544         }
8545         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_ok(struct LDKUpdateFailHTLC o);
8546         export function CResult_UpdateFailHTLCDecodeErrorZ_ok(o: number): number {
8547                 if(!isWasmInitialized) {
8548                         throw new Error("initializeWasm() must be awaited first!");
8549                 }
8550                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_ok(o);
8551                 return nativeResponseValue;
8552         }
8553         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_err(struct LDKDecodeError e);
8554         export function CResult_UpdateFailHTLCDecodeErrorZ_err(e: number): number {
8555                 if(!isWasmInitialized) {
8556                         throw new Error("initializeWasm() must be awaited first!");
8557                 }
8558                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_err(e);
8559                 return nativeResponseValue;
8560         }
8561         // bool CResult_UpdateFailHTLCDecodeErrorZ_is_ok(const struct LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR o);
8562         export function CResult_UpdateFailHTLCDecodeErrorZ_is_ok(o: number): boolean {
8563                 if(!isWasmInitialized) {
8564                         throw new Error("initializeWasm() must be awaited first!");
8565                 }
8566                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_is_ok(o);
8567                 return nativeResponseValue;
8568         }
8569         // void CResult_UpdateFailHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailHTLCDecodeErrorZ _res);
8570         export function CResult_UpdateFailHTLCDecodeErrorZ_free(_res: number): void {
8571                 if(!isWasmInitialized) {
8572                         throw new Error("initializeWasm() must be awaited first!");
8573                 }
8574                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_free(_res);
8575                 // debug statements here
8576         }
8577         // uint64_t CResult_UpdateFailHTLCDecodeErrorZ_clone_ptr(LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR arg);
8578         export function CResult_UpdateFailHTLCDecodeErrorZ_clone_ptr(arg: number): number {
8579                 if(!isWasmInitialized) {
8580                         throw new Error("initializeWasm() must be awaited first!");
8581                 }
8582                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_clone_ptr(arg);
8583                 return nativeResponseValue;
8584         }
8585         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR orig);
8586         export function CResult_UpdateFailHTLCDecodeErrorZ_clone(orig: number): number {
8587                 if(!isWasmInitialized) {
8588                         throw new Error("initializeWasm() must be awaited first!");
8589                 }
8590                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_clone(orig);
8591                 return nativeResponseValue;
8592         }
8593         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(struct LDKUpdateFailMalformedHTLC o);
8594         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o: number): number {
8595                 if(!isWasmInitialized) {
8596                         throw new Error("initializeWasm() must be awaited first!");
8597                 }
8598                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o);
8599                 return nativeResponseValue;
8600         }
8601         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(struct LDKDecodeError e);
8602         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e: number): number {
8603                 if(!isWasmInitialized) {
8604                         throw new Error("initializeWasm() must be awaited first!");
8605                 }
8606                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e);
8607                 return nativeResponseValue;
8608         }
8609         // bool CResult_UpdateFailMalformedHTLCDecodeErrorZ_is_ok(const struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR o);
8610         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_is_ok(o: number): boolean {
8611                 if(!isWasmInitialized) {
8612                         throw new Error("initializeWasm() must be awaited first!");
8613                 }
8614                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_is_ok(o);
8615                 return nativeResponseValue;
8616         }
8617         // void CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ _res);
8618         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res: number): void {
8619                 if(!isWasmInitialized) {
8620                         throw new Error("initializeWasm() must be awaited first!");
8621                 }
8622                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res);
8623                 // debug statements here
8624         }
8625         // uint64_t CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone_ptr(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR arg);
8626         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone_ptr(arg: number): number {
8627                 if(!isWasmInitialized) {
8628                         throw new Error("initializeWasm() must be awaited first!");
8629                 }
8630                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone_ptr(arg);
8631                 return nativeResponseValue;
8632         }
8633         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR orig);
8634         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig: number): number {
8635                 if(!isWasmInitialized) {
8636                         throw new Error("initializeWasm() must be awaited first!");
8637                 }
8638                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig);
8639                 return nativeResponseValue;
8640         }
8641         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_ok(struct LDKUpdateFee o);
8642         export function CResult_UpdateFeeDecodeErrorZ_ok(o: number): number {
8643                 if(!isWasmInitialized) {
8644                         throw new Error("initializeWasm() must be awaited first!");
8645                 }
8646                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_ok(o);
8647                 return nativeResponseValue;
8648         }
8649         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_err(struct LDKDecodeError e);
8650         export function CResult_UpdateFeeDecodeErrorZ_err(e: number): number {
8651                 if(!isWasmInitialized) {
8652                         throw new Error("initializeWasm() must be awaited first!");
8653                 }
8654                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_err(e);
8655                 return nativeResponseValue;
8656         }
8657         // bool CResult_UpdateFeeDecodeErrorZ_is_ok(const struct LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR o);
8658         export function CResult_UpdateFeeDecodeErrorZ_is_ok(o: number): boolean {
8659                 if(!isWasmInitialized) {
8660                         throw new Error("initializeWasm() must be awaited first!");
8661                 }
8662                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_is_ok(o);
8663                 return nativeResponseValue;
8664         }
8665         // void CResult_UpdateFeeDecodeErrorZ_free(struct LDKCResult_UpdateFeeDecodeErrorZ _res);
8666         export function CResult_UpdateFeeDecodeErrorZ_free(_res: number): void {
8667                 if(!isWasmInitialized) {
8668                         throw new Error("initializeWasm() must be awaited first!");
8669                 }
8670                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_free(_res);
8671                 // debug statements here
8672         }
8673         // uint64_t CResult_UpdateFeeDecodeErrorZ_clone_ptr(LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR arg);
8674         export function CResult_UpdateFeeDecodeErrorZ_clone_ptr(arg: number): number {
8675                 if(!isWasmInitialized) {
8676                         throw new Error("initializeWasm() must be awaited first!");
8677                 }
8678                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_clone_ptr(arg);
8679                 return nativeResponseValue;
8680         }
8681         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_clone(const struct LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR orig);
8682         export function CResult_UpdateFeeDecodeErrorZ_clone(orig: number): number {
8683                 if(!isWasmInitialized) {
8684                         throw new Error("initializeWasm() must be awaited first!");
8685                 }
8686                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_clone(orig);
8687                 return nativeResponseValue;
8688         }
8689         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_ok(struct LDKUpdateFulfillHTLC o);
8690         export function CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o: number): number {
8691                 if(!isWasmInitialized) {
8692                         throw new Error("initializeWasm() must be awaited first!");
8693                 }
8694                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o);
8695                 return nativeResponseValue;
8696         }
8697         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_err(struct LDKDecodeError e);
8698         export function CResult_UpdateFulfillHTLCDecodeErrorZ_err(e: number): number {
8699                 if(!isWasmInitialized) {
8700                         throw new Error("initializeWasm() must be awaited first!");
8701                 }
8702                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_err(e);
8703                 return nativeResponseValue;
8704         }
8705         // bool CResult_UpdateFulfillHTLCDecodeErrorZ_is_ok(const struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR o);
8706         export function CResult_UpdateFulfillHTLCDecodeErrorZ_is_ok(o: number): boolean {
8707                 if(!isWasmInitialized) {
8708                         throw new Error("initializeWasm() must be awaited first!");
8709                 }
8710                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_is_ok(o);
8711                 return nativeResponseValue;
8712         }
8713         // void CResult_UpdateFulfillHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ _res);
8714         export function CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res: number): void {
8715                 if(!isWasmInitialized) {
8716                         throw new Error("initializeWasm() must be awaited first!");
8717                 }
8718                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res);
8719                 // debug statements here
8720         }
8721         // uint64_t CResult_UpdateFulfillHTLCDecodeErrorZ_clone_ptr(LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR arg);
8722         export function CResult_UpdateFulfillHTLCDecodeErrorZ_clone_ptr(arg: number): number {
8723                 if(!isWasmInitialized) {
8724                         throw new Error("initializeWasm() must be awaited first!");
8725                 }
8726                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_clone_ptr(arg);
8727                 return nativeResponseValue;
8728         }
8729         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR orig);
8730         export function CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig: number): number {
8731                 if(!isWasmInitialized) {
8732                         throw new Error("initializeWasm() must be awaited first!");
8733                 }
8734                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig);
8735                 return nativeResponseValue;
8736         }
8737         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_ok(struct LDKUpdateAddHTLC o);
8738         export function CResult_UpdateAddHTLCDecodeErrorZ_ok(o: number): number {
8739                 if(!isWasmInitialized) {
8740                         throw new Error("initializeWasm() must be awaited first!");
8741                 }
8742                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_ok(o);
8743                 return nativeResponseValue;
8744         }
8745         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_err(struct LDKDecodeError e);
8746         export function CResult_UpdateAddHTLCDecodeErrorZ_err(e: number): number {
8747                 if(!isWasmInitialized) {
8748                         throw new Error("initializeWasm() must be awaited first!");
8749                 }
8750                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_err(e);
8751                 return nativeResponseValue;
8752         }
8753         // bool CResult_UpdateAddHTLCDecodeErrorZ_is_ok(const struct LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR o);
8754         export function CResult_UpdateAddHTLCDecodeErrorZ_is_ok(o: number): boolean {
8755                 if(!isWasmInitialized) {
8756                         throw new Error("initializeWasm() must be awaited first!");
8757                 }
8758                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_is_ok(o);
8759                 return nativeResponseValue;
8760         }
8761         // void CResult_UpdateAddHTLCDecodeErrorZ_free(struct LDKCResult_UpdateAddHTLCDecodeErrorZ _res);
8762         export function CResult_UpdateAddHTLCDecodeErrorZ_free(_res: number): void {
8763                 if(!isWasmInitialized) {
8764                         throw new Error("initializeWasm() must be awaited first!");
8765                 }
8766                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_free(_res);
8767                 // debug statements here
8768         }
8769         // uint64_t CResult_UpdateAddHTLCDecodeErrorZ_clone_ptr(LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR arg);
8770         export function CResult_UpdateAddHTLCDecodeErrorZ_clone_ptr(arg: number): number {
8771                 if(!isWasmInitialized) {
8772                         throw new Error("initializeWasm() must be awaited first!");
8773                 }
8774                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_clone_ptr(arg);
8775                 return nativeResponseValue;
8776         }
8777         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR orig);
8778         export function CResult_UpdateAddHTLCDecodeErrorZ_clone(orig: number): number {
8779                 if(!isWasmInitialized) {
8780                         throw new Error("initializeWasm() must be awaited first!");
8781                 }
8782                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_clone(orig);
8783                 return nativeResponseValue;
8784         }
8785         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_ok(struct LDKPing o);
8786         export function CResult_PingDecodeErrorZ_ok(o: number): number {
8787                 if(!isWasmInitialized) {
8788                         throw new Error("initializeWasm() must be awaited first!");
8789                 }
8790                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_ok(o);
8791                 return nativeResponseValue;
8792         }
8793         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_err(struct LDKDecodeError e);
8794         export function CResult_PingDecodeErrorZ_err(e: number): number {
8795                 if(!isWasmInitialized) {
8796                         throw new Error("initializeWasm() must be awaited first!");
8797                 }
8798                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_err(e);
8799                 return nativeResponseValue;
8800         }
8801         // bool CResult_PingDecodeErrorZ_is_ok(const struct LDKCResult_PingDecodeErrorZ *NONNULL_PTR o);
8802         export function CResult_PingDecodeErrorZ_is_ok(o: number): boolean {
8803                 if(!isWasmInitialized) {
8804                         throw new Error("initializeWasm() must be awaited first!");
8805                 }
8806                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_is_ok(o);
8807                 return nativeResponseValue;
8808         }
8809         // void CResult_PingDecodeErrorZ_free(struct LDKCResult_PingDecodeErrorZ _res);
8810         export function CResult_PingDecodeErrorZ_free(_res: number): void {
8811                 if(!isWasmInitialized) {
8812                         throw new Error("initializeWasm() must be awaited first!");
8813                 }
8814                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_free(_res);
8815                 // debug statements here
8816         }
8817         // uint64_t CResult_PingDecodeErrorZ_clone_ptr(LDKCResult_PingDecodeErrorZ *NONNULL_PTR arg);
8818         export function CResult_PingDecodeErrorZ_clone_ptr(arg: number): number {
8819                 if(!isWasmInitialized) {
8820                         throw new Error("initializeWasm() must be awaited first!");
8821                 }
8822                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_clone_ptr(arg);
8823                 return nativeResponseValue;
8824         }
8825         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_clone(const struct LDKCResult_PingDecodeErrorZ *NONNULL_PTR orig);
8826         export function CResult_PingDecodeErrorZ_clone(orig: number): number {
8827                 if(!isWasmInitialized) {
8828                         throw new Error("initializeWasm() must be awaited first!");
8829                 }
8830                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_clone(orig);
8831                 return nativeResponseValue;
8832         }
8833         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_ok(struct LDKPong o);
8834         export function CResult_PongDecodeErrorZ_ok(o: number): number {
8835                 if(!isWasmInitialized) {
8836                         throw new Error("initializeWasm() must be awaited first!");
8837                 }
8838                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_ok(o);
8839                 return nativeResponseValue;
8840         }
8841         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_err(struct LDKDecodeError e);
8842         export function CResult_PongDecodeErrorZ_err(e: number): number {
8843                 if(!isWasmInitialized) {
8844                         throw new Error("initializeWasm() must be awaited first!");
8845                 }
8846                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_err(e);
8847                 return nativeResponseValue;
8848         }
8849         // bool CResult_PongDecodeErrorZ_is_ok(const struct LDKCResult_PongDecodeErrorZ *NONNULL_PTR o);
8850         export function CResult_PongDecodeErrorZ_is_ok(o: number): boolean {
8851                 if(!isWasmInitialized) {
8852                         throw new Error("initializeWasm() must be awaited first!");
8853                 }
8854                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_is_ok(o);
8855                 return nativeResponseValue;
8856         }
8857         // void CResult_PongDecodeErrorZ_free(struct LDKCResult_PongDecodeErrorZ _res);
8858         export function CResult_PongDecodeErrorZ_free(_res: number): void {
8859                 if(!isWasmInitialized) {
8860                         throw new Error("initializeWasm() must be awaited first!");
8861                 }
8862                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_free(_res);
8863                 // debug statements here
8864         }
8865         // uint64_t CResult_PongDecodeErrorZ_clone_ptr(LDKCResult_PongDecodeErrorZ *NONNULL_PTR arg);
8866         export function CResult_PongDecodeErrorZ_clone_ptr(arg: number): number {
8867                 if(!isWasmInitialized) {
8868                         throw new Error("initializeWasm() must be awaited first!");
8869                 }
8870                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_clone_ptr(arg);
8871                 return nativeResponseValue;
8872         }
8873         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_clone(const struct LDKCResult_PongDecodeErrorZ *NONNULL_PTR orig);
8874         export function CResult_PongDecodeErrorZ_clone(orig: number): number {
8875                 if(!isWasmInitialized) {
8876                         throw new Error("initializeWasm() must be awaited first!");
8877                 }
8878                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_clone(orig);
8879                 return nativeResponseValue;
8880         }
8881         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(struct LDKUnsignedChannelAnnouncement o);
8882         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o: number): number {
8883                 if(!isWasmInitialized) {
8884                         throw new Error("initializeWasm() must be awaited first!");
8885                 }
8886                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o);
8887                 return nativeResponseValue;
8888         }
8889         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
8890         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e: number): number {
8891                 if(!isWasmInitialized) {
8892                         throw new Error("initializeWasm() must be awaited first!");
8893                 }
8894                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e);
8895                 return nativeResponseValue;
8896         }
8897         // bool CResult_UnsignedChannelAnnouncementDecodeErrorZ_is_ok(const struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR o);
8898         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_is_ok(o: number): boolean {
8899                 if(!isWasmInitialized) {
8900                         throw new Error("initializeWasm() must be awaited first!");
8901                 }
8902                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_is_ok(o);
8903                 return nativeResponseValue;
8904         }
8905         // void CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ _res);
8906         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res: number): void {
8907                 if(!isWasmInitialized) {
8908                         throw new Error("initializeWasm() must be awaited first!");
8909                 }
8910                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res);
8911                 // debug statements here
8912         }
8913         // uint64_t CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone_ptr(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR arg);
8914         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone_ptr(arg: number): number {
8915                 if(!isWasmInitialized) {
8916                         throw new Error("initializeWasm() must be awaited first!");
8917                 }
8918                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone_ptr(arg);
8919                 return nativeResponseValue;
8920         }
8921         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
8922         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
8923                 if(!isWasmInitialized) {
8924                         throw new Error("initializeWasm() must be awaited first!");
8925                 }
8926                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig);
8927                 return nativeResponseValue;
8928         }
8929         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_ok(struct LDKChannelAnnouncement o);
8930         export function CResult_ChannelAnnouncementDecodeErrorZ_ok(o: number): number {
8931                 if(!isWasmInitialized) {
8932                         throw new Error("initializeWasm() must be awaited first!");
8933                 }
8934                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_ok(o);
8935                 return nativeResponseValue;
8936         }
8937         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
8938         export function CResult_ChannelAnnouncementDecodeErrorZ_err(e: number): number {
8939                 if(!isWasmInitialized) {
8940                         throw new Error("initializeWasm() must be awaited first!");
8941                 }
8942                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_err(e);
8943                 return nativeResponseValue;
8944         }
8945         // bool CResult_ChannelAnnouncementDecodeErrorZ_is_ok(const struct LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR o);
8946         export function CResult_ChannelAnnouncementDecodeErrorZ_is_ok(o: number): boolean {
8947                 if(!isWasmInitialized) {
8948                         throw new Error("initializeWasm() must be awaited first!");
8949                 }
8950                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_is_ok(o);
8951                 return nativeResponseValue;
8952         }
8953         // void CResult_ChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_ChannelAnnouncementDecodeErrorZ _res);
8954         export function CResult_ChannelAnnouncementDecodeErrorZ_free(_res: number): void {
8955                 if(!isWasmInitialized) {
8956                         throw new Error("initializeWasm() must be awaited first!");
8957                 }
8958                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_free(_res);
8959                 // debug statements here
8960         }
8961         // uint64_t CResult_ChannelAnnouncementDecodeErrorZ_clone_ptr(LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR arg);
8962         export function CResult_ChannelAnnouncementDecodeErrorZ_clone_ptr(arg: number): number {
8963                 if(!isWasmInitialized) {
8964                         throw new Error("initializeWasm() must be awaited first!");
8965                 }
8966                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_clone_ptr(arg);
8967                 return nativeResponseValue;
8968         }
8969         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
8970         export function CResult_ChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
8971                 if(!isWasmInitialized) {
8972                         throw new Error("initializeWasm() must be awaited first!");
8973                 }
8974                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_clone(orig);
8975                 return nativeResponseValue;
8976         }
8977         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_ok(struct LDKUnsignedChannelUpdate o);
8978         export function CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o: number): number {
8979                 if(!isWasmInitialized) {
8980                         throw new Error("initializeWasm() must be awaited first!");
8981                 }
8982                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o);
8983                 return nativeResponseValue;
8984         }
8985         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
8986         export function CResult_UnsignedChannelUpdateDecodeErrorZ_err(e: number): number {
8987                 if(!isWasmInitialized) {
8988                         throw new Error("initializeWasm() must be awaited first!");
8989                 }
8990                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_err(e);
8991                 return nativeResponseValue;
8992         }
8993         // bool CResult_UnsignedChannelUpdateDecodeErrorZ_is_ok(const struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR o);
8994         export function CResult_UnsignedChannelUpdateDecodeErrorZ_is_ok(o: number): boolean {
8995                 if(!isWasmInitialized) {
8996                         throw new Error("initializeWasm() must be awaited first!");
8997                 }
8998                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_is_ok(o);
8999                 return nativeResponseValue;
9000         }
9001         // void CResult_UnsignedChannelUpdateDecodeErrorZ_free(struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ _res);
9002         export function CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res: number): void {
9003                 if(!isWasmInitialized) {
9004                         throw new Error("initializeWasm() must be awaited first!");
9005                 }
9006                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res);
9007                 // debug statements here
9008         }
9009         // uint64_t CResult_UnsignedChannelUpdateDecodeErrorZ_clone_ptr(LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR arg);
9010         export function CResult_UnsignedChannelUpdateDecodeErrorZ_clone_ptr(arg: number): number {
9011                 if(!isWasmInitialized) {
9012                         throw new Error("initializeWasm() must be awaited first!");
9013                 }
9014                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_clone_ptr(arg);
9015                 return nativeResponseValue;
9016         }
9017         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
9018         export function CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig: number): number {
9019                 if(!isWasmInitialized) {
9020                         throw new Error("initializeWasm() must be awaited first!");
9021                 }
9022                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig);
9023                 return nativeResponseValue;
9024         }
9025         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_ok(struct LDKChannelUpdate o);
9026         export function CResult_ChannelUpdateDecodeErrorZ_ok(o: number): number {
9027                 if(!isWasmInitialized) {
9028                         throw new Error("initializeWasm() must be awaited first!");
9029                 }
9030                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_ok(o);
9031                 return nativeResponseValue;
9032         }
9033         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
9034         export function CResult_ChannelUpdateDecodeErrorZ_err(e: number): number {
9035                 if(!isWasmInitialized) {
9036                         throw new Error("initializeWasm() must be awaited first!");
9037                 }
9038                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_err(e);
9039                 return nativeResponseValue;
9040         }
9041         // bool CResult_ChannelUpdateDecodeErrorZ_is_ok(const struct LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR o);
9042         export function CResult_ChannelUpdateDecodeErrorZ_is_ok(o: number): boolean {
9043                 if(!isWasmInitialized) {
9044                         throw new Error("initializeWasm() must be awaited first!");
9045                 }
9046                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_is_ok(o);
9047                 return nativeResponseValue;
9048         }
9049         // void CResult_ChannelUpdateDecodeErrorZ_free(struct LDKCResult_ChannelUpdateDecodeErrorZ _res);
9050         export function CResult_ChannelUpdateDecodeErrorZ_free(_res: number): void {
9051                 if(!isWasmInitialized) {
9052                         throw new Error("initializeWasm() must be awaited first!");
9053                 }
9054                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_free(_res);
9055                 // debug statements here
9056         }
9057         // uint64_t CResult_ChannelUpdateDecodeErrorZ_clone_ptr(LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR arg);
9058         export function CResult_ChannelUpdateDecodeErrorZ_clone_ptr(arg: number): number {
9059                 if(!isWasmInitialized) {
9060                         throw new Error("initializeWasm() must be awaited first!");
9061                 }
9062                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_clone_ptr(arg);
9063                 return nativeResponseValue;
9064         }
9065         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
9066         export function CResult_ChannelUpdateDecodeErrorZ_clone(orig: number): number {
9067                 if(!isWasmInitialized) {
9068                         throw new Error("initializeWasm() must be awaited first!");
9069                 }
9070                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_clone(orig);
9071                 return nativeResponseValue;
9072         }
9073         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_ok(struct LDKErrorMessage o);
9074         export function CResult_ErrorMessageDecodeErrorZ_ok(o: number): number {
9075                 if(!isWasmInitialized) {
9076                         throw new Error("initializeWasm() must be awaited first!");
9077                 }
9078                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_ok(o);
9079                 return nativeResponseValue;
9080         }
9081         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_err(struct LDKDecodeError e);
9082         export function CResult_ErrorMessageDecodeErrorZ_err(e: number): number {
9083                 if(!isWasmInitialized) {
9084                         throw new Error("initializeWasm() must be awaited first!");
9085                 }
9086                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_err(e);
9087                 return nativeResponseValue;
9088         }
9089         // bool CResult_ErrorMessageDecodeErrorZ_is_ok(const struct LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR o);
9090         export function CResult_ErrorMessageDecodeErrorZ_is_ok(o: number): boolean {
9091                 if(!isWasmInitialized) {
9092                         throw new Error("initializeWasm() must be awaited first!");
9093                 }
9094                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_is_ok(o);
9095                 return nativeResponseValue;
9096         }
9097         // void CResult_ErrorMessageDecodeErrorZ_free(struct LDKCResult_ErrorMessageDecodeErrorZ _res);
9098         export function CResult_ErrorMessageDecodeErrorZ_free(_res: number): void {
9099                 if(!isWasmInitialized) {
9100                         throw new Error("initializeWasm() must be awaited first!");
9101                 }
9102                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_free(_res);
9103                 // debug statements here
9104         }
9105         // uint64_t CResult_ErrorMessageDecodeErrorZ_clone_ptr(LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR arg);
9106         export function CResult_ErrorMessageDecodeErrorZ_clone_ptr(arg: number): number {
9107                 if(!isWasmInitialized) {
9108                         throw new Error("initializeWasm() must be awaited first!");
9109                 }
9110                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_clone_ptr(arg);
9111                 return nativeResponseValue;
9112         }
9113         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_clone(const struct LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR orig);
9114         export function CResult_ErrorMessageDecodeErrorZ_clone(orig: number): number {
9115                 if(!isWasmInitialized) {
9116                         throw new Error("initializeWasm() must be awaited first!");
9117                 }
9118                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_clone(orig);
9119                 return nativeResponseValue;
9120         }
9121         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(struct LDKUnsignedNodeAnnouncement o);
9122         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o: number): number {
9123                 if(!isWasmInitialized) {
9124                         throw new Error("initializeWasm() must be awaited first!");
9125                 }
9126                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o);
9127                 return nativeResponseValue;
9128         }
9129         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
9130         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e: number): number {
9131                 if(!isWasmInitialized) {
9132                         throw new Error("initializeWasm() must be awaited first!");
9133                 }
9134                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e);
9135                 return nativeResponseValue;
9136         }
9137         // bool CResult_UnsignedNodeAnnouncementDecodeErrorZ_is_ok(const struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR o);
9138         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_is_ok(o: number): boolean {
9139                 if(!isWasmInitialized) {
9140                         throw new Error("initializeWasm() must be awaited first!");
9141                 }
9142                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_is_ok(o);
9143                 return nativeResponseValue;
9144         }
9145         // void CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res);
9146         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res: number): void {
9147                 if(!isWasmInitialized) {
9148                         throw new Error("initializeWasm() must be awaited first!");
9149                 }
9150                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res);
9151                 // debug statements here
9152         }
9153         // uint64_t CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone_ptr(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR arg);
9154         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone_ptr(arg: number): number {
9155                 if(!isWasmInitialized) {
9156                         throw new Error("initializeWasm() must be awaited first!");
9157                 }
9158                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone_ptr(arg);
9159                 return nativeResponseValue;
9160         }
9161         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
9162         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig: number): number {
9163                 if(!isWasmInitialized) {
9164                         throw new Error("initializeWasm() must be awaited first!");
9165                 }
9166                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig);
9167                 return nativeResponseValue;
9168         }
9169         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_ok(struct LDKNodeAnnouncement o);
9170         export function CResult_NodeAnnouncementDecodeErrorZ_ok(o: number): number {
9171                 if(!isWasmInitialized) {
9172                         throw new Error("initializeWasm() must be awaited first!");
9173                 }
9174                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_ok(o);
9175                 return nativeResponseValue;
9176         }
9177         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
9178         export function CResult_NodeAnnouncementDecodeErrorZ_err(e: number): number {
9179                 if(!isWasmInitialized) {
9180                         throw new Error("initializeWasm() must be awaited first!");
9181                 }
9182                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_err(e);
9183                 return nativeResponseValue;
9184         }
9185         // bool CResult_NodeAnnouncementDecodeErrorZ_is_ok(const struct LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR o);
9186         export function CResult_NodeAnnouncementDecodeErrorZ_is_ok(o: number): boolean {
9187                 if(!isWasmInitialized) {
9188                         throw new Error("initializeWasm() must be awaited first!");
9189                 }
9190                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_is_ok(o);
9191                 return nativeResponseValue;
9192         }
9193         // void CResult_NodeAnnouncementDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementDecodeErrorZ _res);
9194         export function CResult_NodeAnnouncementDecodeErrorZ_free(_res: number): void {
9195                 if(!isWasmInitialized) {
9196                         throw new Error("initializeWasm() must be awaited first!");
9197                 }
9198                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_free(_res);
9199                 // debug statements here
9200         }
9201         // uint64_t CResult_NodeAnnouncementDecodeErrorZ_clone_ptr(LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR arg);
9202         export function CResult_NodeAnnouncementDecodeErrorZ_clone_ptr(arg: number): number {
9203                 if(!isWasmInitialized) {
9204                         throw new Error("initializeWasm() must be awaited first!");
9205                 }
9206                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_clone_ptr(arg);
9207                 return nativeResponseValue;
9208         }
9209         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
9210         export function CResult_NodeAnnouncementDecodeErrorZ_clone(orig: number): number {
9211                 if(!isWasmInitialized) {
9212                         throw new Error("initializeWasm() must be awaited first!");
9213                 }
9214                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_clone(orig);
9215                 return nativeResponseValue;
9216         }
9217         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_ok(struct LDKQueryShortChannelIds o);
9218         export function CResult_QueryShortChannelIdsDecodeErrorZ_ok(o: number): number {
9219                 if(!isWasmInitialized) {
9220                         throw new Error("initializeWasm() must be awaited first!");
9221                 }
9222                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_ok(o);
9223                 return nativeResponseValue;
9224         }
9225         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_err(struct LDKDecodeError e);
9226         export function CResult_QueryShortChannelIdsDecodeErrorZ_err(e: number): number {
9227                 if(!isWasmInitialized) {
9228                         throw new Error("initializeWasm() must be awaited first!");
9229                 }
9230                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_err(e);
9231                 return nativeResponseValue;
9232         }
9233         // bool CResult_QueryShortChannelIdsDecodeErrorZ_is_ok(const struct LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR o);
9234         export function CResult_QueryShortChannelIdsDecodeErrorZ_is_ok(o: number): boolean {
9235                 if(!isWasmInitialized) {
9236                         throw new Error("initializeWasm() must be awaited first!");
9237                 }
9238                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_is_ok(o);
9239                 return nativeResponseValue;
9240         }
9241         // void CResult_QueryShortChannelIdsDecodeErrorZ_free(struct LDKCResult_QueryShortChannelIdsDecodeErrorZ _res);
9242         export function CResult_QueryShortChannelIdsDecodeErrorZ_free(_res: number): void {
9243                 if(!isWasmInitialized) {
9244                         throw new Error("initializeWasm() must be awaited first!");
9245                 }
9246                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_free(_res);
9247                 // debug statements here
9248         }
9249         // uint64_t CResult_QueryShortChannelIdsDecodeErrorZ_clone_ptr(LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR arg);
9250         export function CResult_QueryShortChannelIdsDecodeErrorZ_clone_ptr(arg: number): number {
9251                 if(!isWasmInitialized) {
9252                         throw new Error("initializeWasm() must be awaited first!");
9253                 }
9254                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_clone_ptr(arg);
9255                 return nativeResponseValue;
9256         }
9257         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_clone(const struct LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR orig);
9258         export function CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig: number): number {
9259                 if(!isWasmInitialized) {
9260                         throw new Error("initializeWasm() must be awaited first!");
9261                 }
9262                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig);
9263                 return nativeResponseValue;
9264         }
9265         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(struct LDKReplyShortChannelIdsEnd o);
9266         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o: number): number {
9267                 if(!isWasmInitialized) {
9268                         throw new Error("initializeWasm() must be awaited first!");
9269                 }
9270                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o);
9271                 return nativeResponseValue;
9272         }
9273         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(struct LDKDecodeError e);
9274         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e: number): number {
9275                 if(!isWasmInitialized) {
9276                         throw new Error("initializeWasm() must be awaited first!");
9277                 }
9278                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e);
9279                 return nativeResponseValue;
9280         }
9281         // bool CResult_ReplyShortChannelIdsEndDecodeErrorZ_is_ok(const struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR o);
9282         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_is_ok(o: number): boolean {
9283                 if(!isWasmInitialized) {
9284                         throw new Error("initializeWasm() must be awaited first!");
9285                 }
9286                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_is_ok(o);
9287                 return nativeResponseValue;
9288         }
9289         // void CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res);
9290         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res: number): void {
9291                 if(!isWasmInitialized) {
9292                         throw new Error("initializeWasm() must be awaited first!");
9293                 }
9294                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res);
9295                 // debug statements here
9296         }
9297         // uint64_t CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone_ptr(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR arg);
9298         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone_ptr(arg: number): number {
9299                 if(!isWasmInitialized) {
9300                         throw new Error("initializeWasm() must be awaited first!");
9301                 }
9302                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone_ptr(arg);
9303                 return nativeResponseValue;
9304         }
9305         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(const struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR orig);
9306         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig: number): number {
9307                 if(!isWasmInitialized) {
9308                         throw new Error("initializeWasm() must be awaited first!");
9309                 }
9310                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig);
9311                 return nativeResponseValue;
9312         }
9313         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_ok(struct LDKQueryChannelRange o);
9314         export function CResult_QueryChannelRangeDecodeErrorZ_ok(o: number): number {
9315                 if(!isWasmInitialized) {
9316                         throw new Error("initializeWasm() must be awaited first!");
9317                 }
9318                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_ok(o);
9319                 return nativeResponseValue;
9320         }
9321         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
9322         export function CResult_QueryChannelRangeDecodeErrorZ_err(e: number): number {
9323                 if(!isWasmInitialized) {
9324                         throw new Error("initializeWasm() must be awaited first!");
9325                 }
9326                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_err(e);
9327                 return nativeResponseValue;
9328         }
9329         // bool CResult_QueryChannelRangeDecodeErrorZ_is_ok(const struct LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR o);
9330         export function CResult_QueryChannelRangeDecodeErrorZ_is_ok(o: number): boolean {
9331                 if(!isWasmInitialized) {
9332                         throw new Error("initializeWasm() must be awaited first!");
9333                 }
9334                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_is_ok(o);
9335                 return nativeResponseValue;
9336         }
9337         // void CResult_QueryChannelRangeDecodeErrorZ_free(struct LDKCResult_QueryChannelRangeDecodeErrorZ _res);
9338         export function CResult_QueryChannelRangeDecodeErrorZ_free(_res: number): void {
9339                 if(!isWasmInitialized) {
9340                         throw new Error("initializeWasm() must be awaited first!");
9341                 }
9342                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_free(_res);
9343                 // debug statements here
9344         }
9345         // uint64_t CResult_QueryChannelRangeDecodeErrorZ_clone_ptr(LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR arg);
9346         export function CResult_QueryChannelRangeDecodeErrorZ_clone_ptr(arg: number): number {
9347                 if(!isWasmInitialized) {
9348                         throw new Error("initializeWasm() must be awaited first!");
9349                 }
9350                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_clone_ptr(arg);
9351                 return nativeResponseValue;
9352         }
9353         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_clone(const struct LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR orig);
9354         export function CResult_QueryChannelRangeDecodeErrorZ_clone(orig: number): number {
9355                 if(!isWasmInitialized) {
9356                         throw new Error("initializeWasm() must be awaited first!");
9357                 }
9358                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_clone(orig);
9359                 return nativeResponseValue;
9360         }
9361         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_ok(struct LDKReplyChannelRange o);
9362         export function CResult_ReplyChannelRangeDecodeErrorZ_ok(o: number): number {
9363                 if(!isWasmInitialized) {
9364                         throw new Error("initializeWasm() must be awaited first!");
9365                 }
9366                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_ok(o);
9367                 return nativeResponseValue;
9368         }
9369         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
9370         export function CResult_ReplyChannelRangeDecodeErrorZ_err(e: number): number {
9371                 if(!isWasmInitialized) {
9372                         throw new Error("initializeWasm() must be awaited first!");
9373                 }
9374                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_err(e);
9375                 return nativeResponseValue;
9376         }
9377         // bool CResult_ReplyChannelRangeDecodeErrorZ_is_ok(const struct LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR o);
9378         export function CResult_ReplyChannelRangeDecodeErrorZ_is_ok(o: number): boolean {
9379                 if(!isWasmInitialized) {
9380                         throw new Error("initializeWasm() must be awaited first!");
9381                 }
9382                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_is_ok(o);
9383                 return nativeResponseValue;
9384         }
9385         // void CResult_ReplyChannelRangeDecodeErrorZ_free(struct LDKCResult_ReplyChannelRangeDecodeErrorZ _res);
9386         export function CResult_ReplyChannelRangeDecodeErrorZ_free(_res: number): void {
9387                 if(!isWasmInitialized) {
9388                         throw new Error("initializeWasm() must be awaited first!");
9389                 }
9390                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_free(_res);
9391                 // debug statements here
9392         }
9393         // uint64_t CResult_ReplyChannelRangeDecodeErrorZ_clone_ptr(LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR arg);
9394         export function CResult_ReplyChannelRangeDecodeErrorZ_clone_ptr(arg: number): number {
9395                 if(!isWasmInitialized) {
9396                         throw new Error("initializeWasm() must be awaited first!");
9397                 }
9398                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_clone_ptr(arg);
9399                 return nativeResponseValue;
9400         }
9401         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_clone(const struct LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR orig);
9402         export function CResult_ReplyChannelRangeDecodeErrorZ_clone(orig: number): number {
9403                 if(!isWasmInitialized) {
9404                         throw new Error("initializeWasm() must be awaited first!");
9405                 }
9406                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_clone(orig);
9407                 return nativeResponseValue;
9408         }
9409         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_ok(struct LDKGossipTimestampFilter o);
9410         export function CResult_GossipTimestampFilterDecodeErrorZ_ok(o: number): number {
9411                 if(!isWasmInitialized) {
9412                         throw new Error("initializeWasm() must be awaited first!");
9413                 }
9414                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_ok(o);
9415                 return nativeResponseValue;
9416         }
9417         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_err(struct LDKDecodeError e);
9418         export function CResult_GossipTimestampFilterDecodeErrorZ_err(e: number): number {
9419                 if(!isWasmInitialized) {
9420                         throw new Error("initializeWasm() must be awaited first!");
9421                 }
9422                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_err(e);
9423                 return nativeResponseValue;
9424         }
9425         // bool CResult_GossipTimestampFilterDecodeErrorZ_is_ok(const struct LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR o);
9426         export function CResult_GossipTimestampFilterDecodeErrorZ_is_ok(o: number): boolean {
9427                 if(!isWasmInitialized) {
9428                         throw new Error("initializeWasm() must be awaited first!");
9429                 }
9430                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_is_ok(o);
9431                 return nativeResponseValue;
9432         }
9433         // void CResult_GossipTimestampFilterDecodeErrorZ_free(struct LDKCResult_GossipTimestampFilterDecodeErrorZ _res);
9434         export function CResult_GossipTimestampFilterDecodeErrorZ_free(_res: number): void {
9435                 if(!isWasmInitialized) {
9436                         throw new Error("initializeWasm() must be awaited first!");
9437                 }
9438                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_free(_res);
9439                 // debug statements here
9440         }
9441         // uint64_t CResult_GossipTimestampFilterDecodeErrorZ_clone_ptr(LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR arg);
9442         export function CResult_GossipTimestampFilterDecodeErrorZ_clone_ptr(arg: number): number {
9443                 if(!isWasmInitialized) {
9444                         throw new Error("initializeWasm() must be awaited first!");
9445                 }
9446                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_clone_ptr(arg);
9447                 return nativeResponseValue;
9448         }
9449         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_clone(const struct LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR orig);
9450         export function CResult_GossipTimestampFilterDecodeErrorZ_clone(orig: number): number {
9451                 if(!isWasmInitialized) {
9452                         throw new Error("initializeWasm() must be awaited first!");
9453                 }
9454                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_clone(orig);
9455                 return nativeResponseValue;
9456         }
9457         // struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_ok(struct LDKInvoice o);
9458         export function CResult_InvoiceSignOrCreationErrorZ_ok(o: number): number {
9459                 if(!isWasmInitialized) {
9460                         throw new Error("initializeWasm() must be awaited first!");
9461                 }
9462                 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_ok(o);
9463                 return nativeResponseValue;
9464         }
9465         // struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_err(struct LDKSignOrCreationError e);
9466         export function CResult_InvoiceSignOrCreationErrorZ_err(e: number): number {
9467                 if(!isWasmInitialized) {
9468                         throw new Error("initializeWasm() must be awaited first!");
9469                 }
9470                 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_err(e);
9471                 return nativeResponseValue;
9472         }
9473         // bool CResult_InvoiceSignOrCreationErrorZ_is_ok(const struct LDKCResult_InvoiceSignOrCreationErrorZ *NONNULL_PTR o);
9474         export function CResult_InvoiceSignOrCreationErrorZ_is_ok(o: number): boolean {
9475                 if(!isWasmInitialized) {
9476                         throw new Error("initializeWasm() must be awaited first!");
9477                 }
9478                 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_is_ok(o);
9479                 return nativeResponseValue;
9480         }
9481         // void CResult_InvoiceSignOrCreationErrorZ_free(struct LDKCResult_InvoiceSignOrCreationErrorZ _res);
9482         export function CResult_InvoiceSignOrCreationErrorZ_free(_res: number): void {
9483                 if(!isWasmInitialized) {
9484                         throw new Error("initializeWasm() must be awaited first!");
9485                 }
9486                 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_free(_res);
9487                 // debug statements here
9488         }
9489         // uint64_t CResult_InvoiceSignOrCreationErrorZ_clone_ptr(LDKCResult_InvoiceSignOrCreationErrorZ *NONNULL_PTR arg);
9490         export function CResult_InvoiceSignOrCreationErrorZ_clone_ptr(arg: number): number {
9491                 if(!isWasmInitialized) {
9492                         throw new Error("initializeWasm() must be awaited first!");
9493                 }
9494                 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_clone_ptr(arg);
9495                 return nativeResponseValue;
9496         }
9497         // struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_clone(const struct LDKCResult_InvoiceSignOrCreationErrorZ *NONNULL_PTR orig);
9498         export function CResult_InvoiceSignOrCreationErrorZ_clone(orig: number): number {
9499                 if(!isWasmInitialized) {
9500                         throw new Error("initializeWasm() must be awaited first!");
9501                 }
9502                 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_clone(orig);
9503                 return nativeResponseValue;
9504         }
9505         // struct LDKCOption_FilterZ COption_FilterZ_some(struct LDKFilter o);
9506         export function COption_FilterZ_some(o: number): number {
9507                 if(!isWasmInitialized) {
9508                         throw new Error("initializeWasm() must be awaited first!");
9509                 }
9510                 const nativeResponseValue = wasm.COption_FilterZ_some(o);
9511                 return nativeResponseValue;
9512         }
9513         // struct LDKCOption_FilterZ COption_FilterZ_none(void);
9514         export function COption_FilterZ_none(): number {
9515                 if(!isWasmInitialized) {
9516                         throw new Error("initializeWasm() must be awaited first!");
9517                 }
9518                 const nativeResponseValue = wasm.COption_FilterZ_none();
9519                 return nativeResponseValue;
9520         }
9521         // void COption_FilterZ_free(struct LDKCOption_FilterZ _res);
9522         export function COption_FilterZ_free(_res: number): void {
9523                 if(!isWasmInitialized) {
9524                         throw new Error("initializeWasm() must be awaited first!");
9525                 }
9526                 const nativeResponseValue = wasm.COption_FilterZ_free(_res);
9527                 // debug statements here
9528         }
9529         // struct LDKCResult_LockedChannelMonitorNoneZ CResult_LockedChannelMonitorNoneZ_ok(struct LDKLockedChannelMonitor o);
9530         export function CResult_LockedChannelMonitorNoneZ_ok(o: number): number {
9531                 if(!isWasmInitialized) {
9532                         throw new Error("initializeWasm() must be awaited first!");
9533                 }
9534                 const nativeResponseValue = wasm.CResult_LockedChannelMonitorNoneZ_ok(o);
9535                 return nativeResponseValue;
9536         }
9537         // struct LDKCResult_LockedChannelMonitorNoneZ CResult_LockedChannelMonitorNoneZ_err(void);
9538         export function CResult_LockedChannelMonitorNoneZ_err(): number {
9539                 if(!isWasmInitialized) {
9540                         throw new Error("initializeWasm() must be awaited first!");
9541                 }
9542                 const nativeResponseValue = wasm.CResult_LockedChannelMonitorNoneZ_err();
9543                 return nativeResponseValue;
9544         }
9545         // bool CResult_LockedChannelMonitorNoneZ_is_ok(const struct LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR o);
9546         export function CResult_LockedChannelMonitorNoneZ_is_ok(o: number): boolean {
9547                 if(!isWasmInitialized) {
9548                         throw new Error("initializeWasm() must be awaited first!");
9549                 }
9550                 const nativeResponseValue = wasm.CResult_LockedChannelMonitorNoneZ_is_ok(o);
9551                 return nativeResponseValue;
9552         }
9553         // void CResult_LockedChannelMonitorNoneZ_free(struct LDKCResult_LockedChannelMonitorNoneZ _res);
9554         export function CResult_LockedChannelMonitorNoneZ_free(_res: number): void {
9555                 if(!isWasmInitialized) {
9556                         throw new Error("initializeWasm() must be awaited first!");
9557                 }
9558                 const nativeResponseValue = wasm.CResult_LockedChannelMonitorNoneZ_free(_res);
9559                 // debug statements here
9560         }
9561         // void CVec_OutPointZ_free(struct LDKCVec_OutPointZ _res);
9562         export function CVec_OutPointZ_free(_res: number[]): void {
9563                 if(!isWasmInitialized) {
9564                         throw new Error("initializeWasm() must be awaited first!");
9565                 }
9566                 const nativeResponseValue = wasm.CVec_OutPointZ_free(_res);
9567                 // debug statements here
9568         }
9569         // void PaymentPurpose_free(struct LDKPaymentPurpose this_ptr);
9570         export function PaymentPurpose_free(this_ptr: number): void {
9571                 if(!isWasmInitialized) {
9572                         throw new Error("initializeWasm() must be awaited first!");
9573                 }
9574                 const nativeResponseValue = wasm.PaymentPurpose_free(this_ptr);
9575                 // debug statements here
9576         }
9577         // uint64_t PaymentPurpose_clone_ptr(LDKPaymentPurpose *NONNULL_PTR arg);
9578         export function PaymentPurpose_clone_ptr(arg: number): number {
9579                 if(!isWasmInitialized) {
9580                         throw new Error("initializeWasm() must be awaited first!");
9581                 }
9582                 const nativeResponseValue = wasm.PaymentPurpose_clone_ptr(arg);
9583                 return nativeResponseValue;
9584         }
9585         // struct LDKPaymentPurpose PaymentPurpose_clone(const struct LDKPaymentPurpose *NONNULL_PTR orig);
9586         export function PaymentPurpose_clone(orig: number): number {
9587                 if(!isWasmInitialized) {
9588                         throw new Error("initializeWasm() must be awaited first!");
9589                 }
9590                 const nativeResponseValue = wasm.PaymentPurpose_clone(orig);
9591                 return nativeResponseValue;
9592         }
9593         // struct LDKPaymentPurpose PaymentPurpose_invoice_payment(struct LDKThirtyTwoBytes payment_preimage, struct LDKThirtyTwoBytes payment_secret);
9594         export function PaymentPurpose_invoice_payment(payment_preimage: Uint8Array, payment_secret: Uint8Array): number {
9595                 if(!isWasmInitialized) {
9596                         throw new Error("initializeWasm() must be awaited first!");
9597                 }
9598                 const nativeResponseValue = wasm.PaymentPurpose_invoice_payment(encodeArray(payment_preimage), encodeArray(payment_secret));
9599                 return nativeResponseValue;
9600         }
9601         // struct LDKPaymentPurpose PaymentPurpose_spontaneous_payment(struct LDKThirtyTwoBytes a);
9602         export function PaymentPurpose_spontaneous_payment(a: Uint8Array): number {
9603                 if(!isWasmInitialized) {
9604                         throw new Error("initializeWasm() must be awaited first!");
9605                 }
9606                 const nativeResponseValue = wasm.PaymentPurpose_spontaneous_payment(encodeArray(a));
9607                 return nativeResponseValue;
9608         }
9609         // void ClosureReason_free(struct LDKClosureReason this_ptr);
9610         export function ClosureReason_free(this_ptr: number): void {
9611                 if(!isWasmInitialized) {
9612                         throw new Error("initializeWasm() must be awaited first!");
9613                 }
9614                 const nativeResponseValue = wasm.ClosureReason_free(this_ptr);
9615                 // debug statements here
9616         }
9617         // uint64_t ClosureReason_clone_ptr(LDKClosureReason *NONNULL_PTR arg);
9618         export function ClosureReason_clone_ptr(arg: number): number {
9619                 if(!isWasmInitialized) {
9620                         throw new Error("initializeWasm() must be awaited first!");
9621                 }
9622                 const nativeResponseValue = wasm.ClosureReason_clone_ptr(arg);
9623                 return nativeResponseValue;
9624         }
9625         // struct LDKClosureReason ClosureReason_clone(const struct LDKClosureReason *NONNULL_PTR orig);
9626         export function ClosureReason_clone(orig: number): number {
9627                 if(!isWasmInitialized) {
9628                         throw new Error("initializeWasm() must be awaited first!");
9629                 }
9630                 const nativeResponseValue = wasm.ClosureReason_clone(orig);
9631                 return nativeResponseValue;
9632         }
9633         // struct LDKClosureReason ClosureReason_counterparty_force_closed(struct LDKStr peer_msg);
9634         export function ClosureReason_counterparty_force_closed(peer_msg: String): number {
9635                 if(!isWasmInitialized) {
9636                         throw new Error("initializeWasm() must be awaited first!");
9637                 }
9638                 const nativeResponseValue = wasm.ClosureReason_counterparty_force_closed(peer_msg);
9639                 return nativeResponseValue;
9640         }
9641         // struct LDKClosureReason ClosureReason_holder_force_closed(void);
9642         export function ClosureReason_holder_force_closed(): number {
9643                 if(!isWasmInitialized) {
9644                         throw new Error("initializeWasm() must be awaited first!");
9645                 }
9646                 const nativeResponseValue = wasm.ClosureReason_holder_force_closed();
9647                 return nativeResponseValue;
9648         }
9649         // struct LDKClosureReason ClosureReason_cooperative_closure(void);
9650         export function ClosureReason_cooperative_closure(): number {
9651                 if(!isWasmInitialized) {
9652                         throw new Error("initializeWasm() must be awaited first!");
9653                 }
9654                 const nativeResponseValue = wasm.ClosureReason_cooperative_closure();
9655                 return nativeResponseValue;
9656         }
9657         // struct LDKClosureReason ClosureReason_commitment_tx_confirmed(void);
9658         export function ClosureReason_commitment_tx_confirmed(): number {
9659                 if(!isWasmInitialized) {
9660                         throw new Error("initializeWasm() must be awaited first!");
9661                 }
9662                 const nativeResponseValue = wasm.ClosureReason_commitment_tx_confirmed();
9663                 return nativeResponseValue;
9664         }
9665         // struct LDKClosureReason ClosureReason_funding_timed_out(void);
9666         export function ClosureReason_funding_timed_out(): number {
9667                 if(!isWasmInitialized) {
9668                         throw new Error("initializeWasm() must be awaited first!");
9669                 }
9670                 const nativeResponseValue = wasm.ClosureReason_funding_timed_out();
9671                 return nativeResponseValue;
9672         }
9673         // struct LDKClosureReason ClosureReason_processing_error(struct LDKStr err);
9674         export function ClosureReason_processing_error(err: String): number {
9675                 if(!isWasmInitialized) {
9676                         throw new Error("initializeWasm() must be awaited first!");
9677                 }
9678                 const nativeResponseValue = wasm.ClosureReason_processing_error(err);
9679                 return nativeResponseValue;
9680         }
9681         // struct LDKClosureReason ClosureReason_disconnected_peer(void);
9682         export function ClosureReason_disconnected_peer(): number {
9683                 if(!isWasmInitialized) {
9684                         throw new Error("initializeWasm() must be awaited first!");
9685                 }
9686                 const nativeResponseValue = wasm.ClosureReason_disconnected_peer();
9687                 return nativeResponseValue;
9688         }
9689         // struct LDKClosureReason ClosureReason_outdated_channel_manager(void);
9690         export function ClosureReason_outdated_channel_manager(): number {
9691                 if(!isWasmInitialized) {
9692                         throw new Error("initializeWasm() must be awaited first!");
9693                 }
9694                 const nativeResponseValue = wasm.ClosureReason_outdated_channel_manager();
9695                 return nativeResponseValue;
9696         }
9697         // struct LDKCVec_u8Z ClosureReason_write(const struct LDKClosureReason *NONNULL_PTR obj);
9698         export function ClosureReason_write(obj: number): Uint8Array {
9699                 if(!isWasmInitialized) {
9700                         throw new Error("initializeWasm() must be awaited first!");
9701                 }
9702                 const nativeResponseValue = wasm.ClosureReason_write(obj);
9703                 return decodeArray(nativeResponseValue);
9704         }
9705         // struct LDKCResult_COption_ClosureReasonZDecodeErrorZ ClosureReason_read(struct LDKu8slice ser);
9706         export function ClosureReason_read(ser: Uint8Array): number {
9707                 if(!isWasmInitialized) {
9708                         throw new Error("initializeWasm() must be awaited first!");
9709                 }
9710                 const nativeResponseValue = wasm.ClosureReason_read(encodeArray(ser));
9711                 return nativeResponseValue;
9712         }
9713         // void Event_free(struct LDKEvent this_ptr);
9714         export function Event_free(this_ptr: number): void {
9715                 if(!isWasmInitialized) {
9716                         throw new Error("initializeWasm() must be awaited first!");
9717                 }
9718                 const nativeResponseValue = wasm.Event_free(this_ptr);
9719                 // debug statements here
9720         }
9721         // uint64_t Event_clone_ptr(LDKEvent *NONNULL_PTR arg);
9722         export function Event_clone_ptr(arg: number): number {
9723                 if(!isWasmInitialized) {
9724                         throw new Error("initializeWasm() must be awaited first!");
9725                 }
9726                 const nativeResponseValue = wasm.Event_clone_ptr(arg);
9727                 return nativeResponseValue;
9728         }
9729         // struct LDKEvent Event_clone(const struct LDKEvent *NONNULL_PTR orig);
9730         export function Event_clone(orig: number): number {
9731                 if(!isWasmInitialized) {
9732                         throw new Error("initializeWasm() must be awaited first!");
9733                 }
9734                 const nativeResponseValue = wasm.Event_clone(orig);
9735                 return nativeResponseValue;
9736         }
9737         // struct LDKEvent Event_funding_generation_ready(struct LDKThirtyTwoBytes temporary_channel_id, uint64_t channel_value_satoshis, struct LDKCVec_u8Z output_script, uint64_t user_channel_id);
9738         export function Event_funding_generation_ready(temporary_channel_id: Uint8Array, channel_value_satoshis: number, output_script: Uint8Array, user_channel_id: number): number {
9739                 if(!isWasmInitialized) {
9740                         throw new Error("initializeWasm() must be awaited first!");
9741                 }
9742                 const nativeResponseValue = wasm.Event_funding_generation_ready(encodeArray(temporary_channel_id), channel_value_satoshis, encodeArray(output_script), user_channel_id);
9743                 return nativeResponseValue;
9744         }
9745         // struct LDKEvent Event_payment_received(struct LDKThirtyTwoBytes payment_hash, uint64_t amt, struct LDKPaymentPurpose purpose);
9746         export function Event_payment_received(payment_hash: Uint8Array, amt: number, purpose: number): number {
9747                 if(!isWasmInitialized) {
9748                         throw new Error("initializeWasm() must be awaited first!");
9749                 }
9750                 const nativeResponseValue = wasm.Event_payment_received(encodeArray(payment_hash), amt, purpose);
9751                 return nativeResponseValue;
9752         }
9753         // struct LDKEvent Event_payment_sent(struct LDKThirtyTwoBytes payment_id, struct LDKThirtyTwoBytes payment_preimage, struct LDKThirtyTwoBytes payment_hash, struct LDKCOption_u64Z fee_paid_msat);
9754         export function Event_payment_sent(payment_id: Uint8Array, payment_preimage: Uint8Array, payment_hash: Uint8Array, fee_paid_msat: number): number {
9755                 if(!isWasmInitialized) {
9756                         throw new Error("initializeWasm() must be awaited first!");
9757                 }
9758                 const nativeResponseValue = wasm.Event_payment_sent(encodeArray(payment_id), encodeArray(payment_preimage), encodeArray(payment_hash), fee_paid_msat);
9759                 return nativeResponseValue;
9760         }
9761         // struct LDKEvent Event_payment_path_failed(struct LDKThirtyTwoBytes payment_id, struct LDKThirtyTwoBytes payment_hash, bool rejected_by_dest, struct LDKCOption_NetworkUpdateZ network_update, bool all_paths_failed, struct LDKCVec_RouteHopZ path, struct LDKCOption_u64Z short_channel_id, struct LDKRouteParameters retry);
9762         export function Event_payment_path_failed(payment_id: Uint8Array, payment_hash: Uint8Array, rejected_by_dest: boolean, network_update: number, all_paths_failed: boolean, path: number[], short_channel_id: number, retry: number): number {
9763                 if(!isWasmInitialized) {
9764                         throw new Error("initializeWasm() must be awaited first!");
9765                 }
9766                 const nativeResponseValue = wasm.Event_payment_path_failed(encodeArray(payment_id), encodeArray(payment_hash), rejected_by_dest, network_update, all_paths_failed, path, short_channel_id, retry);
9767                 return nativeResponseValue;
9768         }
9769         // struct LDKEvent Event_payment_failed(struct LDKThirtyTwoBytes payment_id, struct LDKThirtyTwoBytes payment_hash);
9770         export function Event_payment_failed(payment_id: Uint8Array, payment_hash: Uint8Array): number {
9771                 if(!isWasmInitialized) {
9772                         throw new Error("initializeWasm() must be awaited first!");
9773                 }
9774                 const nativeResponseValue = wasm.Event_payment_failed(encodeArray(payment_id), encodeArray(payment_hash));
9775                 return nativeResponseValue;
9776         }
9777         // struct LDKEvent Event_pending_htlcs_forwardable(uint64_t time_forwardable);
9778         export function Event_pending_htlcs_forwardable(time_forwardable: number): number {
9779                 if(!isWasmInitialized) {
9780                         throw new Error("initializeWasm() must be awaited first!");
9781                 }
9782                 const nativeResponseValue = wasm.Event_pending_htlcs_forwardable(time_forwardable);
9783                 return nativeResponseValue;
9784         }
9785         // struct LDKEvent Event_spendable_outputs(struct LDKCVec_SpendableOutputDescriptorZ outputs);
9786         export function Event_spendable_outputs(outputs: number[]): number {
9787                 if(!isWasmInitialized) {
9788                         throw new Error("initializeWasm() must be awaited first!");
9789                 }
9790                 const nativeResponseValue = wasm.Event_spendable_outputs(outputs);
9791                 return nativeResponseValue;
9792         }
9793         // struct LDKEvent Event_payment_forwarded(struct LDKCOption_u64Z fee_earned_msat, bool claim_from_onchain_tx);
9794         export function Event_payment_forwarded(fee_earned_msat: number, claim_from_onchain_tx: boolean): number {
9795                 if(!isWasmInitialized) {
9796                         throw new Error("initializeWasm() must be awaited first!");
9797                 }
9798                 const nativeResponseValue = wasm.Event_payment_forwarded(fee_earned_msat, claim_from_onchain_tx);
9799                 return nativeResponseValue;
9800         }
9801         // struct LDKEvent Event_channel_closed(struct LDKThirtyTwoBytes channel_id, uint64_t user_channel_id, struct LDKClosureReason reason);
9802         export function Event_channel_closed(channel_id: Uint8Array, user_channel_id: number, reason: number): number {
9803                 if(!isWasmInitialized) {
9804                         throw new Error("initializeWasm() must be awaited first!");
9805                 }
9806                 const nativeResponseValue = wasm.Event_channel_closed(encodeArray(channel_id), user_channel_id, reason);
9807                 return nativeResponseValue;
9808         }
9809         // struct LDKEvent Event_discard_funding(struct LDKThirtyTwoBytes channel_id, struct LDKTransaction transaction);
9810         export function Event_discard_funding(channel_id: Uint8Array, transaction: Uint8Array): number {
9811                 if(!isWasmInitialized) {
9812                         throw new Error("initializeWasm() must be awaited first!");
9813                 }
9814                 const nativeResponseValue = wasm.Event_discard_funding(encodeArray(channel_id), encodeArray(transaction));
9815                 return nativeResponseValue;
9816         }
9817         // struct LDKEvent Event_payment_path_successful(struct LDKThirtyTwoBytes payment_id, struct LDKThirtyTwoBytes payment_hash, struct LDKCVec_RouteHopZ path);
9818         export function Event_payment_path_successful(payment_id: Uint8Array, payment_hash: Uint8Array, path: number[]): number {
9819                 if(!isWasmInitialized) {
9820                         throw new Error("initializeWasm() must be awaited first!");
9821                 }
9822                 const nativeResponseValue = wasm.Event_payment_path_successful(encodeArray(payment_id), encodeArray(payment_hash), path);
9823                 return nativeResponseValue;
9824         }
9825         // struct LDKCVec_u8Z Event_write(const struct LDKEvent *NONNULL_PTR obj);
9826         export function Event_write(obj: number): Uint8Array {
9827                 if(!isWasmInitialized) {
9828                         throw new Error("initializeWasm() must be awaited first!");
9829                 }
9830                 const nativeResponseValue = wasm.Event_write(obj);
9831                 return decodeArray(nativeResponseValue);
9832         }
9833         // struct LDKCResult_COption_EventZDecodeErrorZ Event_read(struct LDKu8slice ser);
9834         export function Event_read(ser: Uint8Array): number {
9835                 if(!isWasmInitialized) {
9836                         throw new Error("initializeWasm() must be awaited first!");
9837                 }
9838                 const nativeResponseValue = wasm.Event_read(encodeArray(ser));
9839                 return nativeResponseValue;
9840         }
9841         // void MessageSendEvent_free(struct LDKMessageSendEvent this_ptr);
9842         export function MessageSendEvent_free(this_ptr: number): void {
9843                 if(!isWasmInitialized) {
9844                         throw new Error("initializeWasm() must be awaited first!");
9845                 }
9846                 const nativeResponseValue = wasm.MessageSendEvent_free(this_ptr);
9847                 // debug statements here
9848         }
9849         // uint64_t MessageSendEvent_clone_ptr(LDKMessageSendEvent *NONNULL_PTR arg);
9850         export function MessageSendEvent_clone_ptr(arg: number): number {
9851                 if(!isWasmInitialized) {
9852                         throw new Error("initializeWasm() must be awaited first!");
9853                 }
9854                 const nativeResponseValue = wasm.MessageSendEvent_clone_ptr(arg);
9855                 return nativeResponseValue;
9856         }
9857         // struct LDKMessageSendEvent MessageSendEvent_clone(const struct LDKMessageSendEvent *NONNULL_PTR orig);
9858         export function MessageSendEvent_clone(orig: number): number {
9859                 if(!isWasmInitialized) {
9860                         throw new Error("initializeWasm() must be awaited first!");
9861                 }
9862                 const nativeResponseValue = wasm.MessageSendEvent_clone(orig);
9863                 return nativeResponseValue;
9864         }
9865         // struct LDKMessageSendEvent MessageSendEvent_send_accept_channel(struct LDKPublicKey node_id, struct LDKAcceptChannel msg);
9866         export function MessageSendEvent_send_accept_channel(node_id: Uint8Array, msg: number): number {
9867                 if(!isWasmInitialized) {
9868                         throw new Error("initializeWasm() must be awaited first!");
9869                 }
9870                 const nativeResponseValue = wasm.MessageSendEvent_send_accept_channel(encodeArray(node_id), msg);
9871                 return nativeResponseValue;
9872         }
9873         // struct LDKMessageSendEvent MessageSendEvent_send_open_channel(struct LDKPublicKey node_id, struct LDKOpenChannel msg);
9874         export function MessageSendEvent_send_open_channel(node_id: Uint8Array, msg: number): number {
9875                 if(!isWasmInitialized) {
9876                         throw new Error("initializeWasm() must be awaited first!");
9877                 }
9878                 const nativeResponseValue = wasm.MessageSendEvent_send_open_channel(encodeArray(node_id), msg);
9879                 return nativeResponseValue;
9880         }
9881         // struct LDKMessageSendEvent MessageSendEvent_send_funding_created(struct LDKPublicKey node_id, struct LDKFundingCreated msg);
9882         export function MessageSendEvent_send_funding_created(node_id: Uint8Array, msg: number): number {
9883                 if(!isWasmInitialized) {
9884                         throw new Error("initializeWasm() must be awaited first!");
9885                 }
9886                 const nativeResponseValue = wasm.MessageSendEvent_send_funding_created(encodeArray(node_id), msg);
9887                 return nativeResponseValue;
9888         }
9889         // struct LDKMessageSendEvent MessageSendEvent_send_funding_signed(struct LDKPublicKey node_id, struct LDKFundingSigned msg);
9890         export function MessageSendEvent_send_funding_signed(node_id: Uint8Array, msg: number): number {
9891                 if(!isWasmInitialized) {
9892                         throw new Error("initializeWasm() must be awaited first!");
9893                 }
9894                 const nativeResponseValue = wasm.MessageSendEvent_send_funding_signed(encodeArray(node_id), msg);
9895                 return nativeResponseValue;
9896         }
9897         // struct LDKMessageSendEvent MessageSendEvent_send_funding_locked(struct LDKPublicKey node_id, struct LDKFundingLocked msg);
9898         export function MessageSendEvent_send_funding_locked(node_id: Uint8Array, msg: number): number {
9899                 if(!isWasmInitialized) {
9900                         throw new Error("initializeWasm() must be awaited first!");
9901                 }
9902                 const nativeResponseValue = wasm.MessageSendEvent_send_funding_locked(encodeArray(node_id), msg);
9903                 return nativeResponseValue;
9904         }
9905         // struct LDKMessageSendEvent MessageSendEvent_send_announcement_signatures(struct LDKPublicKey node_id, struct LDKAnnouncementSignatures msg);
9906         export function MessageSendEvent_send_announcement_signatures(node_id: Uint8Array, msg: number): number {
9907                 if(!isWasmInitialized) {
9908                         throw new Error("initializeWasm() must be awaited first!");
9909                 }
9910                 const nativeResponseValue = wasm.MessageSendEvent_send_announcement_signatures(encodeArray(node_id), msg);
9911                 return nativeResponseValue;
9912         }
9913         // struct LDKMessageSendEvent MessageSendEvent_update_htlcs(struct LDKPublicKey node_id, struct LDKCommitmentUpdate updates);
9914         export function MessageSendEvent_update_htlcs(node_id: Uint8Array, updates: number): number {
9915                 if(!isWasmInitialized) {
9916                         throw new Error("initializeWasm() must be awaited first!");
9917                 }
9918                 const nativeResponseValue = wasm.MessageSendEvent_update_htlcs(encodeArray(node_id), updates);
9919                 return nativeResponseValue;
9920         }
9921         // struct LDKMessageSendEvent MessageSendEvent_send_revoke_and_ack(struct LDKPublicKey node_id, struct LDKRevokeAndACK msg);
9922         export function MessageSendEvent_send_revoke_and_ack(node_id: Uint8Array, msg: number): number {
9923                 if(!isWasmInitialized) {
9924                         throw new Error("initializeWasm() must be awaited first!");
9925                 }
9926                 const nativeResponseValue = wasm.MessageSendEvent_send_revoke_and_ack(encodeArray(node_id), msg);
9927                 return nativeResponseValue;
9928         }
9929         // struct LDKMessageSendEvent MessageSendEvent_send_closing_signed(struct LDKPublicKey node_id, struct LDKClosingSigned msg);
9930         export function MessageSendEvent_send_closing_signed(node_id: Uint8Array, msg: number): number {
9931                 if(!isWasmInitialized) {
9932                         throw new Error("initializeWasm() must be awaited first!");
9933                 }
9934                 const nativeResponseValue = wasm.MessageSendEvent_send_closing_signed(encodeArray(node_id), msg);
9935                 return nativeResponseValue;
9936         }
9937         // struct LDKMessageSendEvent MessageSendEvent_send_shutdown(struct LDKPublicKey node_id, struct LDKShutdown msg);
9938         export function MessageSendEvent_send_shutdown(node_id: Uint8Array, msg: number): number {
9939                 if(!isWasmInitialized) {
9940                         throw new Error("initializeWasm() must be awaited first!");
9941                 }
9942                 const nativeResponseValue = wasm.MessageSendEvent_send_shutdown(encodeArray(node_id), msg);
9943                 return nativeResponseValue;
9944         }
9945         // struct LDKMessageSendEvent MessageSendEvent_send_channel_reestablish(struct LDKPublicKey node_id, struct LDKChannelReestablish msg);
9946         export function MessageSendEvent_send_channel_reestablish(node_id: Uint8Array, msg: number): number {
9947                 if(!isWasmInitialized) {
9948                         throw new Error("initializeWasm() must be awaited first!");
9949                 }
9950                 const nativeResponseValue = wasm.MessageSendEvent_send_channel_reestablish(encodeArray(node_id), msg);
9951                 return nativeResponseValue;
9952         }
9953         // struct LDKMessageSendEvent MessageSendEvent_broadcast_channel_announcement(struct LDKChannelAnnouncement msg, struct LDKChannelUpdate update_msg);
9954         export function MessageSendEvent_broadcast_channel_announcement(msg: number, update_msg: number): number {
9955                 if(!isWasmInitialized) {
9956                         throw new Error("initializeWasm() must be awaited first!");
9957                 }
9958                 const nativeResponseValue = wasm.MessageSendEvent_broadcast_channel_announcement(msg, update_msg);
9959                 return nativeResponseValue;
9960         }
9961         // struct LDKMessageSendEvent MessageSendEvent_broadcast_node_announcement(struct LDKNodeAnnouncement msg);
9962         export function MessageSendEvent_broadcast_node_announcement(msg: number): number {
9963                 if(!isWasmInitialized) {
9964                         throw new Error("initializeWasm() must be awaited first!");
9965                 }
9966                 const nativeResponseValue = wasm.MessageSendEvent_broadcast_node_announcement(msg);
9967                 return nativeResponseValue;
9968         }
9969         // struct LDKMessageSendEvent MessageSendEvent_broadcast_channel_update(struct LDKChannelUpdate msg);
9970         export function MessageSendEvent_broadcast_channel_update(msg: number): number {
9971                 if(!isWasmInitialized) {
9972                         throw new Error("initializeWasm() must be awaited first!");
9973                 }
9974                 const nativeResponseValue = wasm.MessageSendEvent_broadcast_channel_update(msg);
9975                 return nativeResponseValue;
9976         }
9977         // struct LDKMessageSendEvent MessageSendEvent_send_channel_update(struct LDKPublicKey node_id, struct LDKChannelUpdate msg);
9978         export function MessageSendEvent_send_channel_update(node_id: Uint8Array, msg: number): number {
9979                 if(!isWasmInitialized) {
9980                         throw new Error("initializeWasm() must be awaited first!");
9981                 }
9982                 const nativeResponseValue = wasm.MessageSendEvent_send_channel_update(encodeArray(node_id), msg);
9983                 return nativeResponseValue;
9984         }
9985         // struct LDKMessageSendEvent MessageSendEvent_handle_error(struct LDKPublicKey node_id, struct LDKErrorAction action);
9986         export function MessageSendEvent_handle_error(node_id: Uint8Array, action: number): number {
9987                 if(!isWasmInitialized) {
9988                         throw new Error("initializeWasm() must be awaited first!");
9989                 }
9990                 const nativeResponseValue = wasm.MessageSendEvent_handle_error(encodeArray(node_id), action);
9991                 return nativeResponseValue;
9992         }
9993         // struct LDKMessageSendEvent MessageSendEvent_send_channel_range_query(struct LDKPublicKey node_id, struct LDKQueryChannelRange msg);
9994         export function MessageSendEvent_send_channel_range_query(node_id: Uint8Array, msg: number): number {
9995                 if(!isWasmInitialized) {
9996                         throw new Error("initializeWasm() must be awaited first!");
9997                 }
9998                 const nativeResponseValue = wasm.MessageSendEvent_send_channel_range_query(encodeArray(node_id), msg);
9999                 return nativeResponseValue;
10000         }
10001         // struct LDKMessageSendEvent MessageSendEvent_send_short_ids_query(struct LDKPublicKey node_id, struct LDKQueryShortChannelIds msg);
10002         export function MessageSendEvent_send_short_ids_query(node_id: Uint8Array, msg: number): number {
10003                 if(!isWasmInitialized) {
10004                         throw new Error("initializeWasm() must be awaited first!");
10005                 }
10006                 const nativeResponseValue = wasm.MessageSendEvent_send_short_ids_query(encodeArray(node_id), msg);
10007                 return nativeResponseValue;
10008         }
10009         // struct LDKMessageSendEvent MessageSendEvent_send_reply_channel_range(struct LDKPublicKey node_id, struct LDKReplyChannelRange msg);
10010         export function MessageSendEvent_send_reply_channel_range(node_id: Uint8Array, msg: number): number {
10011                 if(!isWasmInitialized) {
10012                         throw new Error("initializeWasm() must be awaited first!");
10013                 }
10014                 const nativeResponseValue = wasm.MessageSendEvent_send_reply_channel_range(encodeArray(node_id), msg);
10015                 return nativeResponseValue;
10016         }
10017         // void MessageSendEventsProvider_free(struct LDKMessageSendEventsProvider this_ptr);
10018         export function MessageSendEventsProvider_free(this_ptr: number): void {
10019                 if(!isWasmInitialized) {
10020                         throw new Error("initializeWasm() must be awaited first!");
10021                 }
10022                 const nativeResponseValue = wasm.MessageSendEventsProvider_free(this_ptr);
10023                 // debug statements here
10024         }
10025         // void EventsProvider_free(struct LDKEventsProvider this_ptr);
10026         export function EventsProvider_free(this_ptr: number): void {
10027                 if(!isWasmInitialized) {
10028                         throw new Error("initializeWasm() must be awaited first!");
10029                 }
10030                 const nativeResponseValue = wasm.EventsProvider_free(this_ptr);
10031                 // debug statements here
10032         }
10033         // void EventHandler_free(struct LDKEventHandler this_ptr);
10034         export function EventHandler_free(this_ptr: number): void {
10035                 if(!isWasmInitialized) {
10036                         throw new Error("initializeWasm() must be awaited first!");
10037                 }
10038                 const nativeResponseValue = wasm.EventHandler_free(this_ptr);
10039                 // debug statements here
10040         }
10041         // void APIError_free(struct LDKAPIError this_ptr);
10042         export function APIError_free(this_ptr: number): void {
10043                 if(!isWasmInitialized) {
10044                         throw new Error("initializeWasm() must be awaited first!");
10045                 }
10046                 const nativeResponseValue = wasm.APIError_free(this_ptr);
10047                 // debug statements here
10048         }
10049         // uint64_t APIError_clone_ptr(LDKAPIError *NONNULL_PTR arg);
10050         export function APIError_clone_ptr(arg: number): number {
10051                 if(!isWasmInitialized) {
10052                         throw new Error("initializeWasm() must be awaited first!");
10053                 }
10054                 const nativeResponseValue = wasm.APIError_clone_ptr(arg);
10055                 return nativeResponseValue;
10056         }
10057         // struct LDKAPIError APIError_clone(const struct LDKAPIError *NONNULL_PTR orig);
10058         export function APIError_clone(orig: number): number {
10059                 if(!isWasmInitialized) {
10060                         throw new Error("initializeWasm() must be awaited first!");
10061                 }
10062                 const nativeResponseValue = wasm.APIError_clone(orig);
10063                 return nativeResponseValue;
10064         }
10065         // struct LDKAPIError APIError_apimisuse_error(struct LDKStr err);
10066         export function APIError_apimisuse_error(err: String): number {
10067                 if(!isWasmInitialized) {
10068                         throw new Error("initializeWasm() must be awaited first!");
10069                 }
10070                 const nativeResponseValue = wasm.APIError_apimisuse_error(err);
10071                 return nativeResponseValue;
10072         }
10073         // struct LDKAPIError APIError_fee_rate_too_high(struct LDKStr err, uint32_t feerate);
10074         export function APIError_fee_rate_too_high(err: String, feerate: number): number {
10075                 if(!isWasmInitialized) {
10076                         throw new Error("initializeWasm() must be awaited first!");
10077                 }
10078                 const nativeResponseValue = wasm.APIError_fee_rate_too_high(err, feerate);
10079                 return nativeResponseValue;
10080         }
10081         // struct LDKAPIError APIError_route_error(struct LDKStr err);
10082         export function APIError_route_error(err: String): number {
10083                 if(!isWasmInitialized) {
10084                         throw new Error("initializeWasm() must be awaited first!");
10085                 }
10086                 const nativeResponseValue = wasm.APIError_route_error(err);
10087                 return nativeResponseValue;
10088         }
10089         // struct LDKAPIError APIError_channel_unavailable(struct LDKStr err);
10090         export function APIError_channel_unavailable(err: String): number {
10091                 if(!isWasmInitialized) {
10092                         throw new Error("initializeWasm() must be awaited first!");
10093                 }
10094                 const nativeResponseValue = wasm.APIError_channel_unavailable(err);
10095                 return nativeResponseValue;
10096         }
10097         // struct LDKAPIError APIError_monitor_update_failed(void);
10098         export function APIError_monitor_update_failed(): number {
10099                 if(!isWasmInitialized) {
10100                         throw new Error("initializeWasm() must be awaited first!");
10101                 }
10102                 const nativeResponseValue = wasm.APIError_monitor_update_failed();
10103                 return nativeResponseValue;
10104         }
10105         // struct LDKAPIError APIError_incompatible_shutdown_script(struct LDKShutdownScript script);
10106         export function APIError_incompatible_shutdown_script(script: number): number {
10107                 if(!isWasmInitialized) {
10108                         throw new Error("initializeWasm() must be awaited first!");
10109                 }
10110                 const nativeResponseValue = wasm.APIError_incompatible_shutdown_script(script);
10111                 return nativeResponseValue;
10112         }
10113         // struct LDKCResult_StringErrorZ sign(struct LDKu8slice msg, const uint8_t (*sk)[32]);
10114         export function sign(msg: Uint8Array, sk: Uint8Array): number {
10115                 if(!isWasmInitialized) {
10116                         throw new Error("initializeWasm() must be awaited first!");
10117                 }
10118                 const nativeResponseValue = wasm.sign(encodeArray(msg), encodeArray(sk));
10119                 return nativeResponseValue;
10120         }
10121         // struct LDKCResult_PublicKeyErrorZ recover_pk(struct LDKu8slice msg, struct LDKStr sig);
10122         export function recover_pk(msg: Uint8Array, sig: String): number {
10123                 if(!isWasmInitialized) {
10124                         throw new Error("initializeWasm() must be awaited first!");
10125                 }
10126                 const nativeResponseValue = wasm.recover_pk(encodeArray(msg), sig);
10127                 return nativeResponseValue;
10128         }
10129         // bool verify(struct LDKu8slice msg, struct LDKStr sig, struct LDKPublicKey pk);
10130         export function verify(msg: Uint8Array, sig: String, pk: Uint8Array): boolean {
10131                 if(!isWasmInitialized) {
10132                         throw new Error("initializeWasm() must be awaited first!");
10133                 }
10134                 const nativeResponseValue = wasm.verify(encodeArray(msg), sig, encodeArray(pk));
10135                 return nativeResponseValue;
10136         }
10137         // enum LDKLevel Level_clone(const enum LDKLevel *NONNULL_PTR orig);
10138         export function Level_clone(orig: number): Level {
10139                 if(!isWasmInitialized) {
10140                         throw new Error("initializeWasm() must be awaited first!");
10141                 }
10142                 const nativeResponseValue = wasm.Level_clone(orig);
10143                 return nativeResponseValue;
10144         }
10145         // enum LDKLevel Level_gossip(void);
10146         export function Level_gossip(): Level {
10147                 if(!isWasmInitialized) {
10148                         throw new Error("initializeWasm() must be awaited first!");
10149                 }
10150                 const nativeResponseValue = wasm.Level_gossip();
10151                 return nativeResponseValue;
10152         }
10153         // enum LDKLevel Level_trace(void);
10154         export function Level_trace(): Level {
10155                 if(!isWasmInitialized) {
10156                         throw new Error("initializeWasm() must be awaited first!");
10157                 }
10158                 const nativeResponseValue = wasm.Level_trace();
10159                 return nativeResponseValue;
10160         }
10161         // enum LDKLevel Level_debug(void);
10162         export function Level_debug(): Level {
10163                 if(!isWasmInitialized) {
10164                         throw new Error("initializeWasm() must be awaited first!");
10165                 }
10166                 const nativeResponseValue = wasm.Level_debug();
10167                 return nativeResponseValue;
10168         }
10169         // enum LDKLevel Level_info(void);
10170         export function Level_info(): Level {
10171                 if(!isWasmInitialized) {
10172                         throw new Error("initializeWasm() must be awaited first!");
10173                 }
10174                 const nativeResponseValue = wasm.Level_info();
10175                 return nativeResponseValue;
10176         }
10177         // enum LDKLevel Level_warn(void);
10178         export function Level_warn(): Level {
10179                 if(!isWasmInitialized) {
10180                         throw new Error("initializeWasm() must be awaited first!");
10181                 }
10182                 const nativeResponseValue = wasm.Level_warn();
10183                 return nativeResponseValue;
10184         }
10185         // enum LDKLevel Level_error(void);
10186         export function Level_error(): Level {
10187                 if(!isWasmInitialized) {
10188                         throw new Error("initializeWasm() must be awaited first!");
10189                 }
10190                 const nativeResponseValue = wasm.Level_error();
10191                 return nativeResponseValue;
10192         }
10193         // bool Level_eq(const enum LDKLevel *NONNULL_PTR a, const enum LDKLevel *NONNULL_PTR b);
10194         export function Level_eq(a: number, b: number): boolean {
10195                 if(!isWasmInitialized) {
10196                         throw new Error("initializeWasm() must be awaited first!");
10197                 }
10198                 const nativeResponseValue = wasm.Level_eq(a, b);
10199                 return nativeResponseValue;
10200         }
10201         // uint64_t Level_hash(const enum LDKLevel *NONNULL_PTR o);
10202         export function Level_hash(o: number): number {
10203                 if(!isWasmInitialized) {
10204                         throw new Error("initializeWasm() must be awaited first!");
10205                 }
10206                 const nativeResponseValue = wasm.Level_hash(o);
10207                 return nativeResponseValue;
10208         }
10209         // MUST_USE_RES enum LDKLevel Level_max(void);
10210         export function Level_max(): Level {
10211                 if(!isWasmInitialized) {
10212                         throw new Error("initializeWasm() must be awaited first!");
10213                 }
10214                 const nativeResponseValue = wasm.Level_max();
10215                 return nativeResponseValue;
10216         }
10217         // void Record_free(struct LDKRecord this_obj);
10218         export function Record_free(this_obj: number): void {
10219                 if(!isWasmInitialized) {
10220                         throw new Error("initializeWasm() must be awaited first!");
10221                 }
10222                 const nativeResponseValue = wasm.Record_free(this_obj);
10223                 // debug statements here
10224         }
10225         // enum LDKLevel Record_get_level(const struct LDKRecord *NONNULL_PTR this_ptr);
10226         export function Record_get_level(this_ptr: number): Level {
10227                 if(!isWasmInitialized) {
10228                         throw new Error("initializeWasm() must be awaited first!");
10229                 }
10230                 const nativeResponseValue = wasm.Record_get_level(this_ptr);
10231                 return nativeResponseValue;
10232         }
10233         // void Record_set_level(struct LDKRecord *NONNULL_PTR this_ptr, enum LDKLevel val);
10234         export function Record_set_level(this_ptr: number, val: Level): void {
10235                 if(!isWasmInitialized) {
10236                         throw new Error("initializeWasm() must be awaited first!");
10237                 }
10238                 const nativeResponseValue = wasm.Record_set_level(this_ptr, val);
10239                 // debug statements here
10240         }
10241         // struct LDKStr Record_get_args(const struct LDKRecord *NONNULL_PTR this_ptr);
10242         export function Record_get_args(this_ptr: number): String {
10243                 if(!isWasmInitialized) {
10244                         throw new Error("initializeWasm() must be awaited first!");
10245                 }
10246                 const nativeResponseValue = wasm.Record_get_args(this_ptr);
10247                 return nativeResponseValue;
10248         }
10249         // void Record_set_args(struct LDKRecord *NONNULL_PTR this_ptr, struct LDKStr val);
10250         export function Record_set_args(this_ptr: number, val: String): void {
10251                 if(!isWasmInitialized) {
10252                         throw new Error("initializeWasm() must be awaited first!");
10253                 }
10254                 const nativeResponseValue = wasm.Record_set_args(this_ptr, val);
10255                 // debug statements here
10256         }
10257         // struct LDKStr Record_get_module_path(const struct LDKRecord *NONNULL_PTR this_ptr);
10258         export function Record_get_module_path(this_ptr: number): String {
10259                 if(!isWasmInitialized) {
10260                         throw new Error("initializeWasm() must be awaited first!");
10261                 }
10262                 const nativeResponseValue = wasm.Record_get_module_path(this_ptr);
10263                 return nativeResponseValue;
10264         }
10265         // void Record_set_module_path(struct LDKRecord *NONNULL_PTR this_ptr, struct LDKStr val);
10266         export function Record_set_module_path(this_ptr: number, val: String): void {
10267                 if(!isWasmInitialized) {
10268                         throw new Error("initializeWasm() must be awaited first!");
10269                 }
10270                 const nativeResponseValue = wasm.Record_set_module_path(this_ptr, val);
10271                 // debug statements here
10272         }
10273         // struct LDKStr Record_get_file(const struct LDKRecord *NONNULL_PTR this_ptr);
10274         export function Record_get_file(this_ptr: number): String {
10275                 if(!isWasmInitialized) {
10276                         throw new Error("initializeWasm() must be awaited first!");
10277                 }
10278                 const nativeResponseValue = wasm.Record_get_file(this_ptr);
10279                 return nativeResponseValue;
10280         }
10281         // void Record_set_file(struct LDKRecord *NONNULL_PTR this_ptr, struct LDKStr val);
10282         export function Record_set_file(this_ptr: number, val: String): void {
10283                 if(!isWasmInitialized) {
10284                         throw new Error("initializeWasm() must be awaited first!");
10285                 }
10286                 const nativeResponseValue = wasm.Record_set_file(this_ptr, val);
10287                 // debug statements here
10288         }
10289         // uint32_t Record_get_line(const struct LDKRecord *NONNULL_PTR this_ptr);
10290         export function Record_get_line(this_ptr: number): number {
10291                 if(!isWasmInitialized) {
10292                         throw new Error("initializeWasm() must be awaited first!");
10293                 }
10294                 const nativeResponseValue = wasm.Record_get_line(this_ptr);
10295                 return nativeResponseValue;
10296         }
10297         // void Record_set_line(struct LDKRecord *NONNULL_PTR this_ptr, uint32_t val);
10298         export function Record_set_line(this_ptr: number, val: number): void {
10299                 if(!isWasmInitialized) {
10300                         throw new Error("initializeWasm() must be awaited first!");
10301                 }
10302                 const nativeResponseValue = wasm.Record_set_line(this_ptr, val);
10303                 // debug statements here
10304         }
10305         // uint64_t Record_clone_ptr(LDKRecord *NONNULL_PTR arg);
10306         export function Record_clone_ptr(arg: number): number {
10307                 if(!isWasmInitialized) {
10308                         throw new Error("initializeWasm() must be awaited first!");
10309                 }
10310                 const nativeResponseValue = wasm.Record_clone_ptr(arg);
10311                 return nativeResponseValue;
10312         }
10313         // struct LDKRecord Record_clone(const struct LDKRecord *NONNULL_PTR orig);
10314         export function Record_clone(orig: number): number {
10315                 if(!isWasmInitialized) {
10316                         throw new Error("initializeWasm() must be awaited first!");
10317                 }
10318                 const nativeResponseValue = wasm.Record_clone(orig);
10319                 return nativeResponseValue;
10320         }
10321         // void Logger_free(struct LDKLogger this_ptr);
10322         export function Logger_free(this_ptr: number): void {
10323                 if(!isWasmInitialized) {
10324                         throw new Error("initializeWasm() must be awaited first!");
10325                 }
10326                 const nativeResponseValue = wasm.Logger_free(this_ptr);
10327                 // debug statements here
10328         }
10329         // void ChannelHandshakeConfig_free(struct LDKChannelHandshakeConfig this_obj);
10330         export function ChannelHandshakeConfig_free(this_obj: number): void {
10331                 if(!isWasmInitialized) {
10332                         throw new Error("initializeWasm() must be awaited first!");
10333                 }
10334                 const nativeResponseValue = wasm.ChannelHandshakeConfig_free(this_obj);
10335                 // debug statements here
10336         }
10337         // uint32_t ChannelHandshakeConfig_get_minimum_depth(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
10338         export function ChannelHandshakeConfig_get_minimum_depth(this_ptr: number): number {
10339                 if(!isWasmInitialized) {
10340                         throw new Error("initializeWasm() must be awaited first!");
10341                 }
10342                 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_minimum_depth(this_ptr);
10343                 return nativeResponseValue;
10344         }
10345         // void ChannelHandshakeConfig_set_minimum_depth(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint32_t val);
10346         export function ChannelHandshakeConfig_set_minimum_depth(this_ptr: number, val: number): void {
10347                 if(!isWasmInitialized) {
10348                         throw new Error("initializeWasm() must be awaited first!");
10349                 }
10350                 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_minimum_depth(this_ptr, val);
10351                 // debug statements here
10352         }
10353         // uint16_t ChannelHandshakeConfig_get_our_to_self_delay(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
10354         export function ChannelHandshakeConfig_get_our_to_self_delay(this_ptr: number): number {
10355                 if(!isWasmInitialized) {
10356                         throw new Error("initializeWasm() must be awaited first!");
10357                 }
10358                 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_to_self_delay(this_ptr);
10359                 return nativeResponseValue;
10360         }
10361         // void ChannelHandshakeConfig_set_our_to_self_delay(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint16_t val);
10362         export function ChannelHandshakeConfig_set_our_to_self_delay(this_ptr: number, val: number): void {
10363                 if(!isWasmInitialized) {
10364                         throw new Error("initializeWasm() must be awaited first!");
10365                 }
10366                 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_to_self_delay(this_ptr, val);
10367                 // debug statements here
10368         }
10369         // uint64_t ChannelHandshakeConfig_get_our_htlc_minimum_msat(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
10370         export function ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr: number): number {
10371                 if(!isWasmInitialized) {
10372                         throw new Error("initializeWasm() must be awaited first!");
10373                 }
10374                 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr);
10375                 return nativeResponseValue;
10376         }
10377         // void ChannelHandshakeConfig_set_our_htlc_minimum_msat(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint64_t val);
10378         export function ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr: number, val: number): void {
10379                 if(!isWasmInitialized) {
10380                         throw new Error("initializeWasm() must be awaited first!");
10381                 }
10382                 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr, val);
10383                 // debug statements here
10384         }
10385         // 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);
10386         export function ChannelHandshakeConfig_new(minimum_depth_arg: number, our_to_self_delay_arg: number, our_htlc_minimum_msat_arg: number): number {
10387                 if(!isWasmInitialized) {
10388                         throw new Error("initializeWasm() must be awaited first!");
10389                 }
10390                 const nativeResponseValue = wasm.ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg, our_htlc_minimum_msat_arg);
10391                 return nativeResponseValue;
10392         }
10393         // uint64_t ChannelHandshakeConfig_clone_ptr(LDKChannelHandshakeConfig *NONNULL_PTR arg);
10394         export function ChannelHandshakeConfig_clone_ptr(arg: number): number {
10395                 if(!isWasmInitialized) {
10396                         throw new Error("initializeWasm() must be awaited first!");
10397                 }
10398                 const nativeResponseValue = wasm.ChannelHandshakeConfig_clone_ptr(arg);
10399                 return nativeResponseValue;
10400         }
10401         // struct LDKChannelHandshakeConfig ChannelHandshakeConfig_clone(const struct LDKChannelHandshakeConfig *NONNULL_PTR orig);
10402         export function ChannelHandshakeConfig_clone(orig: number): number {
10403                 if(!isWasmInitialized) {
10404                         throw new Error("initializeWasm() must be awaited first!");
10405                 }
10406                 const nativeResponseValue = wasm.ChannelHandshakeConfig_clone(orig);
10407                 return nativeResponseValue;
10408         }
10409         // MUST_USE_RES struct LDKChannelHandshakeConfig ChannelHandshakeConfig_default(void);
10410         export function ChannelHandshakeConfig_default(): number {
10411                 if(!isWasmInitialized) {
10412                         throw new Error("initializeWasm() must be awaited first!");
10413                 }
10414                 const nativeResponseValue = wasm.ChannelHandshakeConfig_default();
10415                 return nativeResponseValue;
10416         }
10417         // void ChannelHandshakeLimits_free(struct LDKChannelHandshakeLimits this_obj);
10418         export function ChannelHandshakeLimits_free(this_obj: number): void {
10419                 if(!isWasmInitialized) {
10420                         throw new Error("initializeWasm() must be awaited first!");
10421                 }
10422                 const nativeResponseValue = wasm.ChannelHandshakeLimits_free(this_obj);
10423                 // debug statements here
10424         }
10425         // uint64_t ChannelHandshakeLimits_get_min_funding_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
10426         export function ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr: number): number {
10427                 if(!isWasmInitialized) {
10428                         throw new Error("initializeWasm() must be awaited first!");
10429                 }
10430                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr);
10431                 return nativeResponseValue;
10432         }
10433         // void ChannelHandshakeLimits_set_min_funding_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
10434         export function ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr: number, val: number): void {
10435                 if(!isWasmInitialized) {
10436                         throw new Error("initializeWasm() must be awaited first!");
10437                 }
10438                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr, val);
10439                 // debug statements here
10440         }
10441         // uint64_t ChannelHandshakeLimits_get_max_htlc_minimum_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
10442         export function ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr: number): number {
10443                 if(!isWasmInitialized) {
10444                         throw new Error("initializeWasm() must be awaited first!");
10445                 }
10446                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr);
10447                 return nativeResponseValue;
10448         }
10449         // void ChannelHandshakeLimits_set_max_htlc_minimum_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
10450         export function ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr: number, val: number): void {
10451                 if(!isWasmInitialized) {
10452                         throw new Error("initializeWasm() must be awaited first!");
10453                 }
10454                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr, val);
10455                 // debug statements here
10456         }
10457         // uint64_t ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
10458         export function ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr: number): number {
10459                 if(!isWasmInitialized) {
10460                         throw new Error("initializeWasm() must be awaited first!");
10461                 }
10462                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr);
10463                 return nativeResponseValue;
10464         }
10465         // void ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
10466         export function ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
10467                 if(!isWasmInitialized) {
10468                         throw new Error("initializeWasm() must be awaited first!");
10469                 }
10470                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr, val);
10471                 // debug statements here
10472         }
10473         // uint64_t ChannelHandshakeLimits_get_max_channel_reserve_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
10474         export function ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr: number): number {
10475                 if(!isWasmInitialized) {
10476                         throw new Error("initializeWasm() must be awaited first!");
10477                 }
10478                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr);
10479                 return nativeResponseValue;
10480         }
10481         // void ChannelHandshakeLimits_set_max_channel_reserve_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
10482         export function ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr: number, val: number): void {
10483                 if(!isWasmInitialized) {
10484                         throw new Error("initializeWasm() must be awaited first!");
10485                 }
10486                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr, val);
10487                 // debug statements here
10488         }
10489         // uint16_t ChannelHandshakeLimits_get_min_max_accepted_htlcs(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
10490         export function ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr: number): number {
10491                 if(!isWasmInitialized) {
10492                         throw new Error("initializeWasm() must be awaited first!");
10493                 }
10494                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr);
10495                 return nativeResponseValue;
10496         }
10497         // void ChannelHandshakeLimits_set_min_max_accepted_htlcs(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
10498         export function ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr: number, val: number): void {
10499                 if(!isWasmInitialized) {
10500                         throw new Error("initializeWasm() must be awaited first!");
10501                 }
10502                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr, val);
10503                 // debug statements here
10504         }
10505         // uint32_t ChannelHandshakeLimits_get_max_minimum_depth(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
10506         export function ChannelHandshakeLimits_get_max_minimum_depth(this_ptr: number): number {
10507                 if(!isWasmInitialized) {
10508                         throw new Error("initializeWasm() must be awaited first!");
10509                 }
10510                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_minimum_depth(this_ptr);
10511                 return nativeResponseValue;
10512         }
10513         // void ChannelHandshakeLimits_set_max_minimum_depth(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint32_t val);
10514         export function ChannelHandshakeLimits_set_max_minimum_depth(this_ptr: number, val: number): void {
10515                 if(!isWasmInitialized) {
10516                         throw new Error("initializeWasm() must be awaited first!");
10517                 }
10518                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_minimum_depth(this_ptr, val);
10519                 // debug statements here
10520         }
10521         // bool ChannelHandshakeLimits_get_force_announced_channel_preference(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
10522         export function ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr: number): boolean {
10523                 if(!isWasmInitialized) {
10524                         throw new Error("initializeWasm() must be awaited first!");
10525                 }
10526                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr);
10527                 return nativeResponseValue;
10528         }
10529         // void ChannelHandshakeLimits_set_force_announced_channel_preference(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, bool val);
10530         export function ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr: number, val: boolean): void {
10531                 if(!isWasmInitialized) {
10532                         throw new Error("initializeWasm() must be awaited first!");
10533                 }
10534                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr, val);
10535                 // debug statements here
10536         }
10537         // uint16_t ChannelHandshakeLimits_get_their_to_self_delay(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
10538         export function ChannelHandshakeLimits_get_their_to_self_delay(this_ptr: number): number {
10539                 if(!isWasmInitialized) {
10540                         throw new Error("initializeWasm() must be awaited first!");
10541                 }
10542                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_their_to_self_delay(this_ptr);
10543                 return nativeResponseValue;
10544         }
10545         // void ChannelHandshakeLimits_set_their_to_self_delay(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
10546         export function ChannelHandshakeLimits_set_their_to_self_delay(this_ptr: number, val: number): void {
10547                 if(!isWasmInitialized) {
10548                         throw new Error("initializeWasm() must be awaited first!");
10549                 }
10550                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_their_to_self_delay(this_ptr, val);
10551                 // debug statements here
10552         }
10553         // MUST_USE_RES struct LDKChannelHandshakeLimits ChannelHandshakeLimits_new(uint64_t min_funding_satoshis_arg, uint64_t max_htlc_minimum_msat_arg, uint64_t min_max_htlc_value_in_flight_msat_arg, uint64_t max_channel_reserve_satoshis_arg, uint16_t min_max_accepted_htlcs_arg, uint32_t max_minimum_depth_arg, bool force_announced_channel_preference_arg, uint16_t their_to_self_delay_arg);
10554         export function ChannelHandshakeLimits_new(min_funding_satoshis_arg: number, max_htlc_minimum_msat_arg: number, min_max_htlc_value_in_flight_msat_arg: number, max_channel_reserve_satoshis_arg: number, min_max_accepted_htlcs_arg: number, max_minimum_depth_arg: number, force_announced_channel_preference_arg: boolean, their_to_self_delay_arg: number): number {
10555                 if(!isWasmInitialized) {
10556                         throw new Error("initializeWasm() must be awaited first!");
10557                 }
10558                 const nativeResponseValue = wasm.ChannelHandshakeLimits_new(min_funding_satoshis_arg, max_htlc_minimum_msat_arg, min_max_htlc_value_in_flight_msat_arg, max_channel_reserve_satoshis_arg, min_max_accepted_htlcs_arg, max_minimum_depth_arg, force_announced_channel_preference_arg, their_to_self_delay_arg);
10559                 return nativeResponseValue;
10560         }
10561         // uint64_t ChannelHandshakeLimits_clone_ptr(LDKChannelHandshakeLimits *NONNULL_PTR arg);
10562         export function ChannelHandshakeLimits_clone_ptr(arg: number): number {
10563                 if(!isWasmInitialized) {
10564                         throw new Error("initializeWasm() must be awaited first!");
10565                 }
10566                 const nativeResponseValue = wasm.ChannelHandshakeLimits_clone_ptr(arg);
10567                 return nativeResponseValue;
10568         }
10569         // struct LDKChannelHandshakeLimits ChannelHandshakeLimits_clone(const struct LDKChannelHandshakeLimits *NONNULL_PTR orig);
10570         export function ChannelHandshakeLimits_clone(orig: number): number {
10571                 if(!isWasmInitialized) {
10572                         throw new Error("initializeWasm() must be awaited first!");
10573                 }
10574                 const nativeResponseValue = wasm.ChannelHandshakeLimits_clone(orig);
10575                 return nativeResponseValue;
10576         }
10577         // MUST_USE_RES struct LDKChannelHandshakeLimits ChannelHandshakeLimits_default(void);
10578         export function ChannelHandshakeLimits_default(): number {
10579                 if(!isWasmInitialized) {
10580                         throw new Error("initializeWasm() must be awaited first!");
10581                 }
10582                 const nativeResponseValue = wasm.ChannelHandshakeLimits_default();
10583                 return nativeResponseValue;
10584         }
10585         // void ChannelConfig_free(struct LDKChannelConfig this_obj);
10586         export function ChannelConfig_free(this_obj: number): void {
10587                 if(!isWasmInitialized) {
10588                         throw new Error("initializeWasm() must be awaited first!");
10589                 }
10590                 const nativeResponseValue = wasm.ChannelConfig_free(this_obj);
10591                 // debug statements here
10592         }
10593         // uint32_t ChannelConfig_get_forwarding_fee_proportional_millionths(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
10594         export function ChannelConfig_get_forwarding_fee_proportional_millionths(this_ptr: number): number {
10595                 if(!isWasmInitialized) {
10596                         throw new Error("initializeWasm() must be awaited first!");
10597                 }
10598                 const nativeResponseValue = wasm.ChannelConfig_get_forwarding_fee_proportional_millionths(this_ptr);
10599                 return nativeResponseValue;
10600         }
10601         // void ChannelConfig_set_forwarding_fee_proportional_millionths(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
10602         export function ChannelConfig_set_forwarding_fee_proportional_millionths(this_ptr: number, val: number): void {
10603                 if(!isWasmInitialized) {
10604                         throw new Error("initializeWasm() must be awaited first!");
10605                 }
10606                 const nativeResponseValue = wasm.ChannelConfig_set_forwarding_fee_proportional_millionths(this_ptr, val);
10607                 // debug statements here
10608         }
10609         // uint32_t ChannelConfig_get_forwarding_fee_base_msat(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
10610         export function ChannelConfig_get_forwarding_fee_base_msat(this_ptr: number): number {
10611                 if(!isWasmInitialized) {
10612                         throw new Error("initializeWasm() must be awaited first!");
10613                 }
10614                 const nativeResponseValue = wasm.ChannelConfig_get_forwarding_fee_base_msat(this_ptr);
10615                 return nativeResponseValue;
10616         }
10617         // void ChannelConfig_set_forwarding_fee_base_msat(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
10618         export function ChannelConfig_set_forwarding_fee_base_msat(this_ptr: number, val: number): void {
10619                 if(!isWasmInitialized) {
10620                         throw new Error("initializeWasm() must be awaited first!");
10621                 }
10622                 const nativeResponseValue = wasm.ChannelConfig_set_forwarding_fee_base_msat(this_ptr, val);
10623                 // debug statements here
10624         }
10625         // uint16_t ChannelConfig_get_cltv_expiry_delta(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
10626         export function ChannelConfig_get_cltv_expiry_delta(this_ptr: number): number {
10627                 if(!isWasmInitialized) {
10628                         throw new Error("initializeWasm() must be awaited first!");
10629                 }
10630                 const nativeResponseValue = wasm.ChannelConfig_get_cltv_expiry_delta(this_ptr);
10631                 return nativeResponseValue;
10632         }
10633         // void ChannelConfig_set_cltv_expiry_delta(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint16_t val);
10634         export function ChannelConfig_set_cltv_expiry_delta(this_ptr: number, val: number): void {
10635                 if(!isWasmInitialized) {
10636                         throw new Error("initializeWasm() must be awaited first!");
10637                 }
10638                 const nativeResponseValue = wasm.ChannelConfig_set_cltv_expiry_delta(this_ptr, val);
10639                 // debug statements here
10640         }
10641         // bool ChannelConfig_get_announced_channel(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
10642         export function ChannelConfig_get_announced_channel(this_ptr: number): boolean {
10643                 if(!isWasmInitialized) {
10644                         throw new Error("initializeWasm() must be awaited first!");
10645                 }
10646                 const nativeResponseValue = wasm.ChannelConfig_get_announced_channel(this_ptr);
10647                 return nativeResponseValue;
10648         }
10649         // void ChannelConfig_set_announced_channel(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
10650         export function ChannelConfig_set_announced_channel(this_ptr: number, val: boolean): void {
10651                 if(!isWasmInitialized) {
10652                         throw new Error("initializeWasm() must be awaited first!");
10653                 }
10654                 const nativeResponseValue = wasm.ChannelConfig_set_announced_channel(this_ptr, val);
10655                 // debug statements here
10656         }
10657         // bool ChannelConfig_get_commit_upfront_shutdown_pubkey(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
10658         export function ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr: number): boolean {
10659                 if(!isWasmInitialized) {
10660                         throw new Error("initializeWasm() must be awaited first!");
10661                 }
10662                 const nativeResponseValue = wasm.ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr);
10663                 return nativeResponseValue;
10664         }
10665         // void ChannelConfig_set_commit_upfront_shutdown_pubkey(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
10666         export function ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr: number, val: boolean): void {
10667                 if(!isWasmInitialized) {
10668                         throw new Error("initializeWasm() must be awaited first!");
10669                 }
10670                 const nativeResponseValue = wasm.ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr, val);
10671                 // debug statements here
10672         }
10673         // uint64_t ChannelConfig_get_max_dust_htlc_exposure_msat(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
10674         export function ChannelConfig_get_max_dust_htlc_exposure_msat(this_ptr: number): number {
10675                 if(!isWasmInitialized) {
10676                         throw new Error("initializeWasm() must be awaited first!");
10677                 }
10678                 const nativeResponseValue = wasm.ChannelConfig_get_max_dust_htlc_exposure_msat(this_ptr);
10679                 return nativeResponseValue;
10680         }
10681         // void ChannelConfig_set_max_dust_htlc_exposure_msat(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint64_t val);
10682         export function ChannelConfig_set_max_dust_htlc_exposure_msat(this_ptr: number, val: number): void {
10683                 if(!isWasmInitialized) {
10684                         throw new Error("initializeWasm() must be awaited first!");
10685                 }
10686                 const nativeResponseValue = wasm.ChannelConfig_set_max_dust_htlc_exposure_msat(this_ptr, val);
10687                 // debug statements here
10688         }
10689         // uint64_t ChannelConfig_get_force_close_avoidance_max_fee_satoshis(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
10690         export function ChannelConfig_get_force_close_avoidance_max_fee_satoshis(this_ptr: number): number {
10691                 if(!isWasmInitialized) {
10692                         throw new Error("initializeWasm() must be awaited first!");
10693                 }
10694                 const nativeResponseValue = wasm.ChannelConfig_get_force_close_avoidance_max_fee_satoshis(this_ptr);
10695                 return nativeResponseValue;
10696         }
10697         // void ChannelConfig_set_force_close_avoidance_max_fee_satoshis(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint64_t val);
10698         export function ChannelConfig_set_force_close_avoidance_max_fee_satoshis(this_ptr: number, val: number): void {
10699                 if(!isWasmInitialized) {
10700                         throw new Error("initializeWasm() must be awaited first!");
10701                 }
10702                 const nativeResponseValue = wasm.ChannelConfig_set_force_close_avoidance_max_fee_satoshis(this_ptr, val);
10703                 // debug statements here
10704         }
10705         // MUST_USE_RES struct LDKChannelConfig ChannelConfig_new(uint32_t forwarding_fee_proportional_millionths_arg, uint32_t forwarding_fee_base_msat_arg, uint16_t cltv_expiry_delta_arg, bool announced_channel_arg, bool commit_upfront_shutdown_pubkey_arg, uint64_t max_dust_htlc_exposure_msat_arg, uint64_t force_close_avoidance_max_fee_satoshis_arg);
10706         export function ChannelConfig_new(forwarding_fee_proportional_millionths_arg: number, forwarding_fee_base_msat_arg: number, cltv_expiry_delta_arg: number, announced_channel_arg: boolean, commit_upfront_shutdown_pubkey_arg: boolean, max_dust_htlc_exposure_msat_arg: number, force_close_avoidance_max_fee_satoshis_arg: number): number {
10707                 if(!isWasmInitialized) {
10708                         throw new Error("initializeWasm() must be awaited first!");
10709                 }
10710                 const nativeResponseValue = wasm.ChannelConfig_new(forwarding_fee_proportional_millionths_arg, forwarding_fee_base_msat_arg, cltv_expiry_delta_arg, announced_channel_arg, commit_upfront_shutdown_pubkey_arg, max_dust_htlc_exposure_msat_arg, force_close_avoidance_max_fee_satoshis_arg);
10711                 return nativeResponseValue;
10712         }
10713         // uint64_t ChannelConfig_clone_ptr(LDKChannelConfig *NONNULL_PTR arg);
10714         export function ChannelConfig_clone_ptr(arg: number): number {
10715                 if(!isWasmInitialized) {
10716                         throw new Error("initializeWasm() must be awaited first!");
10717                 }
10718                 const nativeResponseValue = wasm.ChannelConfig_clone_ptr(arg);
10719                 return nativeResponseValue;
10720         }
10721         // struct LDKChannelConfig ChannelConfig_clone(const struct LDKChannelConfig *NONNULL_PTR orig);
10722         export function ChannelConfig_clone(orig: number): number {
10723                 if(!isWasmInitialized) {
10724                         throw new Error("initializeWasm() must be awaited first!");
10725                 }
10726                 const nativeResponseValue = wasm.ChannelConfig_clone(orig);
10727                 return nativeResponseValue;
10728         }
10729         // MUST_USE_RES struct LDKChannelConfig ChannelConfig_default(void);
10730         export function ChannelConfig_default(): number {
10731                 if(!isWasmInitialized) {
10732                         throw new Error("initializeWasm() must be awaited first!");
10733                 }
10734                 const nativeResponseValue = wasm.ChannelConfig_default();
10735                 return nativeResponseValue;
10736         }
10737         // struct LDKCVec_u8Z ChannelConfig_write(const struct LDKChannelConfig *NONNULL_PTR obj);
10738         export function ChannelConfig_write(obj: number): Uint8Array {
10739                 if(!isWasmInitialized) {
10740                         throw new Error("initializeWasm() must be awaited first!");
10741                 }
10742                 const nativeResponseValue = wasm.ChannelConfig_write(obj);
10743                 return decodeArray(nativeResponseValue);
10744         }
10745         // struct LDKCResult_ChannelConfigDecodeErrorZ ChannelConfig_read(struct LDKu8slice ser);
10746         export function ChannelConfig_read(ser: Uint8Array): number {
10747                 if(!isWasmInitialized) {
10748                         throw new Error("initializeWasm() must be awaited first!");
10749                 }
10750                 const nativeResponseValue = wasm.ChannelConfig_read(encodeArray(ser));
10751                 return nativeResponseValue;
10752         }
10753         // void UserConfig_free(struct LDKUserConfig this_obj);
10754         export function UserConfig_free(this_obj: number): void {
10755                 if(!isWasmInitialized) {
10756                         throw new Error("initializeWasm() must be awaited first!");
10757                 }
10758                 const nativeResponseValue = wasm.UserConfig_free(this_obj);
10759                 // debug statements here
10760         }
10761         // struct LDKChannelHandshakeConfig UserConfig_get_own_channel_config(const struct LDKUserConfig *NONNULL_PTR this_ptr);
10762         export function UserConfig_get_own_channel_config(this_ptr: number): number {
10763                 if(!isWasmInitialized) {
10764                         throw new Error("initializeWasm() must be awaited first!");
10765                 }
10766                 const nativeResponseValue = wasm.UserConfig_get_own_channel_config(this_ptr);
10767                 return nativeResponseValue;
10768         }
10769         // void UserConfig_set_own_channel_config(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeConfig val);
10770         export function UserConfig_set_own_channel_config(this_ptr: number, val: number): void {
10771                 if(!isWasmInitialized) {
10772                         throw new Error("initializeWasm() must be awaited first!");
10773                 }
10774                 const nativeResponseValue = wasm.UserConfig_set_own_channel_config(this_ptr, val);
10775                 // debug statements here
10776         }
10777         // struct LDKChannelHandshakeLimits UserConfig_get_peer_channel_config_limits(const struct LDKUserConfig *NONNULL_PTR this_ptr);
10778         export function UserConfig_get_peer_channel_config_limits(this_ptr: number): number {
10779                 if(!isWasmInitialized) {
10780                         throw new Error("initializeWasm() must be awaited first!");
10781                 }
10782                 const nativeResponseValue = wasm.UserConfig_get_peer_channel_config_limits(this_ptr);
10783                 return nativeResponseValue;
10784         }
10785         // void UserConfig_set_peer_channel_config_limits(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeLimits val);
10786         export function UserConfig_set_peer_channel_config_limits(this_ptr: number, val: number): void {
10787                 if(!isWasmInitialized) {
10788                         throw new Error("initializeWasm() must be awaited first!");
10789                 }
10790                 const nativeResponseValue = wasm.UserConfig_set_peer_channel_config_limits(this_ptr, val);
10791                 // debug statements here
10792         }
10793         // struct LDKChannelConfig UserConfig_get_channel_options(const struct LDKUserConfig *NONNULL_PTR this_ptr);
10794         export function UserConfig_get_channel_options(this_ptr: number): number {
10795                 if(!isWasmInitialized) {
10796                         throw new Error("initializeWasm() must be awaited first!");
10797                 }
10798                 const nativeResponseValue = wasm.UserConfig_get_channel_options(this_ptr);
10799                 return nativeResponseValue;
10800         }
10801         // void UserConfig_set_channel_options(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelConfig val);
10802         export function UserConfig_set_channel_options(this_ptr: number, val: number): void {
10803                 if(!isWasmInitialized) {
10804                         throw new Error("initializeWasm() must be awaited first!");
10805                 }
10806                 const nativeResponseValue = wasm.UserConfig_set_channel_options(this_ptr, val);
10807                 // debug statements here
10808         }
10809         // bool UserConfig_get_accept_forwards_to_priv_channels(const struct LDKUserConfig *NONNULL_PTR this_ptr);
10810         export function UserConfig_get_accept_forwards_to_priv_channels(this_ptr: number): boolean {
10811                 if(!isWasmInitialized) {
10812                         throw new Error("initializeWasm() must be awaited first!");
10813                 }
10814                 const nativeResponseValue = wasm.UserConfig_get_accept_forwards_to_priv_channels(this_ptr);
10815                 return nativeResponseValue;
10816         }
10817         // void UserConfig_set_accept_forwards_to_priv_channels(struct LDKUserConfig *NONNULL_PTR this_ptr, bool val);
10818         export function UserConfig_set_accept_forwards_to_priv_channels(this_ptr: number, val: boolean): void {
10819                 if(!isWasmInitialized) {
10820                         throw new Error("initializeWasm() must be awaited first!");
10821                 }
10822                 const nativeResponseValue = wasm.UserConfig_set_accept_forwards_to_priv_channels(this_ptr, val);
10823                 // debug statements here
10824         }
10825         // bool UserConfig_get_accept_inbound_channels(const struct LDKUserConfig *NONNULL_PTR this_ptr);
10826         export function UserConfig_get_accept_inbound_channels(this_ptr: number): boolean {
10827                 if(!isWasmInitialized) {
10828                         throw new Error("initializeWasm() must be awaited first!");
10829                 }
10830                 const nativeResponseValue = wasm.UserConfig_get_accept_inbound_channels(this_ptr);
10831                 return nativeResponseValue;
10832         }
10833         // void UserConfig_set_accept_inbound_channels(struct LDKUserConfig *NONNULL_PTR this_ptr, bool val);
10834         export function UserConfig_set_accept_inbound_channels(this_ptr: number, val: boolean): void {
10835                 if(!isWasmInitialized) {
10836                         throw new Error("initializeWasm() must be awaited first!");
10837                 }
10838                 const nativeResponseValue = wasm.UserConfig_set_accept_inbound_channels(this_ptr, val);
10839                 // debug statements here
10840         }
10841         // 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, bool accept_forwards_to_priv_channels_arg, bool accept_inbound_channels_arg);
10842         export function UserConfig_new(own_channel_config_arg: number, peer_channel_config_limits_arg: number, channel_options_arg: number, accept_forwards_to_priv_channels_arg: boolean, accept_inbound_channels_arg: boolean): number {
10843                 if(!isWasmInitialized) {
10844                         throw new Error("initializeWasm() must be awaited first!");
10845                 }
10846                 const nativeResponseValue = wasm.UserConfig_new(own_channel_config_arg, peer_channel_config_limits_arg, channel_options_arg, accept_forwards_to_priv_channels_arg, accept_inbound_channels_arg);
10847                 return nativeResponseValue;
10848         }
10849         // uint64_t UserConfig_clone_ptr(LDKUserConfig *NONNULL_PTR arg);
10850         export function UserConfig_clone_ptr(arg: number): number {
10851                 if(!isWasmInitialized) {
10852                         throw new Error("initializeWasm() must be awaited first!");
10853                 }
10854                 const nativeResponseValue = wasm.UserConfig_clone_ptr(arg);
10855                 return nativeResponseValue;
10856         }
10857         // struct LDKUserConfig UserConfig_clone(const struct LDKUserConfig *NONNULL_PTR orig);
10858         export function UserConfig_clone(orig: number): number {
10859                 if(!isWasmInitialized) {
10860                         throw new Error("initializeWasm() must be awaited first!");
10861                 }
10862                 const nativeResponseValue = wasm.UserConfig_clone(orig);
10863                 return nativeResponseValue;
10864         }
10865         // MUST_USE_RES struct LDKUserConfig UserConfig_default(void);
10866         export function UserConfig_default(): number {
10867                 if(!isWasmInitialized) {
10868                         throw new Error("initializeWasm() must be awaited first!");
10869                 }
10870                 const nativeResponseValue = wasm.UserConfig_default();
10871                 return nativeResponseValue;
10872         }
10873         // void BestBlock_free(struct LDKBestBlock this_obj);
10874         export function BestBlock_free(this_obj: number): void {
10875                 if(!isWasmInitialized) {
10876                         throw new Error("initializeWasm() must be awaited first!");
10877                 }
10878                 const nativeResponseValue = wasm.BestBlock_free(this_obj);
10879                 // debug statements here
10880         }
10881         // uint64_t BestBlock_clone_ptr(LDKBestBlock *NONNULL_PTR arg);
10882         export function BestBlock_clone_ptr(arg: number): number {
10883                 if(!isWasmInitialized) {
10884                         throw new Error("initializeWasm() must be awaited first!");
10885                 }
10886                 const nativeResponseValue = wasm.BestBlock_clone_ptr(arg);
10887                 return nativeResponseValue;
10888         }
10889         // struct LDKBestBlock BestBlock_clone(const struct LDKBestBlock *NONNULL_PTR orig);
10890         export function BestBlock_clone(orig: number): number {
10891                 if(!isWasmInitialized) {
10892                         throw new Error("initializeWasm() must be awaited first!");
10893                 }
10894                 const nativeResponseValue = wasm.BestBlock_clone(orig);
10895                 return nativeResponseValue;
10896         }
10897         // MUST_USE_RES struct LDKBestBlock BestBlock_from_genesis(enum LDKNetwork network);
10898         export function BestBlock_from_genesis(network: Network): number {
10899                 if(!isWasmInitialized) {
10900                         throw new Error("initializeWasm() must be awaited first!");
10901                 }
10902                 const nativeResponseValue = wasm.BestBlock_from_genesis(network);
10903                 return nativeResponseValue;
10904         }
10905         // MUST_USE_RES struct LDKBestBlock BestBlock_new(struct LDKThirtyTwoBytes block_hash, uint32_t height);
10906         export function BestBlock_new(block_hash: Uint8Array, height: number): number {
10907                 if(!isWasmInitialized) {
10908                         throw new Error("initializeWasm() must be awaited first!");
10909                 }
10910                 const nativeResponseValue = wasm.BestBlock_new(encodeArray(block_hash), height);
10911                 return nativeResponseValue;
10912         }
10913         // MUST_USE_RES struct LDKThirtyTwoBytes BestBlock_block_hash(const struct LDKBestBlock *NONNULL_PTR this_arg);
10914         export function BestBlock_block_hash(this_arg: number): Uint8Array {
10915                 if(!isWasmInitialized) {
10916                         throw new Error("initializeWasm() must be awaited first!");
10917                 }
10918                 const nativeResponseValue = wasm.BestBlock_block_hash(this_arg);
10919                 return decodeArray(nativeResponseValue);
10920         }
10921         // MUST_USE_RES uint32_t BestBlock_height(const struct LDKBestBlock *NONNULL_PTR this_arg);
10922         export function BestBlock_height(this_arg: number): number {
10923                 if(!isWasmInitialized) {
10924                         throw new Error("initializeWasm() must be awaited first!");
10925                 }
10926                 const nativeResponseValue = wasm.BestBlock_height(this_arg);
10927                 return nativeResponseValue;
10928         }
10929         // enum LDKAccessError AccessError_clone(const enum LDKAccessError *NONNULL_PTR orig);
10930         export function AccessError_clone(orig: number): AccessError {
10931                 if(!isWasmInitialized) {
10932                         throw new Error("initializeWasm() must be awaited first!");
10933                 }
10934                 const nativeResponseValue = wasm.AccessError_clone(orig);
10935                 return nativeResponseValue;
10936         }
10937         // enum LDKAccessError AccessError_unknown_chain(void);
10938         export function AccessError_unknown_chain(): AccessError {
10939                 if(!isWasmInitialized) {
10940                         throw new Error("initializeWasm() must be awaited first!");
10941                 }
10942                 const nativeResponseValue = wasm.AccessError_unknown_chain();
10943                 return nativeResponseValue;
10944         }
10945         // enum LDKAccessError AccessError_unknown_tx(void);
10946         export function AccessError_unknown_tx(): AccessError {
10947                 if(!isWasmInitialized) {
10948                         throw new Error("initializeWasm() must be awaited first!");
10949                 }
10950                 const nativeResponseValue = wasm.AccessError_unknown_tx();
10951                 return nativeResponseValue;
10952         }
10953         // void Access_free(struct LDKAccess this_ptr);
10954         export function Access_free(this_ptr: number): void {
10955                 if(!isWasmInitialized) {
10956                         throw new Error("initializeWasm() must be awaited first!");
10957                 }
10958                 const nativeResponseValue = wasm.Access_free(this_ptr);
10959                 // debug statements here
10960         }
10961         // void Listen_free(struct LDKListen this_ptr);
10962         export function Listen_free(this_ptr: number): void {
10963                 if(!isWasmInitialized) {
10964                         throw new Error("initializeWasm() must be awaited first!");
10965                 }
10966                 const nativeResponseValue = wasm.Listen_free(this_ptr);
10967                 // debug statements here
10968         }
10969         // void Confirm_free(struct LDKConfirm this_ptr);
10970         export function Confirm_free(this_ptr: number): void {
10971                 if(!isWasmInitialized) {
10972                         throw new Error("initializeWasm() must be awaited first!");
10973                 }
10974                 const nativeResponseValue = wasm.Confirm_free(this_ptr);
10975                 // debug statements here
10976         }
10977         // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_clone(const enum LDKChannelMonitorUpdateErr *NONNULL_PTR orig);
10978         export function ChannelMonitorUpdateErr_clone(orig: number): ChannelMonitorUpdateErr {
10979                 if(!isWasmInitialized) {
10980                         throw new Error("initializeWasm() must be awaited first!");
10981                 }
10982                 const nativeResponseValue = wasm.ChannelMonitorUpdateErr_clone(orig);
10983                 return nativeResponseValue;
10984         }
10985         // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_temporary_failure(void);
10986         export function ChannelMonitorUpdateErr_temporary_failure(): ChannelMonitorUpdateErr {
10987                 if(!isWasmInitialized) {
10988                         throw new Error("initializeWasm() must be awaited first!");
10989                 }
10990                 const nativeResponseValue = wasm.ChannelMonitorUpdateErr_temporary_failure();
10991                 return nativeResponseValue;
10992         }
10993         // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_permanent_failure(void);
10994         export function ChannelMonitorUpdateErr_permanent_failure(): ChannelMonitorUpdateErr {
10995                 if(!isWasmInitialized) {
10996                         throw new Error("initializeWasm() must be awaited first!");
10997                 }
10998                 const nativeResponseValue = wasm.ChannelMonitorUpdateErr_permanent_failure();
10999                 return nativeResponseValue;
11000         }
11001         // void Watch_free(struct LDKWatch this_ptr);
11002         export function Watch_free(this_ptr: number): void {
11003                 if(!isWasmInitialized) {
11004                         throw new Error("initializeWasm() must be awaited first!");
11005                 }
11006                 const nativeResponseValue = wasm.Watch_free(this_ptr);
11007                 // debug statements here
11008         }
11009         // void Filter_free(struct LDKFilter this_ptr);
11010         export function Filter_free(this_ptr: number): void {
11011                 if(!isWasmInitialized) {
11012                         throw new Error("initializeWasm() must be awaited first!");
11013                 }
11014                 const nativeResponseValue = wasm.Filter_free(this_ptr);
11015                 // debug statements here
11016         }
11017         // void WatchedOutput_free(struct LDKWatchedOutput this_obj);
11018         export function WatchedOutput_free(this_obj: number): void {
11019                 if(!isWasmInitialized) {
11020                         throw new Error("initializeWasm() must be awaited first!");
11021                 }
11022                 const nativeResponseValue = wasm.WatchedOutput_free(this_obj);
11023                 // debug statements here
11024         }
11025         // struct LDKThirtyTwoBytes WatchedOutput_get_block_hash(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
11026         export function WatchedOutput_get_block_hash(this_ptr: number): Uint8Array {
11027                 if(!isWasmInitialized) {
11028                         throw new Error("initializeWasm() must be awaited first!");
11029                 }
11030                 const nativeResponseValue = wasm.WatchedOutput_get_block_hash(this_ptr);
11031                 return decodeArray(nativeResponseValue);
11032         }
11033         // void WatchedOutput_set_block_hash(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11034         export function WatchedOutput_set_block_hash(this_ptr: number, val: Uint8Array): void {
11035                 if(!isWasmInitialized) {
11036                         throw new Error("initializeWasm() must be awaited first!");
11037                 }
11038                 const nativeResponseValue = wasm.WatchedOutput_set_block_hash(this_ptr, encodeArray(val));
11039                 // debug statements here
11040         }
11041         // struct LDKOutPoint WatchedOutput_get_outpoint(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
11042         export function WatchedOutput_get_outpoint(this_ptr: number): number {
11043                 if(!isWasmInitialized) {
11044                         throw new Error("initializeWasm() must be awaited first!");
11045                 }
11046                 const nativeResponseValue = wasm.WatchedOutput_get_outpoint(this_ptr);
11047                 return nativeResponseValue;
11048         }
11049         // void WatchedOutput_set_outpoint(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKOutPoint val);
11050         export function WatchedOutput_set_outpoint(this_ptr: number, val: number): void {
11051                 if(!isWasmInitialized) {
11052                         throw new Error("initializeWasm() must be awaited first!");
11053                 }
11054                 const nativeResponseValue = wasm.WatchedOutput_set_outpoint(this_ptr, val);
11055                 // debug statements here
11056         }
11057         // struct LDKu8slice WatchedOutput_get_script_pubkey(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
11058         export function WatchedOutput_get_script_pubkey(this_ptr: number): Uint8Array {
11059                 if(!isWasmInitialized) {
11060                         throw new Error("initializeWasm() must be awaited first!");
11061                 }
11062                 const nativeResponseValue = wasm.WatchedOutput_get_script_pubkey(this_ptr);
11063                 return decodeArray(nativeResponseValue);
11064         }
11065         // void WatchedOutput_set_script_pubkey(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
11066         export function WatchedOutput_set_script_pubkey(this_ptr: number, val: Uint8Array): void {
11067                 if(!isWasmInitialized) {
11068                         throw new Error("initializeWasm() must be awaited first!");
11069                 }
11070                 const nativeResponseValue = wasm.WatchedOutput_set_script_pubkey(this_ptr, encodeArray(val));
11071                 // debug statements here
11072         }
11073         // MUST_USE_RES struct LDKWatchedOutput WatchedOutput_new(struct LDKThirtyTwoBytes block_hash_arg, struct LDKOutPoint outpoint_arg, struct LDKCVec_u8Z script_pubkey_arg);
11074         export function WatchedOutput_new(block_hash_arg: Uint8Array, outpoint_arg: number, script_pubkey_arg: Uint8Array): number {
11075                 if(!isWasmInitialized) {
11076                         throw new Error("initializeWasm() must be awaited first!");
11077                 }
11078                 const nativeResponseValue = wasm.WatchedOutput_new(encodeArray(block_hash_arg), outpoint_arg, encodeArray(script_pubkey_arg));
11079                 return nativeResponseValue;
11080         }
11081         // uint64_t WatchedOutput_clone_ptr(LDKWatchedOutput *NONNULL_PTR arg);
11082         export function WatchedOutput_clone_ptr(arg: number): number {
11083                 if(!isWasmInitialized) {
11084                         throw new Error("initializeWasm() must be awaited first!");
11085                 }
11086                 const nativeResponseValue = wasm.WatchedOutput_clone_ptr(arg);
11087                 return nativeResponseValue;
11088         }
11089         // struct LDKWatchedOutput WatchedOutput_clone(const struct LDKWatchedOutput *NONNULL_PTR orig);
11090         export function WatchedOutput_clone(orig: number): number {
11091                 if(!isWasmInitialized) {
11092                         throw new Error("initializeWasm() must be awaited first!");
11093                 }
11094                 const nativeResponseValue = wasm.WatchedOutput_clone(orig);
11095                 return nativeResponseValue;
11096         }
11097         // uint64_t WatchedOutput_hash(const struct LDKWatchedOutput *NONNULL_PTR o);
11098         export function WatchedOutput_hash(o: number): number {
11099                 if(!isWasmInitialized) {
11100                         throw new Error("initializeWasm() must be awaited first!");
11101                 }
11102                 const nativeResponseValue = wasm.WatchedOutput_hash(o);
11103                 return nativeResponseValue;
11104         }
11105         // void BroadcasterInterface_free(struct LDKBroadcasterInterface this_ptr);
11106         export function BroadcasterInterface_free(this_ptr: number): void {
11107                 if(!isWasmInitialized) {
11108                         throw new Error("initializeWasm() must be awaited first!");
11109                 }
11110                 const nativeResponseValue = wasm.BroadcasterInterface_free(this_ptr);
11111                 // debug statements here
11112         }
11113         // enum LDKConfirmationTarget ConfirmationTarget_clone(const enum LDKConfirmationTarget *NONNULL_PTR orig);
11114         export function ConfirmationTarget_clone(orig: number): ConfirmationTarget {
11115                 if(!isWasmInitialized) {
11116                         throw new Error("initializeWasm() must be awaited first!");
11117                 }
11118                 const nativeResponseValue = wasm.ConfirmationTarget_clone(orig);
11119                 return nativeResponseValue;
11120         }
11121         // enum LDKConfirmationTarget ConfirmationTarget_background(void);
11122         export function ConfirmationTarget_background(): ConfirmationTarget {
11123                 if(!isWasmInitialized) {
11124                         throw new Error("initializeWasm() must be awaited first!");
11125                 }
11126                 const nativeResponseValue = wasm.ConfirmationTarget_background();
11127                 return nativeResponseValue;
11128         }
11129         // enum LDKConfirmationTarget ConfirmationTarget_normal(void);
11130         export function ConfirmationTarget_normal(): ConfirmationTarget {
11131                 if(!isWasmInitialized) {
11132                         throw new Error("initializeWasm() must be awaited first!");
11133                 }
11134                 const nativeResponseValue = wasm.ConfirmationTarget_normal();
11135                 return nativeResponseValue;
11136         }
11137         // enum LDKConfirmationTarget ConfirmationTarget_high_priority(void);
11138         export function ConfirmationTarget_high_priority(): ConfirmationTarget {
11139                 if(!isWasmInitialized) {
11140                         throw new Error("initializeWasm() must be awaited first!");
11141                 }
11142                 const nativeResponseValue = wasm.ConfirmationTarget_high_priority();
11143                 return nativeResponseValue;
11144         }
11145         // bool ConfirmationTarget_eq(const enum LDKConfirmationTarget *NONNULL_PTR a, const enum LDKConfirmationTarget *NONNULL_PTR b);
11146         export function ConfirmationTarget_eq(a: number, b: number): boolean {
11147                 if(!isWasmInitialized) {
11148                         throw new Error("initializeWasm() must be awaited first!");
11149                 }
11150                 const nativeResponseValue = wasm.ConfirmationTarget_eq(a, b);
11151                 return nativeResponseValue;
11152         }
11153         // void FeeEstimator_free(struct LDKFeeEstimator this_ptr);
11154         export function FeeEstimator_free(this_ptr: number): void {
11155                 if(!isWasmInitialized) {
11156                         throw new Error("initializeWasm() must be awaited first!");
11157                 }
11158                 const nativeResponseValue = wasm.FeeEstimator_free(this_ptr);
11159                 // debug statements here
11160         }
11161         // void MonitorUpdateId_free(struct LDKMonitorUpdateId this_obj);
11162         export function MonitorUpdateId_free(this_obj: number): void {
11163                 if(!isWasmInitialized) {
11164                         throw new Error("initializeWasm() must be awaited first!");
11165                 }
11166                 const nativeResponseValue = wasm.MonitorUpdateId_free(this_obj);
11167                 // debug statements here
11168         }
11169         // uint64_t MonitorUpdateId_clone_ptr(LDKMonitorUpdateId *NONNULL_PTR arg);
11170         export function MonitorUpdateId_clone_ptr(arg: number): number {
11171                 if(!isWasmInitialized) {
11172                         throw new Error("initializeWasm() must be awaited first!");
11173                 }
11174                 const nativeResponseValue = wasm.MonitorUpdateId_clone_ptr(arg);
11175                 return nativeResponseValue;
11176         }
11177         // struct LDKMonitorUpdateId MonitorUpdateId_clone(const struct LDKMonitorUpdateId *NONNULL_PTR orig);
11178         export function MonitorUpdateId_clone(orig: number): number {
11179                 if(!isWasmInitialized) {
11180                         throw new Error("initializeWasm() must be awaited first!");
11181                 }
11182                 const nativeResponseValue = wasm.MonitorUpdateId_clone(orig);
11183                 return nativeResponseValue;
11184         }
11185         // uint64_t MonitorUpdateId_hash(const struct LDKMonitorUpdateId *NONNULL_PTR o);
11186         export function MonitorUpdateId_hash(o: number): number {
11187                 if(!isWasmInitialized) {
11188                         throw new Error("initializeWasm() must be awaited first!");
11189                 }
11190                 const nativeResponseValue = wasm.MonitorUpdateId_hash(o);
11191                 return nativeResponseValue;
11192         }
11193         // bool MonitorUpdateId_eq(const struct LDKMonitorUpdateId *NONNULL_PTR a, const struct LDKMonitorUpdateId *NONNULL_PTR b);
11194         export function MonitorUpdateId_eq(a: number, b: number): boolean {
11195                 if(!isWasmInitialized) {
11196                         throw new Error("initializeWasm() must be awaited first!");
11197                 }
11198                 const nativeResponseValue = wasm.MonitorUpdateId_eq(a, b);
11199                 return nativeResponseValue;
11200         }
11201         // void Persist_free(struct LDKPersist this_ptr);
11202         export function Persist_free(this_ptr: number): void {
11203                 if(!isWasmInitialized) {
11204                         throw new Error("initializeWasm() must be awaited first!");
11205                 }
11206                 const nativeResponseValue = wasm.Persist_free(this_ptr);
11207                 // debug statements here
11208         }
11209         // void LockedChannelMonitor_free(struct LDKLockedChannelMonitor this_obj);
11210         export function LockedChannelMonitor_free(this_obj: number): void {
11211                 if(!isWasmInitialized) {
11212                         throw new Error("initializeWasm() must be awaited first!");
11213                 }
11214                 const nativeResponseValue = wasm.LockedChannelMonitor_free(this_obj);
11215                 // debug statements here
11216         }
11217         // void ChainMonitor_free(struct LDKChainMonitor this_obj);
11218         export function ChainMonitor_free(this_obj: number): void {
11219                 if(!isWasmInitialized) {
11220                         throw new Error("initializeWasm() must be awaited first!");
11221                 }
11222                 const nativeResponseValue = wasm.ChainMonitor_free(this_obj);
11223                 // debug statements here
11224         }
11225         // MUST_USE_RES struct LDKChainMonitor ChainMonitor_new(struct LDKCOption_FilterZ chain_source, struct LDKBroadcasterInterface broadcaster, struct LDKLogger logger, struct LDKFeeEstimator feeest, struct LDKPersist persister);
11226         export function ChainMonitor_new(chain_source: number, broadcaster: number, logger: number, feeest: number, persister: number): number {
11227                 if(!isWasmInitialized) {
11228                         throw new Error("initializeWasm() must be awaited first!");
11229                 }
11230                 const nativeResponseValue = wasm.ChainMonitor_new(chain_source, broadcaster, logger, feeest, persister);
11231                 return nativeResponseValue;
11232         }
11233         // MUST_USE_RES struct LDKCVec_BalanceZ ChainMonitor_get_claimable_balances(const struct LDKChainMonitor *NONNULL_PTR this_arg, struct LDKCVec_ChannelDetailsZ ignored_channels);
11234         export function ChainMonitor_get_claimable_balances(this_arg: number, ignored_channels: number[]): number[] {
11235                 if(!isWasmInitialized) {
11236                         throw new Error("initializeWasm() must be awaited first!");
11237                 }
11238                 const nativeResponseValue = wasm.ChainMonitor_get_claimable_balances(this_arg, ignored_channels);
11239                 return nativeResponseValue;
11240         }
11241         // MUST_USE_RES struct LDKCResult_LockedChannelMonitorNoneZ ChainMonitor_get_monitor(const struct LDKChainMonitor *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo);
11242         export function ChainMonitor_get_monitor(this_arg: number, funding_txo: number): number {
11243                 if(!isWasmInitialized) {
11244                         throw new Error("initializeWasm() must be awaited first!");
11245                 }
11246                 const nativeResponseValue = wasm.ChainMonitor_get_monitor(this_arg, funding_txo);
11247                 return nativeResponseValue;
11248         }
11249         // MUST_USE_RES struct LDKCVec_OutPointZ ChainMonitor_list_monitors(const struct LDKChainMonitor *NONNULL_PTR this_arg);
11250         export function ChainMonitor_list_monitors(this_arg: number): number[] {
11251                 if(!isWasmInitialized) {
11252                         throw new Error("initializeWasm() must be awaited first!");
11253                 }
11254                 const nativeResponseValue = wasm.ChainMonitor_list_monitors(this_arg);
11255                 return nativeResponseValue;
11256         }
11257         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChainMonitor_channel_monitor_updated(const struct LDKChainMonitor *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKMonitorUpdateId completed_update_id);
11258         export function ChainMonitor_channel_monitor_updated(this_arg: number, funding_txo: number, completed_update_id: number): number {
11259                 if(!isWasmInitialized) {
11260                         throw new Error("initializeWasm() must be awaited first!");
11261                 }
11262                 const nativeResponseValue = wasm.ChainMonitor_channel_monitor_updated(this_arg, funding_txo, completed_update_id);
11263                 return nativeResponseValue;
11264         }
11265         // struct LDKListen ChainMonitor_as_Listen(const struct LDKChainMonitor *NONNULL_PTR this_arg);
11266         export function ChainMonitor_as_Listen(this_arg: number): number {
11267                 if(!isWasmInitialized) {
11268                         throw new Error("initializeWasm() must be awaited first!");
11269                 }
11270                 const nativeResponseValue = wasm.ChainMonitor_as_Listen(this_arg);
11271                 return nativeResponseValue;
11272         }
11273         // struct LDKConfirm ChainMonitor_as_Confirm(const struct LDKChainMonitor *NONNULL_PTR this_arg);
11274         export function ChainMonitor_as_Confirm(this_arg: number): number {
11275                 if(!isWasmInitialized) {
11276                         throw new Error("initializeWasm() must be awaited first!");
11277                 }
11278                 const nativeResponseValue = wasm.ChainMonitor_as_Confirm(this_arg);
11279                 return nativeResponseValue;
11280         }
11281         // struct LDKWatch ChainMonitor_as_Watch(const struct LDKChainMonitor *NONNULL_PTR this_arg);
11282         export function ChainMonitor_as_Watch(this_arg: number): number {
11283                 if(!isWasmInitialized) {
11284                         throw new Error("initializeWasm() must be awaited first!");
11285                 }
11286                 const nativeResponseValue = wasm.ChainMonitor_as_Watch(this_arg);
11287                 return nativeResponseValue;
11288         }
11289         // struct LDKEventsProvider ChainMonitor_as_EventsProvider(const struct LDKChainMonitor *NONNULL_PTR this_arg);
11290         export function ChainMonitor_as_EventsProvider(this_arg: number): number {
11291                 if(!isWasmInitialized) {
11292                         throw new Error("initializeWasm() must be awaited first!");
11293                 }
11294                 const nativeResponseValue = wasm.ChainMonitor_as_EventsProvider(this_arg);
11295                 return nativeResponseValue;
11296         }
11297         // void ChannelMonitorUpdate_free(struct LDKChannelMonitorUpdate this_obj);
11298         export function ChannelMonitorUpdate_free(this_obj: number): void {
11299                 if(!isWasmInitialized) {
11300                         throw new Error("initializeWasm() must be awaited first!");
11301                 }
11302                 const nativeResponseValue = wasm.ChannelMonitorUpdate_free(this_obj);
11303                 // debug statements here
11304         }
11305         // uint64_t ChannelMonitorUpdate_get_update_id(const struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr);
11306         export function ChannelMonitorUpdate_get_update_id(this_ptr: number): number {
11307                 if(!isWasmInitialized) {
11308                         throw new Error("initializeWasm() must be awaited first!");
11309                 }
11310                 const nativeResponseValue = wasm.ChannelMonitorUpdate_get_update_id(this_ptr);
11311                 return nativeResponseValue;
11312         }
11313         // void ChannelMonitorUpdate_set_update_id(struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr, uint64_t val);
11314         export function ChannelMonitorUpdate_set_update_id(this_ptr: number, val: number): void {
11315                 if(!isWasmInitialized) {
11316                         throw new Error("initializeWasm() must be awaited first!");
11317                 }
11318                 const nativeResponseValue = wasm.ChannelMonitorUpdate_set_update_id(this_ptr, val);
11319                 // debug statements here
11320         }
11321         // uint64_t ChannelMonitorUpdate_clone_ptr(LDKChannelMonitorUpdate *NONNULL_PTR arg);
11322         export function ChannelMonitorUpdate_clone_ptr(arg: number): number {
11323                 if(!isWasmInitialized) {
11324                         throw new Error("initializeWasm() must be awaited first!");
11325                 }
11326                 const nativeResponseValue = wasm.ChannelMonitorUpdate_clone_ptr(arg);
11327                 return nativeResponseValue;
11328         }
11329         // struct LDKChannelMonitorUpdate ChannelMonitorUpdate_clone(const struct LDKChannelMonitorUpdate *NONNULL_PTR orig);
11330         export function ChannelMonitorUpdate_clone(orig: number): number {
11331                 if(!isWasmInitialized) {
11332                         throw new Error("initializeWasm() must be awaited first!");
11333                 }
11334                 const nativeResponseValue = wasm.ChannelMonitorUpdate_clone(orig);
11335                 return nativeResponseValue;
11336         }
11337         // struct LDKCVec_u8Z ChannelMonitorUpdate_write(const struct LDKChannelMonitorUpdate *NONNULL_PTR obj);
11338         export function ChannelMonitorUpdate_write(obj: number): Uint8Array {
11339                 if(!isWasmInitialized) {
11340                         throw new Error("initializeWasm() must be awaited first!");
11341                 }
11342                 const nativeResponseValue = wasm.ChannelMonitorUpdate_write(obj);
11343                 return decodeArray(nativeResponseValue);
11344         }
11345         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ ChannelMonitorUpdate_read(struct LDKu8slice ser);
11346         export function ChannelMonitorUpdate_read(ser: Uint8Array): number {
11347                 if(!isWasmInitialized) {
11348                         throw new Error("initializeWasm() must be awaited first!");
11349                 }
11350                 const nativeResponseValue = wasm.ChannelMonitorUpdate_read(encodeArray(ser));
11351                 return nativeResponseValue;
11352         }
11353         // void MonitorEvent_free(struct LDKMonitorEvent this_ptr);
11354         export function MonitorEvent_free(this_ptr: number): void {
11355                 if(!isWasmInitialized) {
11356                         throw new Error("initializeWasm() must be awaited first!");
11357                 }
11358                 const nativeResponseValue = wasm.MonitorEvent_free(this_ptr);
11359                 // debug statements here
11360         }
11361         // uint64_t MonitorEvent_clone_ptr(LDKMonitorEvent *NONNULL_PTR arg);
11362         export function MonitorEvent_clone_ptr(arg: number): number {
11363                 if(!isWasmInitialized) {
11364                         throw new Error("initializeWasm() must be awaited first!");
11365                 }
11366                 const nativeResponseValue = wasm.MonitorEvent_clone_ptr(arg);
11367                 return nativeResponseValue;
11368         }
11369         // struct LDKMonitorEvent MonitorEvent_clone(const struct LDKMonitorEvent *NONNULL_PTR orig);
11370         export function MonitorEvent_clone(orig: number): number {
11371                 if(!isWasmInitialized) {
11372                         throw new Error("initializeWasm() must be awaited first!");
11373                 }
11374                 const nativeResponseValue = wasm.MonitorEvent_clone(orig);
11375                 return nativeResponseValue;
11376         }
11377         // struct LDKMonitorEvent MonitorEvent_htlcevent(struct LDKHTLCUpdate a);
11378         export function MonitorEvent_htlcevent(a: number): number {
11379                 if(!isWasmInitialized) {
11380                         throw new Error("initializeWasm() must be awaited first!");
11381                 }
11382                 const nativeResponseValue = wasm.MonitorEvent_htlcevent(a);
11383                 return nativeResponseValue;
11384         }
11385         // struct LDKMonitorEvent MonitorEvent_commitment_tx_confirmed(struct LDKOutPoint a);
11386         export function MonitorEvent_commitment_tx_confirmed(a: number): number {
11387                 if(!isWasmInitialized) {
11388                         throw new Error("initializeWasm() must be awaited first!");
11389                 }
11390                 const nativeResponseValue = wasm.MonitorEvent_commitment_tx_confirmed(a);
11391                 return nativeResponseValue;
11392         }
11393         // struct LDKMonitorEvent MonitorEvent_update_completed(struct LDKOutPoint funding_txo, uint64_t monitor_update_id);
11394         export function MonitorEvent_update_completed(funding_txo: number, monitor_update_id: number): number {
11395                 if(!isWasmInitialized) {
11396                         throw new Error("initializeWasm() must be awaited first!");
11397                 }
11398                 const nativeResponseValue = wasm.MonitorEvent_update_completed(funding_txo, monitor_update_id);
11399                 return nativeResponseValue;
11400         }
11401         // struct LDKMonitorEvent MonitorEvent_update_failed(struct LDKOutPoint a);
11402         export function MonitorEvent_update_failed(a: number): number {
11403                 if(!isWasmInitialized) {
11404                         throw new Error("initializeWasm() must be awaited first!");
11405                 }
11406                 const nativeResponseValue = wasm.MonitorEvent_update_failed(a);
11407                 return nativeResponseValue;
11408         }
11409         // struct LDKCVec_u8Z MonitorEvent_write(const struct LDKMonitorEvent *NONNULL_PTR obj);
11410         export function MonitorEvent_write(obj: number): Uint8Array {
11411                 if(!isWasmInitialized) {
11412                         throw new Error("initializeWasm() must be awaited first!");
11413                 }
11414                 const nativeResponseValue = wasm.MonitorEvent_write(obj);
11415                 return decodeArray(nativeResponseValue);
11416         }
11417         // struct LDKCResult_COption_MonitorEventZDecodeErrorZ MonitorEvent_read(struct LDKu8slice ser);
11418         export function MonitorEvent_read(ser: Uint8Array): number {
11419                 if(!isWasmInitialized) {
11420                         throw new Error("initializeWasm() must be awaited first!");
11421                 }
11422                 const nativeResponseValue = wasm.MonitorEvent_read(encodeArray(ser));
11423                 return nativeResponseValue;
11424         }
11425         // void HTLCUpdate_free(struct LDKHTLCUpdate this_obj);
11426         export function HTLCUpdate_free(this_obj: number): void {
11427                 if(!isWasmInitialized) {
11428                         throw new Error("initializeWasm() must be awaited first!");
11429                 }
11430                 const nativeResponseValue = wasm.HTLCUpdate_free(this_obj);
11431                 // debug statements here
11432         }
11433         // uint64_t HTLCUpdate_clone_ptr(LDKHTLCUpdate *NONNULL_PTR arg);
11434         export function HTLCUpdate_clone_ptr(arg: number): number {
11435                 if(!isWasmInitialized) {
11436                         throw new Error("initializeWasm() must be awaited first!");
11437                 }
11438                 const nativeResponseValue = wasm.HTLCUpdate_clone_ptr(arg);
11439                 return nativeResponseValue;
11440         }
11441         // struct LDKHTLCUpdate HTLCUpdate_clone(const struct LDKHTLCUpdate *NONNULL_PTR orig);
11442         export function HTLCUpdate_clone(orig: number): number {
11443                 if(!isWasmInitialized) {
11444                         throw new Error("initializeWasm() must be awaited first!");
11445                 }
11446                 const nativeResponseValue = wasm.HTLCUpdate_clone(orig);
11447                 return nativeResponseValue;
11448         }
11449         // struct LDKCVec_u8Z HTLCUpdate_write(const struct LDKHTLCUpdate *NONNULL_PTR obj);
11450         export function HTLCUpdate_write(obj: number): Uint8Array {
11451                 if(!isWasmInitialized) {
11452                         throw new Error("initializeWasm() must be awaited first!");
11453                 }
11454                 const nativeResponseValue = wasm.HTLCUpdate_write(obj);
11455                 return decodeArray(nativeResponseValue);
11456         }
11457         // struct LDKCResult_HTLCUpdateDecodeErrorZ HTLCUpdate_read(struct LDKu8slice ser);
11458         export function HTLCUpdate_read(ser: Uint8Array): number {
11459                 if(!isWasmInitialized) {
11460                         throw new Error("initializeWasm() must be awaited first!");
11461                 }
11462                 const nativeResponseValue = wasm.HTLCUpdate_read(encodeArray(ser));
11463                 return nativeResponseValue;
11464         }
11465         // void Balance_free(struct LDKBalance this_ptr);
11466         export function Balance_free(this_ptr: number): void {
11467                 if(!isWasmInitialized) {
11468                         throw new Error("initializeWasm() must be awaited first!");
11469                 }
11470                 const nativeResponseValue = wasm.Balance_free(this_ptr);
11471                 // debug statements here
11472         }
11473         // uint64_t Balance_clone_ptr(LDKBalance *NONNULL_PTR arg);
11474         export function Balance_clone_ptr(arg: number): number {
11475                 if(!isWasmInitialized) {
11476                         throw new Error("initializeWasm() must be awaited first!");
11477                 }
11478                 const nativeResponseValue = wasm.Balance_clone_ptr(arg);
11479                 return nativeResponseValue;
11480         }
11481         // struct LDKBalance Balance_clone(const struct LDKBalance *NONNULL_PTR orig);
11482         export function Balance_clone(orig: number): number {
11483                 if(!isWasmInitialized) {
11484                         throw new Error("initializeWasm() must be awaited first!");
11485                 }
11486                 const nativeResponseValue = wasm.Balance_clone(orig);
11487                 return nativeResponseValue;
11488         }
11489         // struct LDKBalance Balance_claimable_on_channel_close(uint64_t claimable_amount_satoshis);
11490         export function Balance_claimable_on_channel_close(claimable_amount_satoshis: number): number {
11491                 if(!isWasmInitialized) {
11492                         throw new Error("initializeWasm() must be awaited first!");
11493                 }
11494                 const nativeResponseValue = wasm.Balance_claimable_on_channel_close(claimable_amount_satoshis);
11495                 return nativeResponseValue;
11496         }
11497         // struct LDKBalance Balance_claimable_awaiting_confirmations(uint64_t claimable_amount_satoshis, uint32_t confirmation_height);
11498         export function Balance_claimable_awaiting_confirmations(claimable_amount_satoshis: number, confirmation_height: number): number {
11499                 if(!isWasmInitialized) {
11500                         throw new Error("initializeWasm() must be awaited first!");
11501                 }
11502                 const nativeResponseValue = wasm.Balance_claimable_awaiting_confirmations(claimable_amount_satoshis, confirmation_height);
11503                 return nativeResponseValue;
11504         }
11505         // struct LDKBalance Balance_contentious_claimable(uint64_t claimable_amount_satoshis, uint32_t timeout_height);
11506         export function Balance_contentious_claimable(claimable_amount_satoshis: number, timeout_height: number): number {
11507                 if(!isWasmInitialized) {
11508                         throw new Error("initializeWasm() must be awaited first!");
11509                 }
11510                 const nativeResponseValue = wasm.Balance_contentious_claimable(claimable_amount_satoshis, timeout_height);
11511                 return nativeResponseValue;
11512         }
11513         // struct LDKBalance Balance_maybe_claimable_htlcawaiting_timeout(uint64_t claimable_amount_satoshis, uint32_t claimable_height);
11514         export function Balance_maybe_claimable_htlcawaiting_timeout(claimable_amount_satoshis: number, claimable_height: number): number {
11515                 if(!isWasmInitialized) {
11516                         throw new Error("initializeWasm() must be awaited first!");
11517                 }
11518                 const nativeResponseValue = wasm.Balance_maybe_claimable_htlcawaiting_timeout(claimable_amount_satoshis, claimable_height);
11519                 return nativeResponseValue;
11520         }
11521         // bool Balance_eq(const struct LDKBalance *NONNULL_PTR a, const struct LDKBalance *NONNULL_PTR b);
11522         export function Balance_eq(a: number, b: number): boolean {
11523                 if(!isWasmInitialized) {
11524                         throw new Error("initializeWasm() must be awaited first!");
11525                 }
11526                 const nativeResponseValue = wasm.Balance_eq(a, b);
11527                 return nativeResponseValue;
11528         }
11529         // void ChannelMonitor_free(struct LDKChannelMonitor this_obj);
11530         export function ChannelMonitor_free(this_obj: number): void {
11531                 if(!isWasmInitialized) {
11532                         throw new Error("initializeWasm() must be awaited first!");
11533                 }
11534                 const nativeResponseValue = wasm.ChannelMonitor_free(this_obj);
11535                 // debug statements here
11536         }
11537         // uint64_t ChannelMonitor_clone_ptr(LDKChannelMonitor *NONNULL_PTR arg);
11538         export function ChannelMonitor_clone_ptr(arg: number): number {
11539                 if(!isWasmInitialized) {
11540                         throw new Error("initializeWasm() must be awaited first!");
11541                 }
11542                 const nativeResponseValue = wasm.ChannelMonitor_clone_ptr(arg);
11543                 return nativeResponseValue;
11544         }
11545         // struct LDKChannelMonitor ChannelMonitor_clone(const struct LDKChannelMonitor *NONNULL_PTR orig);
11546         export function ChannelMonitor_clone(orig: number): number {
11547                 if(!isWasmInitialized) {
11548                         throw new Error("initializeWasm() must be awaited first!");
11549                 }
11550                 const nativeResponseValue = wasm.ChannelMonitor_clone(orig);
11551                 return nativeResponseValue;
11552         }
11553         // struct LDKCVec_u8Z ChannelMonitor_write(const struct LDKChannelMonitor *NONNULL_PTR obj);
11554         export function ChannelMonitor_write(obj: number): Uint8Array {
11555                 if(!isWasmInitialized) {
11556                         throw new Error("initializeWasm() must be awaited first!");
11557                 }
11558                 const nativeResponseValue = wasm.ChannelMonitor_write(obj);
11559                 return decodeArray(nativeResponseValue);
11560         }
11561         // MUST_USE_RES struct LDKCResult_NoneNoneZ ChannelMonitor_update_monitor(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKChannelMonitorUpdate *NONNULL_PTR updates, const struct LDKBroadcasterInterface *NONNULL_PTR broadcaster, const struct LDKFeeEstimator *NONNULL_PTR fee_estimator, const struct LDKLogger *NONNULL_PTR logger);
11562         export function ChannelMonitor_update_monitor(this_arg: number, updates: number, broadcaster: number, fee_estimator: number, logger: number): number {
11563                 if(!isWasmInitialized) {
11564                         throw new Error("initializeWasm() must be awaited first!");
11565                 }
11566                 const nativeResponseValue = wasm.ChannelMonitor_update_monitor(this_arg, updates, broadcaster, fee_estimator, logger);
11567                 return nativeResponseValue;
11568         }
11569         // MUST_USE_RES uint64_t ChannelMonitor_get_latest_update_id(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
11570         export function ChannelMonitor_get_latest_update_id(this_arg: number): number {
11571                 if(!isWasmInitialized) {
11572                         throw new Error("initializeWasm() must be awaited first!");
11573                 }
11574                 const nativeResponseValue = wasm.ChannelMonitor_get_latest_update_id(this_arg);
11575                 return nativeResponseValue;
11576         }
11577         // MUST_USE_RES struct LDKC2Tuple_OutPointScriptZ ChannelMonitor_get_funding_txo(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
11578         export function ChannelMonitor_get_funding_txo(this_arg: number): number {
11579                 if(!isWasmInitialized) {
11580                         throw new Error("initializeWasm() must be awaited first!");
11581                 }
11582                 const nativeResponseValue = wasm.ChannelMonitor_get_funding_txo(this_arg);
11583                 return nativeResponseValue;
11584         }
11585         // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ ChannelMonitor_get_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
11586         export function ChannelMonitor_get_outputs_to_watch(this_arg: number): number[] {
11587                 if(!isWasmInitialized) {
11588                         throw new Error("initializeWasm() must be awaited first!");
11589                 }
11590                 const nativeResponseValue = wasm.ChannelMonitor_get_outputs_to_watch(this_arg);
11591                 return nativeResponseValue;
11592         }
11593         // void ChannelMonitor_load_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKFilter *NONNULL_PTR filter);
11594         export function ChannelMonitor_load_outputs_to_watch(this_arg: number, filter: number): void {
11595                 if(!isWasmInitialized) {
11596                         throw new Error("initializeWasm() must be awaited first!");
11597                 }
11598                 const nativeResponseValue = wasm.ChannelMonitor_load_outputs_to_watch(this_arg, filter);
11599                 // debug statements here
11600         }
11601         // MUST_USE_RES struct LDKCVec_MonitorEventZ ChannelMonitor_get_and_clear_pending_monitor_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
11602         export function ChannelMonitor_get_and_clear_pending_monitor_events(this_arg: number): number[] {
11603                 if(!isWasmInitialized) {
11604                         throw new Error("initializeWasm() must be awaited first!");
11605                 }
11606                 const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_monitor_events(this_arg);
11607                 return nativeResponseValue;
11608         }
11609         // MUST_USE_RES struct LDKCVec_EventZ ChannelMonitor_get_and_clear_pending_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
11610         export function ChannelMonitor_get_and_clear_pending_events(this_arg: number): number[] {
11611                 if(!isWasmInitialized) {
11612                         throw new Error("initializeWasm() must be awaited first!");
11613                 }
11614                 const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_events(this_arg);
11615                 return nativeResponseValue;
11616         }
11617         // MUST_USE_RES struct LDKCVec_TransactionZ ChannelMonitor_get_latest_holder_commitment_txn(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKLogger *NONNULL_PTR logger);
11618         export function ChannelMonitor_get_latest_holder_commitment_txn(this_arg: number, logger: number): Uint8Array[] {
11619                 if(!isWasmInitialized) {
11620                         throw new Error("initializeWasm() must be awaited first!");
11621                 }
11622                 const nativeResponseValue = wasm.ChannelMonitor_get_latest_holder_commitment_txn(this_arg, logger);
11623                 return nativeResponseValue;
11624         }
11625         // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ChannelMonitor_block_connected(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, struct LDKLogger logger);
11626         export function ChannelMonitor_block_connected(this_arg: number, header: Uint8Array, txdata: number[], height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
11627                 if(!isWasmInitialized) {
11628                         throw new Error("initializeWasm() must be awaited first!");
11629                 }
11630                 const nativeResponseValue = wasm.ChannelMonitor_block_connected(this_arg, encodeArray(header), txdata, height, broadcaster, fee_estimator, logger);
11631                 return nativeResponseValue;
11632         }
11633         // void ChannelMonitor_block_disconnected(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, struct LDKLogger logger);
11634         export function ChannelMonitor_block_disconnected(this_arg: number, header: Uint8Array, height: number, broadcaster: number, fee_estimator: number, logger: number): void {
11635                 if(!isWasmInitialized) {
11636                         throw new Error("initializeWasm() must be awaited first!");
11637                 }
11638                 const nativeResponseValue = wasm.ChannelMonitor_block_disconnected(this_arg, encodeArray(header), height, broadcaster, fee_estimator, logger);
11639                 // debug statements here
11640         }
11641         // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ChannelMonitor_transactions_confirmed(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, struct LDKLogger logger);
11642         export function ChannelMonitor_transactions_confirmed(this_arg: number, header: Uint8Array, txdata: number[], height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
11643                 if(!isWasmInitialized) {
11644                         throw new Error("initializeWasm() must be awaited first!");
11645                 }
11646                 const nativeResponseValue = wasm.ChannelMonitor_transactions_confirmed(this_arg, encodeArray(header), txdata, height, broadcaster, fee_estimator, logger);
11647                 return nativeResponseValue;
11648         }
11649         // void ChannelMonitor_transaction_unconfirmed(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*txid)[32], struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, struct LDKLogger logger);
11650         export function ChannelMonitor_transaction_unconfirmed(this_arg: number, txid: Uint8Array, broadcaster: number, fee_estimator: number, logger: number): void {
11651                 if(!isWasmInitialized) {
11652                         throw new Error("initializeWasm() must be awaited first!");
11653                 }
11654                 const nativeResponseValue = wasm.ChannelMonitor_transaction_unconfirmed(this_arg, encodeArray(txid), broadcaster, fee_estimator, logger);
11655                 // debug statements here
11656         }
11657         // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ChannelMonitor_best_block_updated(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, struct LDKLogger logger);
11658         export function ChannelMonitor_best_block_updated(this_arg: number, header: Uint8Array, height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
11659                 if(!isWasmInitialized) {
11660                         throw new Error("initializeWasm() must be awaited first!");
11661                 }
11662                 const nativeResponseValue = wasm.ChannelMonitor_best_block_updated(this_arg, encodeArray(header), height, broadcaster, fee_estimator, logger);
11663                 return nativeResponseValue;
11664         }
11665         // MUST_USE_RES struct LDKCVec_TxidZ ChannelMonitor_get_relevant_txids(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
11666         export function ChannelMonitor_get_relevant_txids(this_arg: number): Uint8Array[] {
11667                 if(!isWasmInitialized) {
11668                         throw new Error("initializeWasm() must be awaited first!");
11669                 }
11670                 const nativeResponseValue = wasm.ChannelMonitor_get_relevant_txids(this_arg);
11671                 return nativeResponseValue;
11672         }
11673         // MUST_USE_RES struct LDKBestBlock ChannelMonitor_current_best_block(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
11674         export function ChannelMonitor_current_best_block(this_arg: number): number {
11675                 if(!isWasmInitialized) {
11676                         throw new Error("initializeWasm() must be awaited first!");
11677                 }
11678                 const nativeResponseValue = wasm.ChannelMonitor_current_best_block(this_arg);
11679                 return nativeResponseValue;
11680         }
11681         // MUST_USE_RES struct LDKCVec_BalanceZ ChannelMonitor_get_claimable_balances(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
11682         export function ChannelMonitor_get_claimable_balances(this_arg: number): number[] {
11683                 if(!isWasmInitialized) {
11684                         throw new Error("initializeWasm() must be awaited first!");
11685                 }
11686                 const nativeResponseValue = wasm.ChannelMonitor_get_claimable_balances(this_arg);
11687                 return nativeResponseValue;
11688         }
11689         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ C2Tuple_BlockHashChannelMonitorZ_read(struct LDKu8slice ser, const struct LDKKeysInterface *NONNULL_PTR arg);
11690         export function C2Tuple_BlockHashChannelMonitorZ_read(ser: Uint8Array, arg: number): number {
11691                 if(!isWasmInitialized) {
11692                         throw new Error("initializeWasm() must be awaited first!");
11693                 }
11694                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_read(encodeArray(ser), arg);
11695                 return nativeResponseValue;
11696         }
11697         // void OutPoint_free(struct LDKOutPoint this_obj);
11698         export function OutPoint_free(this_obj: number): void {
11699                 if(!isWasmInitialized) {
11700                         throw new Error("initializeWasm() must be awaited first!");
11701                 }
11702                 const nativeResponseValue = wasm.OutPoint_free(this_obj);
11703                 // debug statements here
11704         }
11705         // const uint8_t (*OutPoint_get_txid(const struct LDKOutPoint *NONNULL_PTR this_ptr))[32];
11706         export function OutPoint_get_txid(this_ptr: number): Uint8Array {
11707                 if(!isWasmInitialized) {
11708                         throw new Error("initializeWasm() must be awaited first!");
11709                 }
11710                 const nativeResponseValue = wasm.OutPoint_get_txid(this_ptr);
11711                 return decodeArray(nativeResponseValue);
11712         }
11713         // void OutPoint_set_txid(struct LDKOutPoint *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11714         export function OutPoint_set_txid(this_ptr: number, val: Uint8Array): void {
11715                 if(!isWasmInitialized) {
11716                         throw new Error("initializeWasm() must be awaited first!");
11717                 }
11718                 const nativeResponseValue = wasm.OutPoint_set_txid(this_ptr, encodeArray(val));
11719                 // debug statements here
11720         }
11721         // uint16_t OutPoint_get_index(const struct LDKOutPoint *NONNULL_PTR this_ptr);
11722         export function OutPoint_get_index(this_ptr: number): number {
11723                 if(!isWasmInitialized) {
11724                         throw new Error("initializeWasm() must be awaited first!");
11725                 }
11726                 const nativeResponseValue = wasm.OutPoint_get_index(this_ptr);
11727                 return nativeResponseValue;
11728         }
11729         // void OutPoint_set_index(struct LDKOutPoint *NONNULL_PTR this_ptr, uint16_t val);
11730         export function OutPoint_set_index(this_ptr: number, val: number): void {
11731                 if(!isWasmInitialized) {
11732                         throw new Error("initializeWasm() must be awaited first!");
11733                 }
11734                 const nativeResponseValue = wasm.OutPoint_set_index(this_ptr, val);
11735                 // debug statements here
11736         }
11737         // MUST_USE_RES struct LDKOutPoint OutPoint_new(struct LDKThirtyTwoBytes txid_arg, uint16_t index_arg);
11738         export function OutPoint_new(txid_arg: Uint8Array, index_arg: number): number {
11739                 if(!isWasmInitialized) {
11740                         throw new Error("initializeWasm() must be awaited first!");
11741                 }
11742                 const nativeResponseValue = wasm.OutPoint_new(encodeArray(txid_arg), index_arg);
11743                 return nativeResponseValue;
11744         }
11745         // uint64_t OutPoint_clone_ptr(LDKOutPoint *NONNULL_PTR arg);
11746         export function OutPoint_clone_ptr(arg: number): number {
11747                 if(!isWasmInitialized) {
11748                         throw new Error("initializeWasm() must be awaited first!");
11749                 }
11750                 const nativeResponseValue = wasm.OutPoint_clone_ptr(arg);
11751                 return nativeResponseValue;
11752         }
11753         // struct LDKOutPoint OutPoint_clone(const struct LDKOutPoint *NONNULL_PTR orig);
11754         export function OutPoint_clone(orig: number): number {
11755                 if(!isWasmInitialized) {
11756                         throw new Error("initializeWasm() must be awaited first!");
11757                 }
11758                 const nativeResponseValue = wasm.OutPoint_clone(orig);
11759                 return nativeResponseValue;
11760         }
11761         // bool OutPoint_eq(const struct LDKOutPoint *NONNULL_PTR a, const struct LDKOutPoint *NONNULL_PTR b);
11762         export function OutPoint_eq(a: number, b: number): boolean {
11763                 if(!isWasmInitialized) {
11764                         throw new Error("initializeWasm() must be awaited first!");
11765                 }
11766                 const nativeResponseValue = wasm.OutPoint_eq(a, b);
11767                 return nativeResponseValue;
11768         }
11769         // uint64_t OutPoint_hash(const struct LDKOutPoint *NONNULL_PTR o);
11770         export function OutPoint_hash(o: number): number {
11771                 if(!isWasmInitialized) {
11772                         throw new Error("initializeWasm() must be awaited first!");
11773                 }
11774                 const nativeResponseValue = wasm.OutPoint_hash(o);
11775                 return nativeResponseValue;
11776         }
11777         // MUST_USE_RES struct LDKThirtyTwoBytes OutPoint_to_channel_id(const struct LDKOutPoint *NONNULL_PTR this_arg);
11778         export function OutPoint_to_channel_id(this_arg: number): Uint8Array {
11779                 if(!isWasmInitialized) {
11780                         throw new Error("initializeWasm() must be awaited first!");
11781                 }
11782                 const nativeResponseValue = wasm.OutPoint_to_channel_id(this_arg);
11783                 return decodeArray(nativeResponseValue);
11784         }
11785         // struct LDKCVec_u8Z OutPoint_write(const struct LDKOutPoint *NONNULL_PTR obj);
11786         export function OutPoint_write(obj: number): Uint8Array {
11787                 if(!isWasmInitialized) {
11788                         throw new Error("initializeWasm() must be awaited first!");
11789                 }
11790                 const nativeResponseValue = wasm.OutPoint_write(obj);
11791                 return decodeArray(nativeResponseValue);
11792         }
11793         // struct LDKCResult_OutPointDecodeErrorZ OutPoint_read(struct LDKu8slice ser);
11794         export function OutPoint_read(ser: Uint8Array): number {
11795                 if(!isWasmInitialized) {
11796                         throw new Error("initializeWasm() must be awaited first!");
11797                 }
11798                 const nativeResponseValue = wasm.OutPoint_read(encodeArray(ser));
11799                 return nativeResponseValue;
11800         }
11801         // void DelayedPaymentOutputDescriptor_free(struct LDKDelayedPaymentOutputDescriptor this_obj);
11802         export function DelayedPaymentOutputDescriptor_free(this_obj: number): void {
11803                 if(!isWasmInitialized) {
11804                         throw new Error("initializeWasm() must be awaited first!");
11805                 }
11806                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_free(this_obj);
11807                 // debug statements here
11808         }
11809         // struct LDKOutPoint DelayedPaymentOutputDescriptor_get_outpoint(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
11810         export function DelayedPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
11811                 if(!isWasmInitialized) {
11812                         throw new Error("initializeWasm() must be awaited first!");
11813                 }
11814                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_outpoint(this_ptr);
11815                 return nativeResponseValue;
11816         }
11817         // void DelayedPaymentOutputDescriptor_set_outpoint(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
11818         export function DelayedPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
11819                 if(!isWasmInitialized) {
11820                         throw new Error("initializeWasm() must be awaited first!");
11821                 }
11822                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_outpoint(this_ptr, val);
11823                 // debug statements here
11824         }
11825         // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_per_commitment_point(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
11826         export function DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr: number): Uint8Array {
11827                 if(!isWasmInitialized) {
11828                         throw new Error("initializeWasm() must be awaited first!");
11829                 }
11830                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr);
11831                 return decodeArray(nativeResponseValue);
11832         }
11833         // void DelayedPaymentOutputDescriptor_set_per_commitment_point(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11834         export function DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
11835                 if(!isWasmInitialized) {
11836                         throw new Error("initializeWasm() must be awaited first!");
11837                 }
11838                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr, encodeArray(val));
11839                 // debug statements here
11840         }
11841         // uint16_t DelayedPaymentOutputDescriptor_get_to_self_delay(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
11842         export function DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr: number): number {
11843                 if(!isWasmInitialized) {
11844                         throw new Error("initializeWasm() must be awaited first!");
11845                 }
11846                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr);
11847                 return nativeResponseValue;
11848         }
11849         // void DelayedPaymentOutputDescriptor_set_to_self_delay(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint16_t val);
11850         export function DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr: number, val: number): void {
11851                 if(!isWasmInitialized) {
11852                         throw new Error("initializeWasm() must be awaited first!");
11853                 }
11854                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr, val);
11855                 // debug statements here
11856         }
11857         // void DelayedPaymentOutputDescriptor_set_output(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
11858         export function DelayedPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
11859                 if(!isWasmInitialized) {
11860                         throw new Error("initializeWasm() must be awaited first!");
11861                 }
11862                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_output(this_ptr, val);
11863                 // debug statements here
11864         }
11865         // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_revocation_pubkey(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
11866         export function DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr: number): Uint8Array {
11867                 if(!isWasmInitialized) {
11868                         throw new Error("initializeWasm() must be awaited first!");
11869                 }
11870                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr);
11871                 return decodeArray(nativeResponseValue);
11872         }
11873         // void DelayedPaymentOutputDescriptor_set_revocation_pubkey(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11874         export function DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr: number, val: Uint8Array): void {
11875                 if(!isWasmInitialized) {
11876                         throw new Error("initializeWasm() must be awaited first!");
11877                 }
11878                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr, encodeArray(val));
11879                 // debug statements here
11880         }
11881         // const uint8_t (*DelayedPaymentOutputDescriptor_get_channel_keys_id(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
11882         export function DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): Uint8Array {
11883                 if(!isWasmInitialized) {
11884                         throw new Error("initializeWasm() must be awaited first!");
11885                 }
11886                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
11887                 return decodeArray(nativeResponseValue);
11888         }
11889         // void DelayedPaymentOutputDescriptor_set_channel_keys_id(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11890         export function DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: Uint8Array): void {
11891                 if(!isWasmInitialized) {
11892                         throw new Error("initializeWasm() must be awaited first!");
11893                 }
11894                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr, encodeArray(val));
11895                 // debug statements here
11896         }
11897         // uint64_t DelayedPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
11898         export function DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): number {
11899                 if(!isWasmInitialized) {
11900                         throw new Error("initializeWasm() must be awaited first!");
11901                 }
11902                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
11903                 return nativeResponseValue;
11904         }
11905         // void DelayedPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
11906         export function DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: number): void {
11907                 if(!isWasmInitialized) {
11908                         throw new Error("initializeWasm() must be awaited first!");
11909                 }
11910                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
11911                 // debug statements here
11912         }
11913         // MUST_USE_RES struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_new(struct LDKOutPoint outpoint_arg, struct LDKPublicKey per_commitment_point_arg, uint16_t to_self_delay_arg, struct LDKTxOut output_arg, struct LDKPublicKey revocation_pubkey_arg, struct LDKThirtyTwoBytes channel_keys_id_arg, uint64_t channel_value_satoshis_arg);
11914         export function DelayedPaymentOutputDescriptor_new(outpoint_arg: number, per_commitment_point_arg: Uint8Array, to_self_delay_arg: number, output_arg: number, revocation_pubkey_arg: Uint8Array, channel_keys_id_arg: Uint8Array, channel_value_satoshis_arg: number): number {
11915                 if(!isWasmInitialized) {
11916                         throw new Error("initializeWasm() must be awaited first!");
11917                 }
11918                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_new(outpoint_arg, encodeArray(per_commitment_point_arg), to_self_delay_arg, output_arg, encodeArray(revocation_pubkey_arg), encodeArray(channel_keys_id_arg), channel_value_satoshis_arg);
11919                 return nativeResponseValue;
11920         }
11921         // uint64_t DelayedPaymentOutputDescriptor_clone_ptr(LDKDelayedPaymentOutputDescriptor *NONNULL_PTR arg);
11922         export function DelayedPaymentOutputDescriptor_clone_ptr(arg: number): number {
11923                 if(!isWasmInitialized) {
11924                         throw new Error("initializeWasm() must be awaited first!");
11925                 }
11926                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_clone_ptr(arg);
11927                 return nativeResponseValue;
11928         }
11929         // struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_clone(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR orig);
11930         export function DelayedPaymentOutputDescriptor_clone(orig: number): number {
11931                 if(!isWasmInitialized) {
11932                         throw new Error("initializeWasm() must be awaited first!");
11933                 }
11934                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_clone(orig);
11935                 return nativeResponseValue;
11936         }
11937         // struct LDKCVec_u8Z DelayedPaymentOutputDescriptor_write(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR obj);
11938         export function DelayedPaymentOutputDescriptor_write(obj: number): Uint8Array {
11939                 if(!isWasmInitialized) {
11940                         throw new Error("initializeWasm() must be awaited first!");
11941                 }
11942                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_write(obj);
11943                 return decodeArray(nativeResponseValue);
11944         }
11945         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ DelayedPaymentOutputDescriptor_read(struct LDKu8slice ser);
11946         export function DelayedPaymentOutputDescriptor_read(ser: Uint8Array): number {
11947                 if(!isWasmInitialized) {
11948                         throw new Error("initializeWasm() must be awaited first!");
11949                 }
11950                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_read(encodeArray(ser));
11951                 return nativeResponseValue;
11952         }
11953         // void StaticPaymentOutputDescriptor_free(struct LDKStaticPaymentOutputDescriptor this_obj);
11954         export function StaticPaymentOutputDescriptor_free(this_obj: number): void {
11955                 if(!isWasmInitialized) {
11956                         throw new Error("initializeWasm() must be awaited first!");
11957                 }
11958                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_free(this_obj);
11959                 // debug statements here
11960         }
11961         // struct LDKOutPoint StaticPaymentOutputDescriptor_get_outpoint(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
11962         export function StaticPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
11963                 if(!isWasmInitialized) {
11964                         throw new Error("initializeWasm() must be awaited first!");
11965                 }
11966                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_outpoint(this_ptr);
11967                 return nativeResponseValue;
11968         }
11969         // void StaticPaymentOutputDescriptor_set_outpoint(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
11970         export function StaticPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
11971                 if(!isWasmInitialized) {
11972                         throw new Error("initializeWasm() must be awaited first!");
11973                 }
11974                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_outpoint(this_ptr, val);
11975                 // debug statements here
11976         }
11977         // void StaticPaymentOutputDescriptor_set_output(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
11978         export function StaticPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
11979                 if(!isWasmInitialized) {
11980                         throw new Error("initializeWasm() must be awaited first!");
11981                 }
11982                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_output(this_ptr, val);
11983                 // debug statements here
11984         }
11985         // const uint8_t (*StaticPaymentOutputDescriptor_get_channel_keys_id(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
11986         export function StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): Uint8Array {
11987                 if(!isWasmInitialized) {
11988                         throw new Error("initializeWasm() must be awaited first!");
11989                 }
11990                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
11991                 return decodeArray(nativeResponseValue);
11992         }
11993         // void StaticPaymentOutputDescriptor_set_channel_keys_id(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11994         export function StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: Uint8Array): void {
11995                 if(!isWasmInitialized) {
11996                         throw new Error("initializeWasm() must be awaited first!");
11997                 }
11998                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr, encodeArray(val));
11999                 // debug statements here
12000         }
12001         // uint64_t StaticPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
12002         export function StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): number {
12003                 if(!isWasmInitialized) {
12004                         throw new Error("initializeWasm() must be awaited first!");
12005                 }
12006                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
12007                 return nativeResponseValue;
12008         }
12009         // void StaticPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
12010         export function StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: number): void {
12011                 if(!isWasmInitialized) {
12012                         throw new Error("initializeWasm() must be awaited first!");
12013                 }
12014                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
12015                 // debug statements here
12016         }
12017         // MUST_USE_RES struct LDKStaticPaymentOutputDescriptor StaticPaymentOutputDescriptor_new(struct LDKOutPoint outpoint_arg, struct LDKTxOut output_arg, struct LDKThirtyTwoBytes channel_keys_id_arg, uint64_t channel_value_satoshis_arg);
12018         export function StaticPaymentOutputDescriptor_new(outpoint_arg: number, output_arg: number, channel_keys_id_arg: Uint8Array, channel_value_satoshis_arg: number): number {
12019                 if(!isWasmInitialized) {
12020                         throw new Error("initializeWasm() must be awaited first!");
12021                 }
12022                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_new(outpoint_arg, output_arg, encodeArray(channel_keys_id_arg), channel_value_satoshis_arg);
12023                 return nativeResponseValue;
12024         }
12025         // uint64_t StaticPaymentOutputDescriptor_clone_ptr(LDKStaticPaymentOutputDescriptor *NONNULL_PTR arg);
12026         export function StaticPaymentOutputDescriptor_clone_ptr(arg: number): number {
12027                 if(!isWasmInitialized) {
12028                         throw new Error("initializeWasm() must be awaited first!");
12029                 }
12030                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_clone_ptr(arg);
12031                 return nativeResponseValue;
12032         }
12033         // struct LDKStaticPaymentOutputDescriptor StaticPaymentOutputDescriptor_clone(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR orig);
12034         export function StaticPaymentOutputDescriptor_clone(orig: number): number {
12035                 if(!isWasmInitialized) {
12036                         throw new Error("initializeWasm() must be awaited first!");
12037                 }
12038                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_clone(orig);
12039                 return nativeResponseValue;
12040         }
12041         // struct LDKCVec_u8Z StaticPaymentOutputDescriptor_write(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR obj);
12042         export function StaticPaymentOutputDescriptor_write(obj: number): Uint8Array {
12043                 if(!isWasmInitialized) {
12044                         throw new Error("initializeWasm() must be awaited first!");
12045                 }
12046                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_write(obj);
12047                 return decodeArray(nativeResponseValue);
12048         }
12049         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ StaticPaymentOutputDescriptor_read(struct LDKu8slice ser);
12050         export function StaticPaymentOutputDescriptor_read(ser: Uint8Array): number {
12051                 if(!isWasmInitialized) {
12052                         throw new Error("initializeWasm() must be awaited first!");
12053                 }
12054                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_read(encodeArray(ser));
12055                 return nativeResponseValue;
12056         }
12057         // void SpendableOutputDescriptor_free(struct LDKSpendableOutputDescriptor this_ptr);
12058         export function SpendableOutputDescriptor_free(this_ptr: number): void {
12059                 if(!isWasmInitialized) {
12060                         throw new Error("initializeWasm() must be awaited first!");
12061                 }
12062                 const nativeResponseValue = wasm.SpendableOutputDescriptor_free(this_ptr);
12063                 // debug statements here
12064         }
12065         // uint64_t SpendableOutputDescriptor_clone_ptr(LDKSpendableOutputDescriptor *NONNULL_PTR arg);
12066         export function SpendableOutputDescriptor_clone_ptr(arg: number): number {
12067                 if(!isWasmInitialized) {
12068                         throw new Error("initializeWasm() must be awaited first!");
12069                 }
12070                 const nativeResponseValue = wasm.SpendableOutputDescriptor_clone_ptr(arg);
12071                 return nativeResponseValue;
12072         }
12073         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_clone(const struct LDKSpendableOutputDescriptor *NONNULL_PTR orig);
12074         export function SpendableOutputDescriptor_clone(orig: number): number {
12075                 if(!isWasmInitialized) {
12076                         throw new Error("initializeWasm() must be awaited first!");
12077                 }
12078                 const nativeResponseValue = wasm.SpendableOutputDescriptor_clone(orig);
12079                 return nativeResponseValue;
12080         }
12081         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_static_output(struct LDKOutPoint outpoint, struct LDKTxOut output);
12082         export function SpendableOutputDescriptor_static_output(outpoint: number, output: number): number {
12083                 if(!isWasmInitialized) {
12084                         throw new Error("initializeWasm() must be awaited first!");
12085                 }
12086                 const nativeResponseValue = wasm.SpendableOutputDescriptor_static_output(outpoint, output);
12087                 return nativeResponseValue;
12088         }
12089         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_delayed_payment_output(struct LDKDelayedPaymentOutputDescriptor a);
12090         export function SpendableOutputDescriptor_delayed_payment_output(a: number): number {
12091                 if(!isWasmInitialized) {
12092                         throw new Error("initializeWasm() must be awaited first!");
12093                 }
12094                 const nativeResponseValue = wasm.SpendableOutputDescriptor_delayed_payment_output(a);
12095                 return nativeResponseValue;
12096         }
12097         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_static_payment_output(struct LDKStaticPaymentOutputDescriptor a);
12098         export function SpendableOutputDescriptor_static_payment_output(a: number): number {
12099                 if(!isWasmInitialized) {
12100                         throw new Error("initializeWasm() must be awaited first!");
12101                 }
12102                 const nativeResponseValue = wasm.SpendableOutputDescriptor_static_payment_output(a);
12103                 return nativeResponseValue;
12104         }
12105         // struct LDKCVec_u8Z SpendableOutputDescriptor_write(const struct LDKSpendableOutputDescriptor *NONNULL_PTR obj);
12106         export function SpendableOutputDescriptor_write(obj: number): Uint8Array {
12107                 if(!isWasmInitialized) {
12108                         throw new Error("initializeWasm() must be awaited first!");
12109                 }
12110                 const nativeResponseValue = wasm.SpendableOutputDescriptor_write(obj);
12111                 return decodeArray(nativeResponseValue);
12112         }
12113         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ SpendableOutputDescriptor_read(struct LDKu8slice ser);
12114         export function SpendableOutputDescriptor_read(ser: Uint8Array): number {
12115                 if(!isWasmInitialized) {
12116                         throw new Error("initializeWasm() must be awaited first!");
12117                 }
12118                 const nativeResponseValue = wasm.SpendableOutputDescriptor_read(encodeArray(ser));
12119                 return nativeResponseValue;
12120         }
12121         // void BaseSign_free(struct LDKBaseSign this_ptr);
12122         export function BaseSign_free(this_ptr: number): void {
12123                 if(!isWasmInitialized) {
12124                         throw new Error("initializeWasm() must be awaited first!");
12125                 }
12126                 const nativeResponseValue = wasm.BaseSign_free(this_ptr);
12127                 // debug statements here
12128         }
12129         // uint64_t Sign_clone_ptr(LDKSign *NONNULL_PTR arg);
12130         export function Sign_clone_ptr(arg: number): number {
12131                 if(!isWasmInitialized) {
12132                         throw new Error("initializeWasm() must be awaited first!");
12133                 }
12134                 const nativeResponseValue = wasm.Sign_clone_ptr(arg);
12135                 return nativeResponseValue;
12136         }
12137         // struct LDKSign Sign_clone(const struct LDKSign *NONNULL_PTR orig);
12138         export function Sign_clone(orig: number): number {
12139                 if(!isWasmInitialized) {
12140                         throw new Error("initializeWasm() must be awaited first!");
12141                 }
12142                 const nativeResponseValue = wasm.Sign_clone(orig);
12143                 return nativeResponseValue;
12144         }
12145         // void Sign_free(struct LDKSign this_ptr);
12146         export function Sign_free(this_ptr: number): void {
12147                 if(!isWasmInitialized) {
12148                         throw new Error("initializeWasm() must be awaited first!");
12149                 }
12150                 const nativeResponseValue = wasm.Sign_free(this_ptr);
12151                 // debug statements here
12152         }
12153         // void KeysInterface_free(struct LDKKeysInterface this_ptr);
12154         export function KeysInterface_free(this_ptr: number): void {
12155                 if(!isWasmInitialized) {
12156                         throw new Error("initializeWasm() must be awaited first!");
12157                 }
12158                 const nativeResponseValue = wasm.KeysInterface_free(this_ptr);
12159                 // debug statements here
12160         }
12161         // void InMemorySigner_free(struct LDKInMemorySigner this_obj);
12162         export function InMemorySigner_free(this_obj: number): void {
12163                 if(!isWasmInitialized) {
12164                         throw new Error("initializeWasm() must be awaited first!");
12165                 }
12166                 const nativeResponseValue = wasm.InMemorySigner_free(this_obj);
12167                 // debug statements here
12168         }
12169         // const uint8_t (*InMemorySigner_get_funding_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
12170         export function InMemorySigner_get_funding_key(this_ptr: number): Uint8Array {
12171                 if(!isWasmInitialized) {
12172                         throw new Error("initializeWasm() must be awaited first!");
12173                 }
12174                 const nativeResponseValue = wasm.InMemorySigner_get_funding_key(this_ptr);
12175                 return decodeArray(nativeResponseValue);
12176         }
12177         // void InMemorySigner_set_funding_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
12178         export function InMemorySigner_set_funding_key(this_ptr: number, val: Uint8Array): void {
12179                 if(!isWasmInitialized) {
12180                         throw new Error("initializeWasm() must be awaited first!");
12181                 }
12182                 const nativeResponseValue = wasm.InMemorySigner_set_funding_key(this_ptr, encodeArray(val));
12183                 // debug statements here
12184         }
12185         // const uint8_t (*InMemorySigner_get_revocation_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
12186         export function InMemorySigner_get_revocation_base_key(this_ptr: number): Uint8Array {
12187                 if(!isWasmInitialized) {
12188                         throw new Error("initializeWasm() must be awaited first!");
12189                 }
12190                 const nativeResponseValue = wasm.InMemorySigner_get_revocation_base_key(this_ptr);
12191                 return decodeArray(nativeResponseValue);
12192         }
12193         // void InMemorySigner_set_revocation_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
12194         export function InMemorySigner_set_revocation_base_key(this_ptr: number, val: Uint8Array): void {
12195                 if(!isWasmInitialized) {
12196                         throw new Error("initializeWasm() must be awaited first!");
12197                 }
12198                 const nativeResponseValue = wasm.InMemorySigner_set_revocation_base_key(this_ptr, encodeArray(val));
12199                 // debug statements here
12200         }
12201         // const uint8_t (*InMemorySigner_get_payment_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
12202         export function InMemorySigner_get_payment_key(this_ptr: number): Uint8Array {
12203                 if(!isWasmInitialized) {
12204                         throw new Error("initializeWasm() must be awaited first!");
12205                 }
12206                 const nativeResponseValue = wasm.InMemorySigner_get_payment_key(this_ptr);
12207                 return decodeArray(nativeResponseValue);
12208         }
12209         // void InMemorySigner_set_payment_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
12210         export function InMemorySigner_set_payment_key(this_ptr: number, val: Uint8Array): void {
12211                 if(!isWasmInitialized) {
12212                         throw new Error("initializeWasm() must be awaited first!");
12213                 }
12214                 const nativeResponseValue = wasm.InMemorySigner_set_payment_key(this_ptr, encodeArray(val));
12215                 // debug statements here
12216         }
12217         // const uint8_t (*InMemorySigner_get_delayed_payment_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
12218         export function InMemorySigner_get_delayed_payment_base_key(this_ptr: number): Uint8Array {
12219                 if(!isWasmInitialized) {
12220                         throw new Error("initializeWasm() must be awaited first!");
12221                 }
12222                 const nativeResponseValue = wasm.InMemorySigner_get_delayed_payment_base_key(this_ptr);
12223                 return decodeArray(nativeResponseValue);
12224         }
12225         // void InMemorySigner_set_delayed_payment_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
12226         export function InMemorySigner_set_delayed_payment_base_key(this_ptr: number, val: Uint8Array): void {
12227                 if(!isWasmInitialized) {
12228                         throw new Error("initializeWasm() must be awaited first!");
12229                 }
12230                 const nativeResponseValue = wasm.InMemorySigner_set_delayed_payment_base_key(this_ptr, encodeArray(val));
12231                 // debug statements here
12232         }
12233         // const uint8_t (*InMemorySigner_get_htlc_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
12234         export function InMemorySigner_get_htlc_base_key(this_ptr: number): Uint8Array {
12235                 if(!isWasmInitialized) {
12236                         throw new Error("initializeWasm() must be awaited first!");
12237                 }
12238                 const nativeResponseValue = wasm.InMemorySigner_get_htlc_base_key(this_ptr);
12239                 return decodeArray(nativeResponseValue);
12240         }
12241         // void InMemorySigner_set_htlc_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
12242         export function InMemorySigner_set_htlc_base_key(this_ptr: number, val: Uint8Array): void {
12243                 if(!isWasmInitialized) {
12244                         throw new Error("initializeWasm() must be awaited first!");
12245                 }
12246                 const nativeResponseValue = wasm.InMemorySigner_set_htlc_base_key(this_ptr, encodeArray(val));
12247                 // debug statements here
12248         }
12249         // const uint8_t (*InMemorySigner_get_commitment_seed(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
12250         export function InMemorySigner_get_commitment_seed(this_ptr: number): Uint8Array {
12251                 if(!isWasmInitialized) {
12252                         throw new Error("initializeWasm() must be awaited first!");
12253                 }
12254                 const nativeResponseValue = wasm.InMemorySigner_get_commitment_seed(this_ptr);
12255                 return decodeArray(nativeResponseValue);
12256         }
12257         // void InMemorySigner_set_commitment_seed(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12258         export function InMemorySigner_set_commitment_seed(this_ptr: number, val: Uint8Array): void {
12259                 if(!isWasmInitialized) {
12260                         throw new Error("initializeWasm() must be awaited first!");
12261                 }
12262                 const nativeResponseValue = wasm.InMemorySigner_set_commitment_seed(this_ptr, encodeArray(val));
12263                 // debug statements here
12264         }
12265         // uint64_t InMemorySigner_clone_ptr(LDKInMemorySigner *NONNULL_PTR arg);
12266         export function InMemorySigner_clone_ptr(arg: number): number {
12267                 if(!isWasmInitialized) {
12268                         throw new Error("initializeWasm() must be awaited first!");
12269                 }
12270                 const nativeResponseValue = wasm.InMemorySigner_clone_ptr(arg);
12271                 return nativeResponseValue;
12272         }
12273         // struct LDKInMemorySigner InMemorySigner_clone(const struct LDKInMemorySigner *NONNULL_PTR orig);
12274         export function InMemorySigner_clone(orig: number): number {
12275                 if(!isWasmInitialized) {
12276                         throw new Error("initializeWasm() must be awaited first!");
12277                 }
12278                 const nativeResponseValue = wasm.InMemorySigner_clone(orig);
12279                 return nativeResponseValue;
12280         }
12281         // MUST_USE_RES struct LDKInMemorySigner InMemorySigner_new(struct LDKSecretKey funding_key, struct LDKSecretKey revocation_base_key, struct LDKSecretKey payment_key, struct LDKSecretKey delayed_payment_base_key, struct LDKSecretKey htlc_base_key, struct LDKThirtyTwoBytes commitment_seed, uint64_t channel_value_satoshis, struct LDKThirtyTwoBytes channel_keys_id);
12282         export function InMemorySigner_new(funding_key: Uint8Array, revocation_base_key: Uint8Array, payment_key: Uint8Array, delayed_payment_base_key: Uint8Array, htlc_base_key: Uint8Array, commitment_seed: Uint8Array, channel_value_satoshis: number, channel_keys_id: Uint8Array): number {
12283                 if(!isWasmInitialized) {
12284                         throw new Error("initializeWasm() must be awaited first!");
12285                 }
12286                 const nativeResponseValue = wasm.InMemorySigner_new(encodeArray(funding_key), encodeArray(revocation_base_key), encodeArray(payment_key), encodeArray(delayed_payment_base_key), encodeArray(htlc_base_key), encodeArray(commitment_seed), channel_value_satoshis, encodeArray(channel_keys_id));
12287                 return nativeResponseValue;
12288         }
12289         // MUST_USE_RES struct LDKChannelPublicKeys InMemorySigner_counterparty_pubkeys(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
12290         export function InMemorySigner_counterparty_pubkeys(this_arg: number): number {
12291                 if(!isWasmInitialized) {
12292                         throw new Error("initializeWasm() must be awaited first!");
12293                 }
12294                 const nativeResponseValue = wasm.InMemorySigner_counterparty_pubkeys(this_arg);
12295                 return nativeResponseValue;
12296         }
12297         // MUST_USE_RES uint16_t InMemorySigner_counterparty_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
12298         export function InMemorySigner_counterparty_selected_contest_delay(this_arg: number): number {
12299                 if(!isWasmInitialized) {
12300                         throw new Error("initializeWasm() must be awaited first!");
12301                 }
12302                 const nativeResponseValue = wasm.InMemorySigner_counterparty_selected_contest_delay(this_arg);
12303                 return nativeResponseValue;
12304         }
12305         // MUST_USE_RES uint16_t InMemorySigner_holder_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
12306         export function InMemorySigner_holder_selected_contest_delay(this_arg: number): number {
12307                 if(!isWasmInitialized) {
12308                         throw new Error("initializeWasm() must be awaited first!");
12309                 }
12310                 const nativeResponseValue = wasm.InMemorySigner_holder_selected_contest_delay(this_arg);
12311                 return nativeResponseValue;
12312         }
12313         // MUST_USE_RES bool InMemorySigner_is_outbound(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
12314         export function InMemorySigner_is_outbound(this_arg: number): boolean {
12315                 if(!isWasmInitialized) {
12316                         throw new Error("initializeWasm() must be awaited first!");
12317                 }
12318                 const nativeResponseValue = wasm.InMemorySigner_is_outbound(this_arg);
12319                 return nativeResponseValue;
12320         }
12321         // MUST_USE_RES struct LDKOutPoint InMemorySigner_funding_outpoint(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
12322         export function InMemorySigner_funding_outpoint(this_arg: number): number {
12323                 if(!isWasmInitialized) {
12324                         throw new Error("initializeWasm() must be awaited first!");
12325                 }
12326                 const nativeResponseValue = wasm.InMemorySigner_funding_outpoint(this_arg);
12327                 return nativeResponseValue;
12328         }
12329         // MUST_USE_RES struct LDKChannelTransactionParameters InMemorySigner_get_channel_parameters(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
12330         export function InMemorySigner_get_channel_parameters(this_arg: number): number {
12331                 if(!isWasmInitialized) {
12332                         throw new Error("initializeWasm() must be awaited first!");
12333                 }
12334                 const nativeResponseValue = wasm.InMemorySigner_get_channel_parameters(this_arg);
12335                 return nativeResponseValue;
12336         }
12337         // MUST_USE_RES bool InMemorySigner_opt_anchors(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
12338         export function InMemorySigner_opt_anchors(this_arg: number): boolean {
12339                 if(!isWasmInitialized) {
12340                         throw new Error("initializeWasm() must be awaited first!");
12341                 }
12342                 const nativeResponseValue = wasm.InMemorySigner_opt_anchors(this_arg);
12343                 return nativeResponseValue;
12344         }
12345         // MUST_USE_RES struct LDKCResult_CVec_CVec_u8ZZNoneZ InMemorySigner_sign_counterparty_payment_input(const struct LDKInMemorySigner *NONNULL_PTR this_arg, struct LDKTransaction spend_tx, uintptr_t input_idx, const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR descriptor);
12346         export function InMemorySigner_sign_counterparty_payment_input(this_arg: number, spend_tx: Uint8Array, input_idx: number, descriptor: number): number {
12347                 if(!isWasmInitialized) {
12348                         throw new Error("initializeWasm() must be awaited first!");
12349                 }
12350                 const nativeResponseValue = wasm.InMemorySigner_sign_counterparty_payment_input(this_arg, encodeArray(spend_tx), input_idx, descriptor);
12351                 return nativeResponseValue;
12352         }
12353         // MUST_USE_RES struct LDKCResult_CVec_CVec_u8ZZNoneZ InMemorySigner_sign_dynamic_p2wsh_input(const struct LDKInMemorySigner *NONNULL_PTR this_arg, struct LDKTransaction spend_tx, uintptr_t input_idx, const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR descriptor);
12354         export function InMemorySigner_sign_dynamic_p2wsh_input(this_arg: number, spend_tx: Uint8Array, input_idx: number, descriptor: number): number {
12355                 if(!isWasmInitialized) {
12356                         throw new Error("initializeWasm() must be awaited first!");
12357                 }
12358                 const nativeResponseValue = wasm.InMemorySigner_sign_dynamic_p2wsh_input(this_arg, encodeArray(spend_tx), input_idx, descriptor);
12359                 return nativeResponseValue;
12360         }
12361         // struct LDKBaseSign InMemorySigner_as_BaseSign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
12362         export function InMemorySigner_as_BaseSign(this_arg: number): number {
12363                 if(!isWasmInitialized) {
12364                         throw new Error("initializeWasm() must be awaited first!");
12365                 }
12366                 const nativeResponseValue = wasm.InMemorySigner_as_BaseSign(this_arg);
12367                 return nativeResponseValue;
12368         }
12369         // struct LDKSign InMemorySigner_as_Sign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
12370         export function InMemorySigner_as_Sign(this_arg: number): number {
12371                 if(!isWasmInitialized) {
12372                         throw new Error("initializeWasm() must be awaited first!");
12373                 }
12374                 const nativeResponseValue = wasm.InMemorySigner_as_Sign(this_arg);
12375                 return nativeResponseValue;
12376         }
12377         // struct LDKCVec_u8Z InMemorySigner_write(const struct LDKInMemorySigner *NONNULL_PTR obj);
12378         export function InMemorySigner_write(obj: number): Uint8Array {
12379                 if(!isWasmInitialized) {
12380                         throw new Error("initializeWasm() must be awaited first!");
12381                 }
12382                 const nativeResponseValue = wasm.InMemorySigner_write(obj);
12383                 return decodeArray(nativeResponseValue);
12384         }
12385         // struct LDKCResult_InMemorySignerDecodeErrorZ InMemorySigner_read(struct LDKu8slice ser);
12386         export function InMemorySigner_read(ser: Uint8Array): number {
12387                 if(!isWasmInitialized) {
12388                         throw new Error("initializeWasm() must be awaited first!");
12389                 }
12390                 const nativeResponseValue = wasm.InMemorySigner_read(encodeArray(ser));
12391                 return nativeResponseValue;
12392         }
12393         // void KeysManager_free(struct LDKKeysManager this_obj);
12394         export function KeysManager_free(this_obj: number): void {
12395                 if(!isWasmInitialized) {
12396                         throw new Error("initializeWasm() must be awaited first!");
12397                 }
12398                 const nativeResponseValue = wasm.KeysManager_free(this_obj);
12399                 // debug statements here
12400         }
12401         // MUST_USE_RES struct LDKKeysManager KeysManager_new(const uint8_t (*seed)[32], uint64_t starting_time_secs, uint32_t starting_time_nanos);
12402         export function KeysManager_new(seed: Uint8Array, starting_time_secs: number, starting_time_nanos: number): number {
12403                 if(!isWasmInitialized) {
12404                         throw new Error("initializeWasm() must be awaited first!");
12405                 }
12406                 const nativeResponseValue = wasm.KeysManager_new(encodeArray(seed), starting_time_secs, starting_time_nanos);
12407                 return nativeResponseValue;
12408         }
12409         // MUST_USE_RES struct LDKInMemorySigner KeysManager_derive_channel_keys(const struct LDKKeysManager *NONNULL_PTR this_arg, uint64_t channel_value_satoshis, const uint8_t (*params)[32]);
12410         export function KeysManager_derive_channel_keys(this_arg: number, channel_value_satoshis: number, params: Uint8Array): number {
12411                 if(!isWasmInitialized) {
12412                         throw new Error("initializeWasm() must be awaited first!");
12413                 }
12414                 const nativeResponseValue = wasm.KeysManager_derive_channel_keys(this_arg, channel_value_satoshis, encodeArray(params));
12415                 return nativeResponseValue;
12416         }
12417         // MUST_USE_RES struct LDKCResult_TransactionNoneZ KeysManager_spend_spendable_outputs(const struct LDKKeysManager *NONNULL_PTR this_arg, struct LDKCVec_SpendableOutputDescriptorZ descriptors, struct LDKCVec_TxOutZ outputs, struct LDKCVec_u8Z change_destination_script, uint32_t feerate_sat_per_1000_weight);
12418         export function KeysManager_spend_spendable_outputs(this_arg: number, descriptors: number[], outputs: number[], change_destination_script: Uint8Array, feerate_sat_per_1000_weight: number): number {
12419                 if(!isWasmInitialized) {
12420                         throw new Error("initializeWasm() must be awaited first!");
12421                 }
12422                 const nativeResponseValue = wasm.KeysManager_spend_spendable_outputs(this_arg, descriptors, outputs, encodeArray(change_destination_script), feerate_sat_per_1000_weight);
12423                 return nativeResponseValue;
12424         }
12425         // struct LDKKeysInterface KeysManager_as_KeysInterface(const struct LDKKeysManager *NONNULL_PTR this_arg);
12426         export function KeysManager_as_KeysInterface(this_arg: number): number {
12427                 if(!isWasmInitialized) {
12428                         throw new Error("initializeWasm() must be awaited first!");
12429                 }
12430                 const nativeResponseValue = wasm.KeysManager_as_KeysInterface(this_arg);
12431                 return nativeResponseValue;
12432         }
12433         // void ChannelManager_free(struct LDKChannelManager this_obj);
12434         export function ChannelManager_free(this_obj: number): void {
12435                 if(!isWasmInitialized) {
12436                         throw new Error("initializeWasm() must be awaited first!");
12437                 }
12438                 const nativeResponseValue = wasm.ChannelManager_free(this_obj);
12439                 // debug statements here
12440         }
12441         // void ChainParameters_free(struct LDKChainParameters this_obj);
12442         export function ChainParameters_free(this_obj: number): void {
12443                 if(!isWasmInitialized) {
12444                         throw new Error("initializeWasm() must be awaited first!");
12445                 }
12446                 const nativeResponseValue = wasm.ChainParameters_free(this_obj);
12447                 // debug statements here
12448         }
12449         // enum LDKNetwork ChainParameters_get_network(const struct LDKChainParameters *NONNULL_PTR this_ptr);
12450         export function ChainParameters_get_network(this_ptr: number): Network {
12451                 if(!isWasmInitialized) {
12452                         throw new Error("initializeWasm() must be awaited first!");
12453                 }
12454                 const nativeResponseValue = wasm.ChainParameters_get_network(this_ptr);
12455                 return nativeResponseValue;
12456         }
12457         // void ChainParameters_set_network(struct LDKChainParameters *NONNULL_PTR this_ptr, enum LDKNetwork val);
12458         export function ChainParameters_set_network(this_ptr: number, val: Network): void {
12459                 if(!isWasmInitialized) {
12460                         throw new Error("initializeWasm() must be awaited first!");
12461                 }
12462                 const nativeResponseValue = wasm.ChainParameters_set_network(this_ptr, val);
12463                 // debug statements here
12464         }
12465         // struct LDKBestBlock ChainParameters_get_best_block(const struct LDKChainParameters *NONNULL_PTR this_ptr);
12466         export function ChainParameters_get_best_block(this_ptr: number): number {
12467                 if(!isWasmInitialized) {
12468                         throw new Error("initializeWasm() must be awaited first!");
12469                 }
12470                 const nativeResponseValue = wasm.ChainParameters_get_best_block(this_ptr);
12471                 return nativeResponseValue;
12472         }
12473         // void ChainParameters_set_best_block(struct LDKChainParameters *NONNULL_PTR this_ptr, struct LDKBestBlock val);
12474         export function ChainParameters_set_best_block(this_ptr: number, val: number): void {
12475                 if(!isWasmInitialized) {
12476                         throw new Error("initializeWasm() must be awaited first!");
12477                 }
12478                 const nativeResponseValue = wasm.ChainParameters_set_best_block(this_ptr, val);
12479                 // debug statements here
12480         }
12481         // MUST_USE_RES struct LDKChainParameters ChainParameters_new(enum LDKNetwork network_arg, struct LDKBestBlock best_block_arg);
12482         export function ChainParameters_new(network_arg: Network, best_block_arg: number): number {
12483                 if(!isWasmInitialized) {
12484                         throw new Error("initializeWasm() must be awaited first!");
12485                 }
12486                 const nativeResponseValue = wasm.ChainParameters_new(network_arg, best_block_arg);
12487                 return nativeResponseValue;
12488         }
12489         // uint64_t ChainParameters_clone_ptr(LDKChainParameters *NONNULL_PTR arg);
12490         export function ChainParameters_clone_ptr(arg: number): number {
12491                 if(!isWasmInitialized) {
12492                         throw new Error("initializeWasm() must be awaited first!");
12493                 }
12494                 const nativeResponseValue = wasm.ChainParameters_clone_ptr(arg);
12495                 return nativeResponseValue;
12496         }
12497         // struct LDKChainParameters ChainParameters_clone(const struct LDKChainParameters *NONNULL_PTR orig);
12498         export function ChainParameters_clone(orig: number): number {
12499                 if(!isWasmInitialized) {
12500                         throw new Error("initializeWasm() must be awaited first!");
12501                 }
12502                 const nativeResponseValue = wasm.ChainParameters_clone(orig);
12503                 return nativeResponseValue;
12504         }
12505         // void CounterpartyForwardingInfo_free(struct LDKCounterpartyForwardingInfo this_obj);
12506         export function CounterpartyForwardingInfo_free(this_obj: number): void {
12507                 if(!isWasmInitialized) {
12508                         throw new Error("initializeWasm() must be awaited first!");
12509                 }
12510                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_free(this_obj);
12511                 // debug statements here
12512         }
12513         // uint32_t CounterpartyForwardingInfo_get_fee_base_msat(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr);
12514         export function CounterpartyForwardingInfo_get_fee_base_msat(this_ptr: number): number {
12515                 if(!isWasmInitialized) {
12516                         throw new Error("initializeWasm() must be awaited first!");
12517                 }
12518                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_get_fee_base_msat(this_ptr);
12519                 return nativeResponseValue;
12520         }
12521         // void CounterpartyForwardingInfo_set_fee_base_msat(struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr, uint32_t val);
12522         export function CounterpartyForwardingInfo_set_fee_base_msat(this_ptr: number, val: number): void {
12523                 if(!isWasmInitialized) {
12524                         throw new Error("initializeWasm() must be awaited first!");
12525                 }
12526                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_set_fee_base_msat(this_ptr, val);
12527                 // debug statements here
12528         }
12529         // uint32_t CounterpartyForwardingInfo_get_fee_proportional_millionths(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr);
12530         export function CounterpartyForwardingInfo_get_fee_proportional_millionths(this_ptr: number): number {
12531                 if(!isWasmInitialized) {
12532                         throw new Error("initializeWasm() must be awaited first!");
12533                 }
12534                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_get_fee_proportional_millionths(this_ptr);
12535                 return nativeResponseValue;
12536         }
12537         // void CounterpartyForwardingInfo_set_fee_proportional_millionths(struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr, uint32_t val);
12538         export function CounterpartyForwardingInfo_set_fee_proportional_millionths(this_ptr: number, val: number): void {
12539                 if(!isWasmInitialized) {
12540                         throw new Error("initializeWasm() must be awaited first!");
12541                 }
12542                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_set_fee_proportional_millionths(this_ptr, val);
12543                 // debug statements here
12544         }
12545         // uint16_t CounterpartyForwardingInfo_get_cltv_expiry_delta(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr);
12546         export function CounterpartyForwardingInfo_get_cltv_expiry_delta(this_ptr: number): number {
12547                 if(!isWasmInitialized) {
12548                         throw new Error("initializeWasm() must be awaited first!");
12549                 }
12550                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_get_cltv_expiry_delta(this_ptr);
12551                 return nativeResponseValue;
12552         }
12553         // void CounterpartyForwardingInfo_set_cltv_expiry_delta(struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr, uint16_t val);
12554         export function CounterpartyForwardingInfo_set_cltv_expiry_delta(this_ptr: number, val: number): void {
12555                 if(!isWasmInitialized) {
12556                         throw new Error("initializeWasm() must be awaited first!");
12557                 }
12558                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_set_cltv_expiry_delta(this_ptr, val);
12559                 // debug statements here
12560         }
12561         // MUST_USE_RES struct LDKCounterpartyForwardingInfo CounterpartyForwardingInfo_new(uint32_t fee_base_msat_arg, uint32_t fee_proportional_millionths_arg, uint16_t cltv_expiry_delta_arg);
12562         export function CounterpartyForwardingInfo_new(fee_base_msat_arg: number, fee_proportional_millionths_arg: number, cltv_expiry_delta_arg: number): number {
12563                 if(!isWasmInitialized) {
12564                         throw new Error("initializeWasm() must be awaited first!");
12565                 }
12566                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_new(fee_base_msat_arg, fee_proportional_millionths_arg, cltv_expiry_delta_arg);
12567                 return nativeResponseValue;
12568         }
12569         // uint64_t CounterpartyForwardingInfo_clone_ptr(LDKCounterpartyForwardingInfo *NONNULL_PTR arg);
12570         export function CounterpartyForwardingInfo_clone_ptr(arg: number): number {
12571                 if(!isWasmInitialized) {
12572                         throw new Error("initializeWasm() must be awaited first!");
12573                 }
12574                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_clone_ptr(arg);
12575                 return nativeResponseValue;
12576         }
12577         // struct LDKCounterpartyForwardingInfo CounterpartyForwardingInfo_clone(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR orig);
12578         export function CounterpartyForwardingInfo_clone(orig: number): number {
12579                 if(!isWasmInitialized) {
12580                         throw new Error("initializeWasm() must be awaited first!");
12581                 }
12582                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_clone(orig);
12583                 return nativeResponseValue;
12584         }
12585         // void ChannelCounterparty_free(struct LDKChannelCounterparty this_obj);
12586         export function ChannelCounterparty_free(this_obj: number): void {
12587                 if(!isWasmInitialized) {
12588                         throw new Error("initializeWasm() must be awaited first!");
12589                 }
12590                 const nativeResponseValue = wasm.ChannelCounterparty_free(this_obj);
12591                 // debug statements here
12592         }
12593         // struct LDKPublicKey ChannelCounterparty_get_node_id(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
12594         export function ChannelCounterparty_get_node_id(this_ptr: number): Uint8Array {
12595                 if(!isWasmInitialized) {
12596                         throw new Error("initializeWasm() must be awaited first!");
12597                 }
12598                 const nativeResponseValue = wasm.ChannelCounterparty_get_node_id(this_ptr);
12599                 return decodeArray(nativeResponseValue);
12600         }
12601         // void ChannelCounterparty_set_node_id(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12602         export function ChannelCounterparty_set_node_id(this_ptr: number, val: Uint8Array): void {
12603                 if(!isWasmInitialized) {
12604                         throw new Error("initializeWasm() must be awaited first!");
12605                 }
12606                 const nativeResponseValue = wasm.ChannelCounterparty_set_node_id(this_ptr, encodeArray(val));
12607                 // debug statements here
12608         }
12609         // struct LDKInitFeatures ChannelCounterparty_get_features(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
12610         export function ChannelCounterparty_get_features(this_ptr: number): number {
12611                 if(!isWasmInitialized) {
12612                         throw new Error("initializeWasm() must be awaited first!");
12613                 }
12614                 const nativeResponseValue = wasm.ChannelCounterparty_get_features(this_ptr);
12615                 return nativeResponseValue;
12616         }
12617         // void ChannelCounterparty_set_features(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
12618         export function ChannelCounterparty_set_features(this_ptr: number, val: number): void {
12619                 if(!isWasmInitialized) {
12620                         throw new Error("initializeWasm() must be awaited first!");
12621                 }
12622                 const nativeResponseValue = wasm.ChannelCounterparty_set_features(this_ptr, val);
12623                 // debug statements here
12624         }
12625         // uint64_t ChannelCounterparty_get_unspendable_punishment_reserve(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
12626         export function ChannelCounterparty_get_unspendable_punishment_reserve(this_ptr: number): number {
12627                 if(!isWasmInitialized) {
12628                         throw new Error("initializeWasm() must be awaited first!");
12629                 }
12630                 const nativeResponseValue = wasm.ChannelCounterparty_get_unspendable_punishment_reserve(this_ptr);
12631                 return nativeResponseValue;
12632         }
12633         // void ChannelCounterparty_set_unspendable_punishment_reserve(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, uint64_t val);
12634         export function ChannelCounterparty_set_unspendable_punishment_reserve(this_ptr: number, val: number): void {
12635                 if(!isWasmInitialized) {
12636                         throw new Error("initializeWasm() must be awaited first!");
12637                 }
12638                 const nativeResponseValue = wasm.ChannelCounterparty_set_unspendable_punishment_reserve(this_ptr, val);
12639                 // debug statements here
12640         }
12641         // struct LDKCounterpartyForwardingInfo ChannelCounterparty_get_forwarding_info(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
12642         export function ChannelCounterparty_get_forwarding_info(this_ptr: number): number {
12643                 if(!isWasmInitialized) {
12644                         throw new Error("initializeWasm() must be awaited first!");
12645                 }
12646                 const nativeResponseValue = wasm.ChannelCounterparty_get_forwarding_info(this_ptr);
12647                 return nativeResponseValue;
12648         }
12649         // void ChannelCounterparty_set_forwarding_info(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKCounterpartyForwardingInfo val);
12650         export function ChannelCounterparty_set_forwarding_info(this_ptr: number, val: number): void {
12651                 if(!isWasmInitialized) {
12652                         throw new Error("initializeWasm() must be awaited first!");
12653                 }
12654                 const nativeResponseValue = wasm.ChannelCounterparty_set_forwarding_info(this_ptr, val);
12655                 // debug statements here
12656         }
12657         // MUST_USE_RES struct LDKChannelCounterparty ChannelCounterparty_new(struct LDKPublicKey node_id_arg, struct LDKInitFeatures features_arg, uint64_t unspendable_punishment_reserve_arg, struct LDKCounterpartyForwardingInfo forwarding_info_arg);
12658         export function ChannelCounterparty_new(node_id_arg: Uint8Array, features_arg: number, unspendable_punishment_reserve_arg: number, forwarding_info_arg: number): number {
12659                 if(!isWasmInitialized) {
12660                         throw new Error("initializeWasm() must be awaited first!");
12661                 }
12662                 const nativeResponseValue = wasm.ChannelCounterparty_new(encodeArray(node_id_arg), features_arg, unspendable_punishment_reserve_arg, forwarding_info_arg);
12663                 return nativeResponseValue;
12664         }
12665         // uint64_t ChannelCounterparty_clone_ptr(LDKChannelCounterparty *NONNULL_PTR arg);
12666         export function ChannelCounterparty_clone_ptr(arg: number): number {
12667                 if(!isWasmInitialized) {
12668                         throw new Error("initializeWasm() must be awaited first!");
12669                 }
12670                 const nativeResponseValue = wasm.ChannelCounterparty_clone_ptr(arg);
12671                 return nativeResponseValue;
12672         }
12673         // struct LDKChannelCounterparty ChannelCounterparty_clone(const struct LDKChannelCounterparty *NONNULL_PTR orig);
12674         export function ChannelCounterparty_clone(orig: number): number {
12675                 if(!isWasmInitialized) {
12676                         throw new Error("initializeWasm() must be awaited first!");
12677                 }
12678                 const nativeResponseValue = wasm.ChannelCounterparty_clone(orig);
12679                 return nativeResponseValue;
12680         }
12681         // void ChannelDetails_free(struct LDKChannelDetails this_obj);
12682         export function ChannelDetails_free(this_obj: number): void {
12683                 if(!isWasmInitialized) {
12684                         throw new Error("initializeWasm() must be awaited first!");
12685                 }
12686                 const nativeResponseValue = wasm.ChannelDetails_free(this_obj);
12687                 // debug statements here
12688         }
12689         // const uint8_t (*ChannelDetails_get_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr))[32];
12690         export function ChannelDetails_get_channel_id(this_ptr: number): Uint8Array {
12691                 if(!isWasmInitialized) {
12692                         throw new Error("initializeWasm() must be awaited first!");
12693                 }
12694                 const nativeResponseValue = wasm.ChannelDetails_get_channel_id(this_ptr);
12695                 return decodeArray(nativeResponseValue);
12696         }
12697         // void ChannelDetails_set_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12698         export function ChannelDetails_set_channel_id(this_ptr: number, val: Uint8Array): void {
12699                 if(!isWasmInitialized) {
12700                         throw new Error("initializeWasm() must be awaited first!");
12701                 }
12702                 const nativeResponseValue = wasm.ChannelDetails_set_channel_id(this_ptr, encodeArray(val));
12703                 // debug statements here
12704         }
12705         // struct LDKChannelCounterparty ChannelDetails_get_counterparty(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
12706         export function ChannelDetails_get_counterparty(this_ptr: number): number {
12707                 if(!isWasmInitialized) {
12708                         throw new Error("initializeWasm() must be awaited first!");
12709                 }
12710                 const nativeResponseValue = wasm.ChannelDetails_get_counterparty(this_ptr);
12711                 return nativeResponseValue;
12712         }
12713         // void ChannelDetails_set_counterparty(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKChannelCounterparty val);
12714         export function ChannelDetails_set_counterparty(this_ptr: number, val: number): void {
12715                 if(!isWasmInitialized) {
12716                         throw new Error("initializeWasm() must be awaited first!");
12717                 }
12718                 const nativeResponseValue = wasm.ChannelDetails_set_counterparty(this_ptr, val);
12719                 // debug statements here
12720         }
12721         // struct LDKOutPoint ChannelDetails_get_funding_txo(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
12722         export function ChannelDetails_get_funding_txo(this_ptr: number): number {
12723                 if(!isWasmInitialized) {
12724                         throw new Error("initializeWasm() must be awaited first!");
12725                 }
12726                 const nativeResponseValue = wasm.ChannelDetails_get_funding_txo(this_ptr);
12727                 return nativeResponseValue;
12728         }
12729         // void ChannelDetails_set_funding_txo(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKOutPoint val);
12730         export function ChannelDetails_set_funding_txo(this_ptr: number, val: number): void {
12731                 if(!isWasmInitialized) {
12732                         throw new Error("initializeWasm() must be awaited first!");
12733                 }
12734                 const nativeResponseValue = wasm.ChannelDetails_set_funding_txo(this_ptr, val);
12735                 // debug statements here
12736         }
12737         // struct LDKCOption_u64Z ChannelDetails_get_short_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
12738         export function ChannelDetails_get_short_channel_id(this_ptr: number): number {
12739                 if(!isWasmInitialized) {
12740                         throw new Error("initializeWasm() must be awaited first!");
12741                 }
12742                 const nativeResponseValue = wasm.ChannelDetails_get_short_channel_id(this_ptr);
12743                 return nativeResponseValue;
12744         }
12745         // void ChannelDetails_set_short_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
12746         export function ChannelDetails_set_short_channel_id(this_ptr: number, val: number): void {
12747                 if(!isWasmInitialized) {
12748                         throw new Error("initializeWasm() must be awaited first!");
12749                 }
12750                 const nativeResponseValue = wasm.ChannelDetails_set_short_channel_id(this_ptr, val);
12751                 // debug statements here
12752         }
12753         // uint64_t ChannelDetails_get_channel_value_satoshis(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
12754         export function ChannelDetails_get_channel_value_satoshis(this_ptr: number): number {
12755                 if(!isWasmInitialized) {
12756                         throw new Error("initializeWasm() must be awaited first!");
12757                 }
12758                 const nativeResponseValue = wasm.ChannelDetails_get_channel_value_satoshis(this_ptr);
12759                 return nativeResponseValue;
12760         }
12761         // void ChannelDetails_set_channel_value_satoshis(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
12762         export function ChannelDetails_set_channel_value_satoshis(this_ptr: number, val: number): void {
12763                 if(!isWasmInitialized) {
12764                         throw new Error("initializeWasm() must be awaited first!");
12765                 }
12766                 const nativeResponseValue = wasm.ChannelDetails_set_channel_value_satoshis(this_ptr, val);
12767                 // debug statements here
12768         }
12769         // struct LDKCOption_u64Z ChannelDetails_get_unspendable_punishment_reserve(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
12770         export function ChannelDetails_get_unspendable_punishment_reserve(this_ptr: number): number {
12771                 if(!isWasmInitialized) {
12772                         throw new Error("initializeWasm() must be awaited first!");
12773                 }
12774                 const nativeResponseValue = wasm.ChannelDetails_get_unspendable_punishment_reserve(this_ptr);
12775                 return nativeResponseValue;
12776         }
12777         // void ChannelDetails_set_unspendable_punishment_reserve(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
12778         export function ChannelDetails_set_unspendable_punishment_reserve(this_ptr: number, val: number): void {
12779                 if(!isWasmInitialized) {
12780                         throw new Error("initializeWasm() must be awaited first!");
12781                 }
12782                 const nativeResponseValue = wasm.ChannelDetails_set_unspendable_punishment_reserve(this_ptr, val);
12783                 // debug statements here
12784         }
12785         // uint64_t ChannelDetails_get_user_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
12786         export function ChannelDetails_get_user_channel_id(this_ptr: number): number {
12787                 if(!isWasmInitialized) {
12788                         throw new Error("initializeWasm() must be awaited first!");
12789                 }
12790                 const nativeResponseValue = wasm.ChannelDetails_get_user_channel_id(this_ptr);
12791                 return nativeResponseValue;
12792         }
12793         // void ChannelDetails_set_user_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
12794         export function ChannelDetails_set_user_channel_id(this_ptr: number, val: number): void {
12795                 if(!isWasmInitialized) {
12796                         throw new Error("initializeWasm() must be awaited first!");
12797                 }
12798                 const nativeResponseValue = wasm.ChannelDetails_set_user_channel_id(this_ptr, val);
12799                 // debug statements here
12800         }
12801         // uint64_t ChannelDetails_get_balance_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
12802         export function ChannelDetails_get_balance_msat(this_ptr: number): number {
12803                 if(!isWasmInitialized) {
12804                         throw new Error("initializeWasm() must be awaited first!");
12805                 }
12806                 const nativeResponseValue = wasm.ChannelDetails_get_balance_msat(this_ptr);
12807                 return nativeResponseValue;
12808         }
12809         // void ChannelDetails_set_balance_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
12810         export function ChannelDetails_set_balance_msat(this_ptr: number, val: number): void {
12811                 if(!isWasmInitialized) {
12812                         throw new Error("initializeWasm() must be awaited first!");
12813                 }
12814                 const nativeResponseValue = wasm.ChannelDetails_set_balance_msat(this_ptr, val);
12815                 // debug statements here
12816         }
12817         // uint64_t ChannelDetails_get_outbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
12818         export function ChannelDetails_get_outbound_capacity_msat(this_ptr: number): number {
12819                 if(!isWasmInitialized) {
12820                         throw new Error("initializeWasm() must be awaited first!");
12821                 }
12822                 const nativeResponseValue = wasm.ChannelDetails_get_outbound_capacity_msat(this_ptr);
12823                 return nativeResponseValue;
12824         }
12825         // void ChannelDetails_set_outbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
12826         export function ChannelDetails_set_outbound_capacity_msat(this_ptr: number, val: number): void {
12827                 if(!isWasmInitialized) {
12828                         throw new Error("initializeWasm() must be awaited first!");
12829                 }
12830                 const nativeResponseValue = wasm.ChannelDetails_set_outbound_capacity_msat(this_ptr, val);
12831                 // debug statements here
12832         }
12833         // uint64_t ChannelDetails_get_inbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
12834         export function ChannelDetails_get_inbound_capacity_msat(this_ptr: number): number {
12835                 if(!isWasmInitialized) {
12836                         throw new Error("initializeWasm() must be awaited first!");
12837                 }
12838                 const nativeResponseValue = wasm.ChannelDetails_get_inbound_capacity_msat(this_ptr);
12839                 return nativeResponseValue;
12840         }
12841         // void ChannelDetails_set_inbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
12842         export function ChannelDetails_set_inbound_capacity_msat(this_ptr: number, val: number): void {
12843                 if(!isWasmInitialized) {
12844                         throw new Error("initializeWasm() must be awaited first!");
12845                 }
12846                 const nativeResponseValue = wasm.ChannelDetails_set_inbound_capacity_msat(this_ptr, val);
12847                 // debug statements here
12848         }
12849         // struct LDKCOption_u32Z ChannelDetails_get_confirmations_required(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
12850         export function ChannelDetails_get_confirmations_required(this_ptr: number): number {
12851                 if(!isWasmInitialized) {
12852                         throw new Error("initializeWasm() must be awaited first!");
12853                 }
12854                 const nativeResponseValue = wasm.ChannelDetails_get_confirmations_required(this_ptr);
12855                 return nativeResponseValue;
12856         }
12857         // void ChannelDetails_set_confirmations_required(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u32Z val);
12858         export function ChannelDetails_set_confirmations_required(this_ptr: number, val: number): void {
12859                 if(!isWasmInitialized) {
12860                         throw new Error("initializeWasm() must be awaited first!");
12861                 }
12862                 const nativeResponseValue = wasm.ChannelDetails_set_confirmations_required(this_ptr, val);
12863                 // debug statements here
12864         }
12865         // struct LDKCOption_u16Z ChannelDetails_get_force_close_spend_delay(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
12866         export function ChannelDetails_get_force_close_spend_delay(this_ptr: number): number {
12867                 if(!isWasmInitialized) {
12868                         throw new Error("initializeWasm() must be awaited first!");
12869                 }
12870                 const nativeResponseValue = wasm.ChannelDetails_get_force_close_spend_delay(this_ptr);
12871                 return nativeResponseValue;
12872         }
12873         // void ChannelDetails_set_force_close_spend_delay(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u16Z val);
12874         export function ChannelDetails_set_force_close_spend_delay(this_ptr: number, val: number): void {
12875                 if(!isWasmInitialized) {
12876                         throw new Error("initializeWasm() must be awaited first!");
12877                 }
12878                 const nativeResponseValue = wasm.ChannelDetails_set_force_close_spend_delay(this_ptr, val);
12879                 // debug statements here
12880         }
12881         // bool ChannelDetails_get_is_outbound(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
12882         export function ChannelDetails_get_is_outbound(this_ptr: number): boolean {
12883                 if(!isWasmInitialized) {
12884                         throw new Error("initializeWasm() must be awaited first!");
12885                 }
12886                 const nativeResponseValue = wasm.ChannelDetails_get_is_outbound(this_ptr);
12887                 return nativeResponseValue;
12888         }
12889         // void ChannelDetails_set_is_outbound(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
12890         export function ChannelDetails_set_is_outbound(this_ptr: number, val: boolean): void {
12891                 if(!isWasmInitialized) {
12892                         throw new Error("initializeWasm() must be awaited first!");
12893                 }
12894                 const nativeResponseValue = wasm.ChannelDetails_set_is_outbound(this_ptr, val);
12895                 // debug statements here
12896         }
12897         // bool ChannelDetails_get_is_funding_locked(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
12898         export function ChannelDetails_get_is_funding_locked(this_ptr: number): boolean {
12899                 if(!isWasmInitialized) {
12900                         throw new Error("initializeWasm() must be awaited first!");
12901                 }
12902                 const nativeResponseValue = wasm.ChannelDetails_get_is_funding_locked(this_ptr);
12903                 return nativeResponseValue;
12904         }
12905         // void ChannelDetails_set_is_funding_locked(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
12906         export function ChannelDetails_set_is_funding_locked(this_ptr: number, val: boolean): void {
12907                 if(!isWasmInitialized) {
12908                         throw new Error("initializeWasm() must be awaited first!");
12909                 }
12910                 const nativeResponseValue = wasm.ChannelDetails_set_is_funding_locked(this_ptr, val);
12911                 // debug statements here
12912         }
12913         // bool ChannelDetails_get_is_usable(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
12914         export function ChannelDetails_get_is_usable(this_ptr: number): boolean {
12915                 if(!isWasmInitialized) {
12916                         throw new Error("initializeWasm() must be awaited first!");
12917                 }
12918                 const nativeResponseValue = wasm.ChannelDetails_get_is_usable(this_ptr);
12919                 return nativeResponseValue;
12920         }
12921         // void ChannelDetails_set_is_usable(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
12922         export function ChannelDetails_set_is_usable(this_ptr: number, val: boolean): void {
12923                 if(!isWasmInitialized) {
12924                         throw new Error("initializeWasm() must be awaited first!");
12925                 }
12926                 const nativeResponseValue = wasm.ChannelDetails_set_is_usable(this_ptr, val);
12927                 // debug statements here
12928         }
12929         // bool ChannelDetails_get_is_public(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
12930         export function ChannelDetails_get_is_public(this_ptr: number): boolean {
12931                 if(!isWasmInitialized) {
12932                         throw new Error("initializeWasm() must be awaited first!");
12933                 }
12934                 const nativeResponseValue = wasm.ChannelDetails_get_is_public(this_ptr);
12935                 return nativeResponseValue;
12936         }
12937         // void ChannelDetails_set_is_public(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
12938         export function ChannelDetails_set_is_public(this_ptr: number, val: boolean): void {
12939                 if(!isWasmInitialized) {
12940                         throw new Error("initializeWasm() must be awaited first!");
12941                 }
12942                 const nativeResponseValue = wasm.ChannelDetails_set_is_public(this_ptr, val);
12943                 // debug statements here
12944         }
12945         // MUST_USE_RES struct LDKChannelDetails ChannelDetails_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKChannelCounterparty counterparty_arg, struct LDKOutPoint funding_txo_arg, struct LDKCOption_u64Z short_channel_id_arg, uint64_t channel_value_satoshis_arg, struct LDKCOption_u64Z unspendable_punishment_reserve_arg, uint64_t user_channel_id_arg, uint64_t balance_msat_arg, uint64_t outbound_capacity_msat_arg, uint64_t inbound_capacity_msat_arg, struct LDKCOption_u32Z confirmations_required_arg, struct LDKCOption_u16Z force_close_spend_delay_arg, bool is_outbound_arg, bool is_funding_locked_arg, bool is_usable_arg, bool is_public_arg);
12946         export function ChannelDetails_new(channel_id_arg: Uint8Array, counterparty_arg: number, funding_txo_arg: number, short_channel_id_arg: number, channel_value_satoshis_arg: number, unspendable_punishment_reserve_arg: number, user_channel_id_arg: number, balance_msat_arg: number, outbound_capacity_msat_arg: number, inbound_capacity_msat_arg: number, confirmations_required_arg: number, force_close_spend_delay_arg: number, is_outbound_arg: boolean, is_funding_locked_arg: boolean, is_usable_arg: boolean, is_public_arg: boolean): number {
12947                 if(!isWasmInitialized) {
12948                         throw new Error("initializeWasm() must be awaited first!");
12949                 }
12950                 const nativeResponseValue = wasm.ChannelDetails_new(encodeArray(channel_id_arg), counterparty_arg, funding_txo_arg, short_channel_id_arg, channel_value_satoshis_arg, unspendable_punishment_reserve_arg, user_channel_id_arg, balance_msat_arg, outbound_capacity_msat_arg, inbound_capacity_msat_arg, confirmations_required_arg, force_close_spend_delay_arg, is_outbound_arg, is_funding_locked_arg, is_usable_arg, is_public_arg);
12951                 return nativeResponseValue;
12952         }
12953         // uint64_t ChannelDetails_clone_ptr(LDKChannelDetails *NONNULL_PTR arg);
12954         export function ChannelDetails_clone_ptr(arg: number): number {
12955                 if(!isWasmInitialized) {
12956                         throw new Error("initializeWasm() must be awaited first!");
12957                 }
12958                 const nativeResponseValue = wasm.ChannelDetails_clone_ptr(arg);
12959                 return nativeResponseValue;
12960         }
12961         // struct LDKChannelDetails ChannelDetails_clone(const struct LDKChannelDetails *NONNULL_PTR orig);
12962         export function ChannelDetails_clone(orig: number): number {
12963                 if(!isWasmInitialized) {
12964                         throw new Error("initializeWasm() must be awaited first!");
12965                 }
12966                 const nativeResponseValue = wasm.ChannelDetails_clone(orig);
12967                 return nativeResponseValue;
12968         }
12969         // void PaymentSendFailure_free(struct LDKPaymentSendFailure this_ptr);
12970         export function PaymentSendFailure_free(this_ptr: number): void {
12971                 if(!isWasmInitialized) {
12972                         throw new Error("initializeWasm() must be awaited first!");
12973                 }
12974                 const nativeResponseValue = wasm.PaymentSendFailure_free(this_ptr);
12975                 // debug statements here
12976         }
12977         // uint64_t PaymentSendFailure_clone_ptr(LDKPaymentSendFailure *NONNULL_PTR arg);
12978         export function PaymentSendFailure_clone_ptr(arg: number): number {
12979                 if(!isWasmInitialized) {
12980                         throw new Error("initializeWasm() must be awaited first!");
12981                 }
12982                 const nativeResponseValue = wasm.PaymentSendFailure_clone_ptr(arg);
12983                 return nativeResponseValue;
12984         }
12985         // struct LDKPaymentSendFailure PaymentSendFailure_clone(const struct LDKPaymentSendFailure *NONNULL_PTR orig);
12986         export function PaymentSendFailure_clone(orig: number): number {
12987                 if(!isWasmInitialized) {
12988                         throw new Error("initializeWasm() must be awaited first!");
12989                 }
12990                 const nativeResponseValue = wasm.PaymentSendFailure_clone(orig);
12991                 return nativeResponseValue;
12992         }
12993         // struct LDKPaymentSendFailure PaymentSendFailure_parameter_error(struct LDKAPIError a);
12994         export function PaymentSendFailure_parameter_error(a: number): number {
12995                 if(!isWasmInitialized) {
12996                         throw new Error("initializeWasm() must be awaited first!");
12997                 }
12998                 const nativeResponseValue = wasm.PaymentSendFailure_parameter_error(a);
12999                 return nativeResponseValue;
13000         }
13001         // struct LDKPaymentSendFailure PaymentSendFailure_path_parameter_error(struct LDKCVec_CResult_NoneAPIErrorZZ a);
13002         export function PaymentSendFailure_path_parameter_error(a: number[]): number {
13003                 if(!isWasmInitialized) {
13004                         throw new Error("initializeWasm() must be awaited first!");
13005                 }
13006                 const nativeResponseValue = wasm.PaymentSendFailure_path_parameter_error(a);
13007                 return nativeResponseValue;
13008         }
13009         // struct LDKPaymentSendFailure PaymentSendFailure_all_failed_retry_safe(struct LDKCVec_APIErrorZ a);
13010         export function PaymentSendFailure_all_failed_retry_safe(a: number[]): number {
13011                 if(!isWasmInitialized) {
13012                         throw new Error("initializeWasm() must be awaited first!");
13013                 }
13014                 const nativeResponseValue = wasm.PaymentSendFailure_all_failed_retry_safe(a);
13015                 return nativeResponseValue;
13016         }
13017         // struct LDKPaymentSendFailure PaymentSendFailure_partial_failure(struct LDKCVec_CResult_NoneAPIErrorZZ results, struct LDKRouteParameters failed_paths_retry, struct LDKThirtyTwoBytes payment_id);
13018         export function PaymentSendFailure_partial_failure(results: number[], failed_paths_retry: number, payment_id: Uint8Array): number {
13019                 if(!isWasmInitialized) {
13020                         throw new Error("initializeWasm() must be awaited first!");
13021                 }
13022                 const nativeResponseValue = wasm.PaymentSendFailure_partial_failure(results, failed_paths_retry, encodeArray(payment_id));
13023                 return nativeResponseValue;
13024         }
13025         // MUST_USE_RES struct LDKChannelManager ChannelManager_new(struct LDKFeeEstimator fee_est, struct LDKWatch chain_monitor, struct LDKBroadcasterInterface tx_broadcaster, struct LDKLogger logger, struct LDKKeysInterface keys_manager, struct LDKUserConfig config, struct LDKChainParameters params);
13026         export function ChannelManager_new(fee_est: number, chain_monitor: number, tx_broadcaster: number, logger: number, keys_manager: number, config: number, params: number): number {
13027                 if(!isWasmInitialized) {
13028                         throw new Error("initializeWasm() must be awaited first!");
13029                 }
13030                 const nativeResponseValue = wasm.ChannelManager_new(fee_est, chain_monitor, tx_broadcaster, logger, keys_manager, config, params);
13031                 return nativeResponseValue;
13032         }
13033         // MUST_USE_RES struct LDKUserConfig ChannelManager_get_current_default_configuration(const struct LDKChannelManager *NONNULL_PTR this_arg);
13034         export function ChannelManager_get_current_default_configuration(this_arg: number): number {
13035                 if(!isWasmInitialized) {
13036                         throw new Error("initializeWasm() must be awaited first!");
13037                 }
13038                 const nativeResponseValue = wasm.ChannelManager_get_current_default_configuration(this_arg);
13039                 return nativeResponseValue;
13040         }
13041         // MUST_USE_RES struct LDKCResult__u832APIErrorZ 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_channel_id, struct LDKUserConfig override_config);
13042         export function ChannelManager_create_channel(this_arg: number, their_network_key: Uint8Array, channel_value_satoshis: number, push_msat: number, user_channel_id: number, override_config: number): number {
13043                 if(!isWasmInitialized) {
13044                         throw new Error("initializeWasm() must be awaited first!");
13045                 }
13046                 const nativeResponseValue = wasm.ChannelManager_create_channel(this_arg, encodeArray(their_network_key), channel_value_satoshis, push_msat, user_channel_id, override_config);
13047                 return nativeResponseValue;
13048         }
13049         // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
13050         export function ChannelManager_list_channels(this_arg: number): number[] {
13051                 if(!isWasmInitialized) {
13052                         throw new Error("initializeWasm() must be awaited first!");
13053                 }
13054                 const nativeResponseValue = wasm.ChannelManager_list_channels(this_arg);
13055                 return nativeResponseValue;
13056         }
13057         // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_usable_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
13058         export function ChannelManager_list_usable_channels(this_arg: number): number[] {
13059                 if(!isWasmInitialized) {
13060                         throw new Error("initializeWasm() must be awaited first!");
13061                 }
13062                 const nativeResponseValue = wasm.ChannelManager_list_usable_channels(this_arg);
13063                 return nativeResponseValue;
13064         }
13065         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
13066         export function ChannelManager_close_channel(this_arg: number, channel_id: Uint8Array): number {
13067                 if(!isWasmInitialized) {
13068                         throw new Error("initializeWasm() must be awaited first!");
13069                 }
13070                 const nativeResponseValue = wasm.ChannelManager_close_channel(this_arg, encodeArray(channel_id));
13071                 return nativeResponseValue;
13072         }
13073         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel_with_target_feerate(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32], uint32_t target_feerate_sats_per_1000_weight);
13074         export function ChannelManager_close_channel_with_target_feerate(this_arg: number, channel_id: Uint8Array, target_feerate_sats_per_1000_weight: number): number {
13075                 if(!isWasmInitialized) {
13076                         throw new Error("initializeWasm() must be awaited first!");
13077                 }
13078                 const nativeResponseValue = wasm.ChannelManager_close_channel_with_target_feerate(this_arg, encodeArray(channel_id), target_feerate_sats_per_1000_weight);
13079                 return nativeResponseValue;
13080         }
13081         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
13082         export function ChannelManager_force_close_channel(this_arg: number, channel_id: Uint8Array): number {
13083                 if(!isWasmInitialized) {
13084                         throw new Error("initializeWasm() must be awaited first!");
13085                 }
13086                 const nativeResponseValue = wasm.ChannelManager_force_close_channel(this_arg, encodeArray(channel_id));
13087                 return nativeResponseValue;
13088         }
13089         // void ChannelManager_force_close_all_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
13090         export function ChannelManager_force_close_all_channels(this_arg: number): void {
13091                 if(!isWasmInitialized) {
13092                         throw new Error("initializeWasm() must be awaited first!");
13093                 }
13094                 const nativeResponseValue = wasm.ChannelManager_force_close_all_channels(this_arg);
13095                 // debug statements here
13096         }
13097         // MUST_USE_RES struct LDKCResult_PaymentIdPaymentSendFailureZ ChannelManager_send_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKRoute *NONNULL_PTR route, struct LDKThirtyTwoBytes payment_hash, struct LDKThirtyTwoBytes payment_secret);
13098         export function ChannelManager_send_payment(this_arg: number, route: number, payment_hash: Uint8Array, payment_secret: Uint8Array): number {
13099                 if(!isWasmInitialized) {
13100                         throw new Error("initializeWasm() must be awaited first!");
13101                 }
13102                 const nativeResponseValue = wasm.ChannelManager_send_payment(this_arg, route, encodeArray(payment_hash), encodeArray(payment_secret));
13103                 return nativeResponseValue;
13104         }
13105         // MUST_USE_RES struct LDKCResult_NonePaymentSendFailureZ ChannelManager_retry_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKRoute *NONNULL_PTR route, struct LDKThirtyTwoBytes payment_id);
13106         export function ChannelManager_retry_payment(this_arg: number, route: number, payment_id: Uint8Array): number {
13107                 if(!isWasmInitialized) {
13108                         throw new Error("initializeWasm() must be awaited first!");
13109                 }
13110                 const nativeResponseValue = wasm.ChannelManager_retry_payment(this_arg, route, encodeArray(payment_id));
13111                 return nativeResponseValue;
13112         }
13113         // void ChannelManager_abandon_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_id);
13114         export function ChannelManager_abandon_payment(this_arg: number, payment_id: Uint8Array): void {
13115                 if(!isWasmInitialized) {
13116                         throw new Error("initializeWasm() must be awaited first!");
13117                 }
13118                 const nativeResponseValue = wasm.ChannelManager_abandon_payment(this_arg, encodeArray(payment_id));
13119                 // debug statements here
13120         }
13121         // MUST_USE_RES struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ ChannelManager_send_spontaneous_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKRoute *NONNULL_PTR route, struct LDKThirtyTwoBytes payment_preimage);
13122         export function ChannelManager_send_spontaneous_payment(this_arg: number, route: number, payment_preimage: Uint8Array): number {
13123                 if(!isWasmInitialized) {
13124                         throw new Error("initializeWasm() must be awaited first!");
13125                 }
13126                 const nativeResponseValue = wasm.ChannelManager_send_spontaneous_payment(this_arg, route, encodeArray(payment_preimage));
13127                 return nativeResponseValue;
13128         }
13129         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_funding_transaction_generated(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*temporary_channel_id)[32], struct LDKTransaction funding_transaction);
13130         export function ChannelManager_funding_transaction_generated(this_arg: number, temporary_channel_id: Uint8Array, funding_transaction: Uint8Array): number {
13131                 if(!isWasmInitialized) {
13132                         throw new Error("initializeWasm() must be awaited first!");
13133                 }
13134                 const nativeResponseValue = wasm.ChannelManager_funding_transaction_generated(this_arg, encodeArray(temporary_channel_id), encodeArray(funding_transaction));
13135                 return nativeResponseValue;
13136         }
13137         // void ChannelManager_broadcast_node_announcement(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThreeBytes rgb, struct LDKThirtyTwoBytes alias, struct LDKCVec_NetAddressZ addresses);
13138         export function ChannelManager_broadcast_node_announcement(this_arg: number, rgb: Uint8Array, alias: Uint8Array, addresses: number[]): void {
13139                 if(!isWasmInitialized) {
13140                         throw new Error("initializeWasm() must be awaited first!");
13141                 }
13142                 const nativeResponseValue = wasm.ChannelManager_broadcast_node_announcement(this_arg, encodeArray(rgb), encodeArray(alias), addresses);
13143                 // debug statements here
13144         }
13145         // void ChannelManager_process_pending_htlc_forwards(const struct LDKChannelManager *NONNULL_PTR this_arg);
13146         export function ChannelManager_process_pending_htlc_forwards(this_arg: number): void {
13147                 if(!isWasmInitialized) {
13148                         throw new Error("initializeWasm() must be awaited first!");
13149                 }
13150                 const nativeResponseValue = wasm.ChannelManager_process_pending_htlc_forwards(this_arg);
13151                 // debug statements here
13152         }
13153         // void ChannelManager_timer_tick_occurred(const struct LDKChannelManager *NONNULL_PTR this_arg);
13154         export function ChannelManager_timer_tick_occurred(this_arg: number): void {
13155                 if(!isWasmInitialized) {
13156                         throw new Error("initializeWasm() must be awaited first!");
13157                 }
13158                 const nativeResponseValue = wasm.ChannelManager_timer_tick_occurred(this_arg);
13159                 // debug statements here
13160         }
13161         // MUST_USE_RES bool ChannelManager_fail_htlc_backwards(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*payment_hash)[32]);
13162         export function ChannelManager_fail_htlc_backwards(this_arg: number, payment_hash: Uint8Array): boolean {
13163                 if(!isWasmInitialized) {
13164                         throw new Error("initializeWasm() must be awaited first!");
13165                 }
13166                 const nativeResponseValue = wasm.ChannelManager_fail_htlc_backwards(this_arg, encodeArray(payment_hash));
13167                 return nativeResponseValue;
13168         }
13169         // MUST_USE_RES bool ChannelManager_claim_funds(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_preimage);
13170         export function ChannelManager_claim_funds(this_arg: number, payment_preimage: Uint8Array): boolean {
13171                 if(!isWasmInitialized) {
13172                         throw new Error("initializeWasm() must be awaited first!");
13173                 }
13174                 const nativeResponseValue = wasm.ChannelManager_claim_funds(this_arg, encodeArray(payment_preimage));
13175                 return nativeResponseValue;
13176         }
13177         // MUST_USE_RES struct LDKPublicKey ChannelManager_get_our_node_id(const struct LDKChannelManager *NONNULL_PTR this_arg);
13178         export function ChannelManager_get_our_node_id(this_arg: number): Uint8Array {
13179                 if(!isWasmInitialized) {
13180                         throw new Error("initializeWasm() must be awaited first!");
13181                 }
13182                 const nativeResponseValue = wasm.ChannelManager_get_our_node_id(this_arg);
13183                 return decodeArray(nativeResponseValue);
13184         }
13185         // MUST_USE_RES struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ ChannelManager_create_inbound_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKCOption_u64Z min_value_msat, uint32_t invoice_expiry_delta_secs);
13186         export function ChannelManager_create_inbound_payment(this_arg: number, min_value_msat: number, invoice_expiry_delta_secs: number): number {
13187                 if(!isWasmInitialized) {
13188                         throw new Error("initializeWasm() must be awaited first!");
13189                 }
13190                 const nativeResponseValue = wasm.ChannelManager_create_inbound_payment(this_arg, min_value_msat, invoice_expiry_delta_secs);
13191                 return nativeResponseValue;
13192         }
13193         // MUST_USE_RES struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ ChannelManager_create_inbound_payment_legacy(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKCOption_u64Z min_value_msat, uint32_t invoice_expiry_delta_secs);
13194         export function ChannelManager_create_inbound_payment_legacy(this_arg: number, min_value_msat: number, invoice_expiry_delta_secs: number): number {
13195                 if(!isWasmInitialized) {
13196                         throw new Error("initializeWasm() must be awaited first!");
13197                 }
13198                 const nativeResponseValue = wasm.ChannelManager_create_inbound_payment_legacy(this_arg, min_value_msat, invoice_expiry_delta_secs);
13199                 return nativeResponseValue;
13200         }
13201         // MUST_USE_RES struct LDKCResult_PaymentSecretNoneZ ChannelManager_create_inbound_payment_for_hash(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_hash, struct LDKCOption_u64Z min_value_msat, uint32_t invoice_expiry_delta_secs);
13202         export function ChannelManager_create_inbound_payment_for_hash(this_arg: number, payment_hash: Uint8Array, min_value_msat: number, invoice_expiry_delta_secs: number): number {
13203                 if(!isWasmInitialized) {
13204                         throw new Error("initializeWasm() must be awaited first!");
13205                 }
13206                 const nativeResponseValue = wasm.ChannelManager_create_inbound_payment_for_hash(this_arg, encodeArray(payment_hash), min_value_msat, invoice_expiry_delta_secs);
13207                 return nativeResponseValue;
13208         }
13209         // MUST_USE_RES struct LDKCResult_PaymentSecretAPIErrorZ ChannelManager_create_inbound_payment_for_hash_legacy(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_hash, struct LDKCOption_u64Z min_value_msat, uint32_t invoice_expiry_delta_secs);
13210         export function ChannelManager_create_inbound_payment_for_hash_legacy(this_arg: number, payment_hash: Uint8Array, min_value_msat: number, invoice_expiry_delta_secs: number): number {
13211                 if(!isWasmInitialized) {
13212                         throw new Error("initializeWasm() must be awaited first!");
13213                 }
13214                 const nativeResponseValue = wasm.ChannelManager_create_inbound_payment_for_hash_legacy(this_arg, encodeArray(payment_hash), min_value_msat, invoice_expiry_delta_secs);
13215                 return nativeResponseValue;
13216         }
13217         // MUST_USE_RES struct LDKCResult_PaymentPreimageAPIErrorZ ChannelManager_get_payment_preimage(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_hash, struct LDKThirtyTwoBytes payment_secret);
13218         export function ChannelManager_get_payment_preimage(this_arg: number, payment_hash: Uint8Array, payment_secret: Uint8Array): number {
13219                 if(!isWasmInitialized) {
13220                         throw new Error("initializeWasm() must be awaited first!");
13221                 }
13222                 const nativeResponseValue = wasm.ChannelManager_get_payment_preimage(this_arg, encodeArray(payment_hash), encodeArray(payment_secret));
13223                 return nativeResponseValue;
13224         }
13225         // struct LDKMessageSendEventsProvider ChannelManager_as_MessageSendEventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
13226         export function ChannelManager_as_MessageSendEventsProvider(this_arg: number): number {
13227                 if(!isWasmInitialized) {
13228                         throw new Error("initializeWasm() must be awaited first!");
13229                 }
13230                 const nativeResponseValue = wasm.ChannelManager_as_MessageSendEventsProvider(this_arg);
13231                 return nativeResponseValue;
13232         }
13233         // struct LDKEventsProvider ChannelManager_as_EventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
13234         export function ChannelManager_as_EventsProvider(this_arg: number): number {
13235                 if(!isWasmInitialized) {
13236                         throw new Error("initializeWasm() must be awaited first!");
13237                 }
13238                 const nativeResponseValue = wasm.ChannelManager_as_EventsProvider(this_arg);
13239                 return nativeResponseValue;
13240         }
13241         // struct LDKListen ChannelManager_as_Listen(const struct LDKChannelManager *NONNULL_PTR this_arg);
13242         export function ChannelManager_as_Listen(this_arg: number): number {
13243                 if(!isWasmInitialized) {
13244                         throw new Error("initializeWasm() must be awaited first!");
13245                 }
13246                 const nativeResponseValue = wasm.ChannelManager_as_Listen(this_arg);
13247                 return nativeResponseValue;
13248         }
13249         // struct LDKConfirm ChannelManager_as_Confirm(const struct LDKChannelManager *NONNULL_PTR this_arg);
13250         export function ChannelManager_as_Confirm(this_arg: number): number {
13251                 if(!isWasmInitialized) {
13252                         throw new Error("initializeWasm() must be awaited first!");
13253                 }
13254                 const nativeResponseValue = wasm.ChannelManager_as_Confirm(this_arg);
13255                 return nativeResponseValue;
13256         }
13257         // MUST_USE_RES bool ChannelManager_await_persistable_update_timeout(const struct LDKChannelManager *NONNULL_PTR this_arg, uint64_t max_wait);
13258         export function ChannelManager_await_persistable_update_timeout(this_arg: number, max_wait: number): boolean {
13259                 if(!isWasmInitialized) {
13260                         throw new Error("initializeWasm() must be awaited first!");
13261                 }
13262                 const nativeResponseValue = wasm.ChannelManager_await_persistable_update_timeout(this_arg, max_wait);
13263                 return nativeResponseValue;
13264         }
13265         // void ChannelManager_await_persistable_update(const struct LDKChannelManager *NONNULL_PTR this_arg);
13266         export function ChannelManager_await_persistable_update(this_arg: number): void {
13267                 if(!isWasmInitialized) {
13268                         throw new Error("initializeWasm() must be awaited first!");
13269                 }
13270                 const nativeResponseValue = wasm.ChannelManager_await_persistable_update(this_arg);
13271                 // debug statements here
13272         }
13273         // MUST_USE_RES struct LDKBestBlock ChannelManager_current_best_block(const struct LDKChannelManager *NONNULL_PTR this_arg);
13274         export function ChannelManager_current_best_block(this_arg: number): number {
13275                 if(!isWasmInitialized) {
13276                         throw new Error("initializeWasm() must be awaited first!");
13277                 }
13278                 const nativeResponseValue = wasm.ChannelManager_current_best_block(this_arg);
13279                 return nativeResponseValue;
13280         }
13281         // struct LDKChannelMessageHandler ChannelManager_as_ChannelMessageHandler(const struct LDKChannelManager *NONNULL_PTR this_arg);
13282         export function ChannelManager_as_ChannelMessageHandler(this_arg: number): number {
13283                 if(!isWasmInitialized) {
13284                         throw new Error("initializeWasm() must be awaited first!");
13285                 }
13286                 const nativeResponseValue = wasm.ChannelManager_as_ChannelMessageHandler(this_arg);
13287                 return nativeResponseValue;
13288         }
13289         // struct LDKCVec_u8Z ChannelManager_write(const struct LDKChannelManager *NONNULL_PTR obj);
13290         export function ChannelManager_write(obj: number): Uint8Array {
13291                 if(!isWasmInitialized) {
13292                         throw new Error("initializeWasm() must be awaited first!");
13293                 }
13294                 const nativeResponseValue = wasm.ChannelManager_write(obj);
13295                 return decodeArray(nativeResponseValue);
13296         }
13297         // void ChannelManagerReadArgs_free(struct LDKChannelManagerReadArgs this_obj);
13298         export function ChannelManagerReadArgs_free(this_obj: number): void {
13299                 if(!isWasmInitialized) {
13300                         throw new Error("initializeWasm() must be awaited first!");
13301                 }
13302                 const nativeResponseValue = wasm.ChannelManagerReadArgs_free(this_obj);
13303                 // debug statements here
13304         }
13305         // const struct LDKKeysInterface *ChannelManagerReadArgs_get_keys_manager(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
13306         export function ChannelManagerReadArgs_get_keys_manager(this_ptr: number): number {
13307                 if(!isWasmInitialized) {
13308                         throw new Error("initializeWasm() must be awaited first!");
13309                 }
13310                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_keys_manager(this_ptr);
13311                 return nativeResponseValue;
13312         }
13313         // void ChannelManagerReadArgs_set_keys_manager(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKKeysInterface val);
13314         export function ChannelManagerReadArgs_set_keys_manager(this_ptr: number, val: number): void {
13315                 if(!isWasmInitialized) {
13316                         throw new Error("initializeWasm() must be awaited first!");
13317                 }
13318                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_keys_manager(this_ptr, val);
13319                 // debug statements here
13320         }
13321         // const struct LDKFeeEstimator *ChannelManagerReadArgs_get_fee_estimator(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
13322         export function ChannelManagerReadArgs_get_fee_estimator(this_ptr: number): number {
13323                 if(!isWasmInitialized) {
13324                         throw new Error("initializeWasm() must be awaited first!");
13325                 }
13326                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_fee_estimator(this_ptr);
13327                 return nativeResponseValue;
13328         }
13329         // void ChannelManagerReadArgs_set_fee_estimator(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKFeeEstimator val);
13330         export function ChannelManagerReadArgs_set_fee_estimator(this_ptr: number, val: number): void {
13331                 if(!isWasmInitialized) {
13332                         throw new Error("initializeWasm() must be awaited first!");
13333                 }
13334                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_fee_estimator(this_ptr, val);
13335                 // debug statements here
13336         }
13337         // const struct LDKWatch *ChannelManagerReadArgs_get_chain_monitor(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
13338         export function ChannelManagerReadArgs_get_chain_monitor(this_ptr: number): number {
13339                 if(!isWasmInitialized) {
13340                         throw new Error("initializeWasm() must be awaited first!");
13341                 }
13342                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_chain_monitor(this_ptr);
13343                 return nativeResponseValue;
13344         }
13345         // void ChannelManagerReadArgs_set_chain_monitor(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKWatch val);
13346         export function ChannelManagerReadArgs_set_chain_monitor(this_ptr: number, val: number): void {
13347                 if(!isWasmInitialized) {
13348                         throw new Error("initializeWasm() must be awaited first!");
13349                 }
13350                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_chain_monitor(this_ptr, val);
13351                 // debug statements here
13352         }
13353         // const struct LDKBroadcasterInterface *ChannelManagerReadArgs_get_tx_broadcaster(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
13354         export function ChannelManagerReadArgs_get_tx_broadcaster(this_ptr: number): number {
13355                 if(!isWasmInitialized) {
13356                         throw new Error("initializeWasm() must be awaited first!");
13357                 }
13358                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_tx_broadcaster(this_ptr);
13359                 return nativeResponseValue;
13360         }
13361         // void ChannelManagerReadArgs_set_tx_broadcaster(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKBroadcasterInterface val);
13362         export function ChannelManagerReadArgs_set_tx_broadcaster(this_ptr: number, val: number): void {
13363                 if(!isWasmInitialized) {
13364                         throw new Error("initializeWasm() must be awaited first!");
13365                 }
13366                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_tx_broadcaster(this_ptr, val);
13367                 // debug statements here
13368         }
13369         // const struct LDKLogger *ChannelManagerReadArgs_get_logger(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
13370         export function ChannelManagerReadArgs_get_logger(this_ptr: number): number {
13371                 if(!isWasmInitialized) {
13372                         throw new Error("initializeWasm() must be awaited first!");
13373                 }
13374                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_logger(this_ptr);
13375                 return nativeResponseValue;
13376         }
13377         // void ChannelManagerReadArgs_set_logger(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKLogger val);
13378         export function ChannelManagerReadArgs_set_logger(this_ptr: number, val: number): void {
13379                 if(!isWasmInitialized) {
13380                         throw new Error("initializeWasm() must be awaited first!");
13381                 }
13382                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_logger(this_ptr, val);
13383                 // debug statements here
13384         }
13385         // struct LDKUserConfig ChannelManagerReadArgs_get_default_config(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
13386         export function ChannelManagerReadArgs_get_default_config(this_ptr: number): number {
13387                 if(!isWasmInitialized) {
13388                         throw new Error("initializeWasm() must be awaited first!");
13389                 }
13390                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_default_config(this_ptr);
13391                 return nativeResponseValue;
13392         }
13393         // void ChannelManagerReadArgs_set_default_config(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKUserConfig val);
13394         export function ChannelManagerReadArgs_set_default_config(this_ptr: number, val: number): void {
13395                 if(!isWasmInitialized) {
13396                         throw new Error("initializeWasm() must be awaited first!");
13397                 }
13398                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_default_config(this_ptr, val);
13399                 // debug statements here
13400         }
13401         // 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);
13402         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 {
13403                 if(!isWasmInitialized) {
13404                         throw new Error("initializeWasm() must be awaited first!");
13405                 }
13406                 const nativeResponseValue = wasm.ChannelManagerReadArgs_new(keys_manager, fee_estimator, chain_monitor, tx_broadcaster, logger, default_config, channel_monitors);
13407                 return nativeResponseValue;
13408         }
13409         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ C2Tuple_BlockHashChannelManagerZ_read(struct LDKu8slice ser, struct LDKChannelManagerReadArgs arg);
13410         export function C2Tuple_BlockHashChannelManagerZ_read(ser: Uint8Array, arg: number): number {
13411                 if(!isWasmInitialized) {
13412                         throw new Error("initializeWasm() must be awaited first!");
13413                 }
13414                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_read(encodeArray(ser), arg);
13415                 return nativeResponseValue;
13416         }
13417         // void DecodeError_free(struct LDKDecodeError this_obj);
13418         export function DecodeError_free(this_obj: number): void {
13419                 if(!isWasmInitialized) {
13420                         throw new Error("initializeWasm() must be awaited first!");
13421                 }
13422                 const nativeResponseValue = wasm.DecodeError_free(this_obj);
13423                 // debug statements here
13424         }
13425         // uint64_t DecodeError_clone_ptr(LDKDecodeError *NONNULL_PTR arg);
13426         export function DecodeError_clone_ptr(arg: number): number {
13427                 if(!isWasmInitialized) {
13428                         throw new Error("initializeWasm() must be awaited first!");
13429                 }
13430                 const nativeResponseValue = wasm.DecodeError_clone_ptr(arg);
13431                 return nativeResponseValue;
13432         }
13433         // struct LDKDecodeError DecodeError_clone(const struct LDKDecodeError *NONNULL_PTR orig);
13434         export function DecodeError_clone(orig: number): number {
13435                 if(!isWasmInitialized) {
13436                         throw new Error("initializeWasm() must be awaited first!");
13437                 }
13438                 const nativeResponseValue = wasm.DecodeError_clone(orig);
13439                 return nativeResponseValue;
13440         }
13441         // void Init_free(struct LDKInit this_obj);
13442         export function Init_free(this_obj: number): void {
13443                 if(!isWasmInitialized) {
13444                         throw new Error("initializeWasm() must be awaited first!");
13445                 }
13446                 const nativeResponseValue = wasm.Init_free(this_obj);
13447                 // debug statements here
13448         }
13449         // struct LDKInitFeatures Init_get_features(const struct LDKInit *NONNULL_PTR this_ptr);
13450         export function Init_get_features(this_ptr: number): number {
13451                 if(!isWasmInitialized) {
13452                         throw new Error("initializeWasm() must be awaited first!");
13453                 }
13454                 const nativeResponseValue = wasm.Init_get_features(this_ptr);
13455                 return nativeResponseValue;
13456         }
13457         // void Init_set_features(struct LDKInit *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
13458         export function Init_set_features(this_ptr: number, val: number): void {
13459                 if(!isWasmInitialized) {
13460                         throw new Error("initializeWasm() must be awaited first!");
13461                 }
13462                 const nativeResponseValue = wasm.Init_set_features(this_ptr, val);
13463                 // debug statements here
13464         }
13465         // MUST_USE_RES struct LDKInit Init_new(struct LDKInitFeatures features_arg);
13466         export function Init_new(features_arg: number): number {
13467                 if(!isWasmInitialized) {
13468                         throw new Error("initializeWasm() must be awaited first!");
13469                 }
13470                 const nativeResponseValue = wasm.Init_new(features_arg);
13471                 return nativeResponseValue;
13472         }
13473         // uint64_t Init_clone_ptr(LDKInit *NONNULL_PTR arg);
13474         export function Init_clone_ptr(arg: number): number {
13475                 if(!isWasmInitialized) {
13476                         throw new Error("initializeWasm() must be awaited first!");
13477                 }
13478                 const nativeResponseValue = wasm.Init_clone_ptr(arg);
13479                 return nativeResponseValue;
13480         }
13481         // struct LDKInit Init_clone(const struct LDKInit *NONNULL_PTR orig);
13482         export function Init_clone(orig: number): number {
13483                 if(!isWasmInitialized) {
13484                         throw new Error("initializeWasm() must be awaited first!");
13485                 }
13486                 const nativeResponseValue = wasm.Init_clone(orig);
13487                 return nativeResponseValue;
13488         }
13489         // void ErrorMessage_free(struct LDKErrorMessage this_obj);
13490         export function ErrorMessage_free(this_obj: number): void {
13491                 if(!isWasmInitialized) {
13492                         throw new Error("initializeWasm() must be awaited first!");
13493                 }
13494                 const nativeResponseValue = wasm.ErrorMessage_free(this_obj);
13495                 // debug statements here
13496         }
13497         // const uint8_t (*ErrorMessage_get_channel_id(const struct LDKErrorMessage *NONNULL_PTR this_ptr))[32];
13498         export function ErrorMessage_get_channel_id(this_ptr: number): Uint8Array {
13499                 if(!isWasmInitialized) {
13500                         throw new Error("initializeWasm() must be awaited first!");
13501                 }
13502                 const nativeResponseValue = wasm.ErrorMessage_get_channel_id(this_ptr);
13503                 return decodeArray(nativeResponseValue);
13504         }
13505         // void ErrorMessage_set_channel_id(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
13506         export function ErrorMessage_set_channel_id(this_ptr: number, val: Uint8Array): void {
13507                 if(!isWasmInitialized) {
13508                         throw new Error("initializeWasm() must be awaited first!");
13509                 }
13510                 const nativeResponseValue = wasm.ErrorMessage_set_channel_id(this_ptr, encodeArray(val));
13511                 // debug statements here
13512         }
13513         // struct LDKStr ErrorMessage_get_data(const struct LDKErrorMessage *NONNULL_PTR this_ptr);
13514         export function ErrorMessage_get_data(this_ptr: number): String {
13515                 if(!isWasmInitialized) {
13516                         throw new Error("initializeWasm() must be awaited first!");
13517                 }
13518                 const nativeResponseValue = wasm.ErrorMessage_get_data(this_ptr);
13519                 return nativeResponseValue;
13520         }
13521         // void ErrorMessage_set_data(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKStr val);
13522         export function ErrorMessage_set_data(this_ptr: number, val: String): void {
13523                 if(!isWasmInitialized) {
13524                         throw new Error("initializeWasm() must be awaited first!");
13525                 }
13526                 const nativeResponseValue = wasm.ErrorMessage_set_data(this_ptr, val);
13527                 // debug statements here
13528         }
13529         // MUST_USE_RES struct LDKErrorMessage ErrorMessage_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKStr data_arg);
13530         export function ErrorMessage_new(channel_id_arg: Uint8Array, data_arg: String): number {
13531                 if(!isWasmInitialized) {
13532                         throw new Error("initializeWasm() must be awaited first!");
13533                 }
13534                 const nativeResponseValue = wasm.ErrorMessage_new(encodeArray(channel_id_arg), data_arg);
13535                 return nativeResponseValue;
13536         }
13537         // uint64_t ErrorMessage_clone_ptr(LDKErrorMessage *NONNULL_PTR arg);
13538         export function ErrorMessage_clone_ptr(arg: number): number {
13539                 if(!isWasmInitialized) {
13540                         throw new Error("initializeWasm() must be awaited first!");
13541                 }
13542                 const nativeResponseValue = wasm.ErrorMessage_clone_ptr(arg);
13543                 return nativeResponseValue;
13544         }
13545         // struct LDKErrorMessage ErrorMessage_clone(const struct LDKErrorMessage *NONNULL_PTR orig);
13546         export function ErrorMessage_clone(orig: number): number {
13547                 if(!isWasmInitialized) {
13548                         throw new Error("initializeWasm() must be awaited first!");
13549                 }
13550                 const nativeResponseValue = wasm.ErrorMessage_clone(orig);
13551                 return nativeResponseValue;
13552         }
13553         // void Ping_free(struct LDKPing this_obj);
13554         export function Ping_free(this_obj: number): void {
13555                 if(!isWasmInitialized) {
13556                         throw new Error("initializeWasm() must be awaited first!");
13557                 }
13558                 const nativeResponseValue = wasm.Ping_free(this_obj);
13559                 // debug statements here
13560         }
13561         // uint16_t Ping_get_ponglen(const struct LDKPing *NONNULL_PTR this_ptr);
13562         export function Ping_get_ponglen(this_ptr: number): number {
13563                 if(!isWasmInitialized) {
13564                         throw new Error("initializeWasm() must be awaited first!");
13565                 }
13566                 const nativeResponseValue = wasm.Ping_get_ponglen(this_ptr);
13567                 return nativeResponseValue;
13568         }
13569         // void Ping_set_ponglen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
13570         export function Ping_set_ponglen(this_ptr: number, val: number): void {
13571                 if(!isWasmInitialized) {
13572                         throw new Error("initializeWasm() must be awaited first!");
13573                 }
13574                 const nativeResponseValue = wasm.Ping_set_ponglen(this_ptr, val);
13575                 // debug statements here
13576         }
13577         // uint16_t Ping_get_byteslen(const struct LDKPing *NONNULL_PTR this_ptr);
13578         export function Ping_get_byteslen(this_ptr: number): number {
13579                 if(!isWasmInitialized) {
13580                         throw new Error("initializeWasm() must be awaited first!");
13581                 }
13582                 const nativeResponseValue = wasm.Ping_get_byteslen(this_ptr);
13583                 return nativeResponseValue;
13584         }
13585         // void Ping_set_byteslen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
13586         export function Ping_set_byteslen(this_ptr: number, val: number): void {
13587                 if(!isWasmInitialized) {
13588                         throw new Error("initializeWasm() must be awaited first!");
13589                 }
13590                 const nativeResponseValue = wasm.Ping_set_byteslen(this_ptr, val);
13591                 // debug statements here
13592         }
13593         // MUST_USE_RES struct LDKPing Ping_new(uint16_t ponglen_arg, uint16_t byteslen_arg);
13594         export function Ping_new(ponglen_arg: number, byteslen_arg: number): number {
13595                 if(!isWasmInitialized) {
13596                         throw new Error("initializeWasm() must be awaited first!");
13597                 }
13598                 const nativeResponseValue = wasm.Ping_new(ponglen_arg, byteslen_arg);
13599                 return nativeResponseValue;
13600         }
13601         // uint64_t Ping_clone_ptr(LDKPing *NONNULL_PTR arg);
13602         export function Ping_clone_ptr(arg: number): number {
13603                 if(!isWasmInitialized) {
13604                         throw new Error("initializeWasm() must be awaited first!");
13605                 }
13606                 const nativeResponseValue = wasm.Ping_clone_ptr(arg);
13607                 return nativeResponseValue;
13608         }
13609         // struct LDKPing Ping_clone(const struct LDKPing *NONNULL_PTR orig);
13610         export function Ping_clone(orig: number): number {
13611                 if(!isWasmInitialized) {
13612                         throw new Error("initializeWasm() must be awaited first!");
13613                 }
13614                 const nativeResponseValue = wasm.Ping_clone(orig);
13615                 return nativeResponseValue;
13616         }
13617         // void Pong_free(struct LDKPong this_obj);
13618         export function Pong_free(this_obj: number): void {
13619                 if(!isWasmInitialized) {
13620                         throw new Error("initializeWasm() must be awaited first!");
13621                 }
13622                 const nativeResponseValue = wasm.Pong_free(this_obj);
13623                 // debug statements here
13624         }
13625         // uint16_t Pong_get_byteslen(const struct LDKPong *NONNULL_PTR this_ptr);
13626         export function Pong_get_byteslen(this_ptr: number): number {
13627                 if(!isWasmInitialized) {
13628                         throw new Error("initializeWasm() must be awaited first!");
13629                 }
13630                 const nativeResponseValue = wasm.Pong_get_byteslen(this_ptr);
13631                 return nativeResponseValue;
13632         }
13633         // void Pong_set_byteslen(struct LDKPong *NONNULL_PTR this_ptr, uint16_t val);
13634         export function Pong_set_byteslen(this_ptr: number, val: number): void {
13635                 if(!isWasmInitialized) {
13636                         throw new Error("initializeWasm() must be awaited first!");
13637                 }
13638                 const nativeResponseValue = wasm.Pong_set_byteslen(this_ptr, val);
13639                 // debug statements here
13640         }
13641         // MUST_USE_RES struct LDKPong Pong_new(uint16_t byteslen_arg);
13642         export function Pong_new(byteslen_arg: number): number {
13643                 if(!isWasmInitialized) {
13644                         throw new Error("initializeWasm() must be awaited first!");
13645                 }
13646                 const nativeResponseValue = wasm.Pong_new(byteslen_arg);
13647                 return nativeResponseValue;
13648         }
13649         // uint64_t Pong_clone_ptr(LDKPong *NONNULL_PTR arg);
13650         export function Pong_clone_ptr(arg: number): number {
13651                 if(!isWasmInitialized) {
13652                         throw new Error("initializeWasm() must be awaited first!");
13653                 }
13654                 const nativeResponseValue = wasm.Pong_clone_ptr(arg);
13655                 return nativeResponseValue;
13656         }
13657         // struct LDKPong Pong_clone(const struct LDKPong *NONNULL_PTR orig);
13658         export function Pong_clone(orig: number): number {
13659                 if(!isWasmInitialized) {
13660                         throw new Error("initializeWasm() must be awaited first!");
13661                 }
13662                 const nativeResponseValue = wasm.Pong_clone(orig);
13663                 return nativeResponseValue;
13664         }
13665         // void OpenChannel_free(struct LDKOpenChannel this_obj);
13666         export function OpenChannel_free(this_obj: number): void {
13667                 if(!isWasmInitialized) {
13668                         throw new Error("initializeWasm() must be awaited first!");
13669                 }
13670                 const nativeResponseValue = wasm.OpenChannel_free(this_obj);
13671                 // debug statements here
13672         }
13673         // const uint8_t (*OpenChannel_get_chain_hash(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
13674         export function OpenChannel_get_chain_hash(this_ptr: number): Uint8Array {
13675                 if(!isWasmInitialized) {
13676                         throw new Error("initializeWasm() must be awaited first!");
13677                 }
13678                 const nativeResponseValue = wasm.OpenChannel_get_chain_hash(this_ptr);
13679                 return decodeArray(nativeResponseValue);
13680         }
13681         // void OpenChannel_set_chain_hash(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
13682         export function OpenChannel_set_chain_hash(this_ptr: number, val: Uint8Array): void {
13683                 if(!isWasmInitialized) {
13684                         throw new Error("initializeWasm() must be awaited first!");
13685                 }
13686                 const nativeResponseValue = wasm.OpenChannel_set_chain_hash(this_ptr, encodeArray(val));
13687                 // debug statements here
13688         }
13689         // const uint8_t (*OpenChannel_get_temporary_channel_id(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
13690         export function OpenChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
13691                 if(!isWasmInitialized) {
13692                         throw new Error("initializeWasm() must be awaited first!");
13693                 }
13694                 const nativeResponseValue = wasm.OpenChannel_get_temporary_channel_id(this_ptr);
13695                 return decodeArray(nativeResponseValue);
13696         }
13697         // void OpenChannel_set_temporary_channel_id(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
13698         export function OpenChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
13699                 if(!isWasmInitialized) {
13700                         throw new Error("initializeWasm() must be awaited first!");
13701                 }
13702                 const nativeResponseValue = wasm.OpenChannel_set_temporary_channel_id(this_ptr, encodeArray(val));
13703                 // debug statements here
13704         }
13705         // uint64_t OpenChannel_get_funding_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
13706         export function OpenChannel_get_funding_satoshis(this_ptr: number): number {
13707                 if(!isWasmInitialized) {
13708                         throw new Error("initializeWasm() must be awaited first!");
13709                 }
13710                 const nativeResponseValue = wasm.OpenChannel_get_funding_satoshis(this_ptr);
13711                 return nativeResponseValue;
13712         }
13713         // void OpenChannel_set_funding_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
13714         export function OpenChannel_set_funding_satoshis(this_ptr: number, val: number): void {
13715                 if(!isWasmInitialized) {
13716                         throw new Error("initializeWasm() must be awaited first!");
13717                 }
13718                 const nativeResponseValue = wasm.OpenChannel_set_funding_satoshis(this_ptr, val);
13719                 // debug statements here
13720         }
13721         // uint64_t OpenChannel_get_push_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
13722         export function OpenChannel_get_push_msat(this_ptr: number): number {
13723                 if(!isWasmInitialized) {
13724                         throw new Error("initializeWasm() must be awaited first!");
13725                 }
13726                 const nativeResponseValue = wasm.OpenChannel_get_push_msat(this_ptr);
13727                 return nativeResponseValue;
13728         }
13729         // void OpenChannel_set_push_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
13730         export function OpenChannel_set_push_msat(this_ptr: number, val: number): void {
13731                 if(!isWasmInitialized) {
13732                         throw new Error("initializeWasm() must be awaited first!");
13733                 }
13734                 const nativeResponseValue = wasm.OpenChannel_set_push_msat(this_ptr, val);
13735                 // debug statements here
13736         }
13737         // uint64_t OpenChannel_get_dust_limit_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
13738         export function OpenChannel_get_dust_limit_satoshis(this_ptr: number): number {
13739                 if(!isWasmInitialized) {
13740                         throw new Error("initializeWasm() must be awaited first!");
13741                 }
13742                 const nativeResponseValue = wasm.OpenChannel_get_dust_limit_satoshis(this_ptr);
13743                 return nativeResponseValue;
13744         }
13745         // void OpenChannel_set_dust_limit_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
13746         export function OpenChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
13747                 if(!isWasmInitialized) {
13748                         throw new Error("initializeWasm() must be awaited first!");
13749                 }
13750                 const nativeResponseValue = wasm.OpenChannel_set_dust_limit_satoshis(this_ptr, val);
13751                 // debug statements here
13752         }
13753         // uint64_t OpenChannel_get_max_htlc_value_in_flight_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
13754         export function OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
13755                 if(!isWasmInitialized) {
13756                         throw new Error("initializeWasm() must be awaited first!");
13757                 }
13758                 const nativeResponseValue = wasm.OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr);
13759                 return nativeResponseValue;
13760         }
13761         // void OpenChannel_set_max_htlc_value_in_flight_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
13762         export function OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
13763                 if(!isWasmInitialized) {
13764                         throw new Error("initializeWasm() must be awaited first!");
13765                 }
13766                 const nativeResponseValue = wasm.OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
13767                 // debug statements here
13768         }
13769         // uint64_t OpenChannel_get_channel_reserve_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
13770         export function OpenChannel_get_channel_reserve_satoshis(this_ptr: number): number {
13771                 if(!isWasmInitialized) {
13772                         throw new Error("initializeWasm() must be awaited first!");
13773                 }
13774                 const nativeResponseValue = wasm.OpenChannel_get_channel_reserve_satoshis(this_ptr);
13775                 return nativeResponseValue;
13776         }
13777         // void OpenChannel_set_channel_reserve_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
13778         export function OpenChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
13779                 if(!isWasmInitialized) {
13780                         throw new Error("initializeWasm() must be awaited first!");
13781                 }
13782                 const nativeResponseValue = wasm.OpenChannel_set_channel_reserve_satoshis(this_ptr, val);
13783                 // debug statements here
13784         }
13785         // uint64_t OpenChannel_get_htlc_minimum_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
13786         export function OpenChannel_get_htlc_minimum_msat(this_ptr: number): number {
13787                 if(!isWasmInitialized) {
13788                         throw new Error("initializeWasm() must be awaited first!");
13789                 }
13790                 const nativeResponseValue = wasm.OpenChannel_get_htlc_minimum_msat(this_ptr);
13791                 return nativeResponseValue;
13792         }
13793         // void OpenChannel_set_htlc_minimum_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
13794         export function OpenChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
13795                 if(!isWasmInitialized) {
13796                         throw new Error("initializeWasm() must be awaited first!");
13797                 }
13798                 const nativeResponseValue = wasm.OpenChannel_set_htlc_minimum_msat(this_ptr, val);
13799                 // debug statements here
13800         }
13801         // uint32_t OpenChannel_get_feerate_per_kw(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
13802         export function OpenChannel_get_feerate_per_kw(this_ptr: number): number {
13803                 if(!isWasmInitialized) {
13804                         throw new Error("initializeWasm() must be awaited first!");
13805                 }
13806                 const nativeResponseValue = wasm.OpenChannel_get_feerate_per_kw(this_ptr);
13807                 return nativeResponseValue;
13808         }
13809         // void OpenChannel_set_feerate_per_kw(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint32_t val);
13810         export function OpenChannel_set_feerate_per_kw(this_ptr: number, val: number): void {
13811                 if(!isWasmInitialized) {
13812                         throw new Error("initializeWasm() must be awaited first!");
13813                 }
13814                 const nativeResponseValue = wasm.OpenChannel_set_feerate_per_kw(this_ptr, val);
13815                 // debug statements here
13816         }
13817         // uint16_t OpenChannel_get_to_self_delay(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
13818         export function OpenChannel_get_to_self_delay(this_ptr: number): number {
13819                 if(!isWasmInitialized) {
13820                         throw new Error("initializeWasm() must be awaited first!");
13821                 }
13822                 const nativeResponseValue = wasm.OpenChannel_get_to_self_delay(this_ptr);
13823                 return nativeResponseValue;
13824         }
13825         // void OpenChannel_set_to_self_delay(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
13826         export function OpenChannel_set_to_self_delay(this_ptr: number, val: number): void {
13827                 if(!isWasmInitialized) {
13828                         throw new Error("initializeWasm() must be awaited first!");
13829                 }
13830                 const nativeResponseValue = wasm.OpenChannel_set_to_self_delay(this_ptr, val);
13831                 // debug statements here
13832         }
13833         // uint16_t OpenChannel_get_max_accepted_htlcs(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
13834         export function OpenChannel_get_max_accepted_htlcs(this_ptr: number): number {
13835                 if(!isWasmInitialized) {
13836                         throw new Error("initializeWasm() must be awaited first!");
13837                 }
13838                 const nativeResponseValue = wasm.OpenChannel_get_max_accepted_htlcs(this_ptr);
13839                 return nativeResponseValue;
13840         }
13841         // void OpenChannel_set_max_accepted_htlcs(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
13842         export function OpenChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
13843                 if(!isWasmInitialized) {
13844                         throw new Error("initializeWasm() must be awaited first!");
13845                 }
13846                 const nativeResponseValue = wasm.OpenChannel_set_max_accepted_htlcs(this_ptr, val);
13847                 // debug statements here
13848         }
13849         // struct LDKPublicKey OpenChannel_get_funding_pubkey(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
13850         export function OpenChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
13851                 if(!isWasmInitialized) {
13852                         throw new Error("initializeWasm() must be awaited first!");
13853                 }
13854                 const nativeResponseValue = wasm.OpenChannel_get_funding_pubkey(this_ptr);
13855                 return decodeArray(nativeResponseValue);
13856         }
13857         // void OpenChannel_set_funding_pubkey(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13858         export function OpenChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
13859                 if(!isWasmInitialized) {
13860                         throw new Error("initializeWasm() must be awaited first!");
13861                 }
13862                 const nativeResponseValue = wasm.OpenChannel_set_funding_pubkey(this_ptr, encodeArray(val));
13863                 // debug statements here
13864         }
13865         // struct LDKPublicKey OpenChannel_get_revocation_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
13866         export function OpenChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
13867                 if(!isWasmInitialized) {
13868                         throw new Error("initializeWasm() must be awaited first!");
13869                 }
13870                 const nativeResponseValue = wasm.OpenChannel_get_revocation_basepoint(this_ptr);
13871                 return decodeArray(nativeResponseValue);
13872         }
13873         // void OpenChannel_set_revocation_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13874         export function OpenChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
13875                 if(!isWasmInitialized) {
13876                         throw new Error("initializeWasm() must be awaited first!");
13877                 }
13878                 const nativeResponseValue = wasm.OpenChannel_set_revocation_basepoint(this_ptr, encodeArray(val));
13879                 // debug statements here
13880         }
13881         // struct LDKPublicKey OpenChannel_get_payment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
13882         export function OpenChannel_get_payment_point(this_ptr: number): Uint8Array {
13883                 if(!isWasmInitialized) {
13884                         throw new Error("initializeWasm() must be awaited first!");
13885                 }
13886                 const nativeResponseValue = wasm.OpenChannel_get_payment_point(this_ptr);
13887                 return decodeArray(nativeResponseValue);
13888         }
13889         // void OpenChannel_set_payment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13890         export function OpenChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
13891                 if(!isWasmInitialized) {
13892                         throw new Error("initializeWasm() must be awaited first!");
13893                 }
13894                 const nativeResponseValue = wasm.OpenChannel_set_payment_point(this_ptr, encodeArray(val));
13895                 // debug statements here
13896         }
13897         // struct LDKPublicKey OpenChannel_get_delayed_payment_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
13898         export function OpenChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
13899                 if(!isWasmInitialized) {
13900                         throw new Error("initializeWasm() must be awaited first!");
13901                 }
13902                 const nativeResponseValue = wasm.OpenChannel_get_delayed_payment_basepoint(this_ptr);
13903                 return decodeArray(nativeResponseValue);
13904         }
13905         // void OpenChannel_set_delayed_payment_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13906         export function OpenChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
13907                 if(!isWasmInitialized) {
13908                         throw new Error("initializeWasm() must be awaited first!");
13909                 }
13910                 const nativeResponseValue = wasm.OpenChannel_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
13911                 // debug statements here
13912         }
13913         // struct LDKPublicKey OpenChannel_get_htlc_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
13914         export function OpenChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
13915                 if(!isWasmInitialized) {
13916                         throw new Error("initializeWasm() must be awaited first!");
13917                 }
13918                 const nativeResponseValue = wasm.OpenChannel_get_htlc_basepoint(this_ptr);
13919                 return decodeArray(nativeResponseValue);
13920         }
13921         // void OpenChannel_set_htlc_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13922         export function OpenChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
13923                 if(!isWasmInitialized) {
13924                         throw new Error("initializeWasm() must be awaited first!");
13925                 }
13926                 const nativeResponseValue = wasm.OpenChannel_set_htlc_basepoint(this_ptr, encodeArray(val));
13927                 // debug statements here
13928         }
13929         // struct LDKPublicKey OpenChannel_get_first_per_commitment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
13930         export function OpenChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
13931                 if(!isWasmInitialized) {
13932                         throw new Error("initializeWasm() must be awaited first!");
13933                 }
13934                 const nativeResponseValue = wasm.OpenChannel_get_first_per_commitment_point(this_ptr);
13935                 return decodeArray(nativeResponseValue);
13936         }
13937         // void OpenChannel_set_first_per_commitment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13938         export function OpenChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
13939                 if(!isWasmInitialized) {
13940                         throw new Error("initializeWasm() must be awaited first!");
13941                 }
13942                 const nativeResponseValue = wasm.OpenChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
13943                 // debug statements here
13944         }
13945         // uint8_t OpenChannel_get_channel_flags(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
13946         export function OpenChannel_get_channel_flags(this_ptr: number): number {
13947                 if(!isWasmInitialized) {
13948                         throw new Error("initializeWasm() must be awaited first!");
13949                 }
13950                 const nativeResponseValue = wasm.OpenChannel_get_channel_flags(this_ptr);
13951                 return nativeResponseValue;
13952         }
13953         // void OpenChannel_set_channel_flags(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint8_t val);
13954         export function OpenChannel_set_channel_flags(this_ptr: number, val: number): void {
13955                 if(!isWasmInitialized) {
13956                         throw new Error("initializeWasm() must be awaited first!");
13957                 }
13958                 const nativeResponseValue = wasm.OpenChannel_set_channel_flags(this_ptr, val);
13959                 // debug statements here
13960         }
13961         // struct LDKChannelTypeFeatures OpenChannel_get_channel_type(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
13962         export function OpenChannel_get_channel_type(this_ptr: number): number {
13963                 if(!isWasmInitialized) {
13964                         throw new Error("initializeWasm() must be awaited first!");
13965                 }
13966                 const nativeResponseValue = wasm.OpenChannel_get_channel_type(this_ptr);
13967                 return nativeResponseValue;
13968         }
13969         // void OpenChannel_set_channel_type(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKChannelTypeFeatures val);
13970         export function OpenChannel_set_channel_type(this_ptr: number, val: number): void {
13971                 if(!isWasmInitialized) {
13972                         throw new Error("initializeWasm() must be awaited first!");
13973                 }
13974                 const nativeResponseValue = wasm.OpenChannel_set_channel_type(this_ptr, val);
13975                 // debug statements here
13976         }
13977         // uint64_t OpenChannel_clone_ptr(LDKOpenChannel *NONNULL_PTR arg);
13978         export function OpenChannel_clone_ptr(arg: number): number {
13979                 if(!isWasmInitialized) {
13980                         throw new Error("initializeWasm() must be awaited first!");
13981                 }
13982                 const nativeResponseValue = wasm.OpenChannel_clone_ptr(arg);
13983                 return nativeResponseValue;
13984         }
13985         // struct LDKOpenChannel OpenChannel_clone(const struct LDKOpenChannel *NONNULL_PTR orig);
13986         export function OpenChannel_clone(orig: number): number {
13987                 if(!isWasmInitialized) {
13988                         throw new Error("initializeWasm() must be awaited first!");
13989                 }
13990                 const nativeResponseValue = wasm.OpenChannel_clone(orig);
13991                 return nativeResponseValue;
13992         }
13993         // void AcceptChannel_free(struct LDKAcceptChannel this_obj);
13994         export function AcceptChannel_free(this_obj: number): void {
13995                 if(!isWasmInitialized) {
13996                         throw new Error("initializeWasm() must be awaited first!");
13997                 }
13998                 const nativeResponseValue = wasm.AcceptChannel_free(this_obj);
13999                 // debug statements here
14000         }
14001         // const uint8_t (*AcceptChannel_get_temporary_channel_id(const struct LDKAcceptChannel *NONNULL_PTR this_ptr))[32];
14002         export function AcceptChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
14003                 if(!isWasmInitialized) {
14004                         throw new Error("initializeWasm() must be awaited first!");
14005                 }
14006                 const nativeResponseValue = wasm.AcceptChannel_get_temporary_channel_id(this_ptr);
14007                 return decodeArray(nativeResponseValue);
14008         }
14009         // void AcceptChannel_set_temporary_channel_id(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14010         export function AcceptChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
14011                 if(!isWasmInitialized) {
14012                         throw new Error("initializeWasm() must be awaited first!");
14013                 }
14014                 const nativeResponseValue = wasm.AcceptChannel_set_temporary_channel_id(this_ptr, encodeArray(val));
14015                 // debug statements here
14016         }
14017         // uint64_t AcceptChannel_get_dust_limit_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
14018         export function AcceptChannel_get_dust_limit_satoshis(this_ptr: number): number {
14019                 if(!isWasmInitialized) {
14020                         throw new Error("initializeWasm() must be awaited first!");
14021                 }
14022                 const nativeResponseValue = wasm.AcceptChannel_get_dust_limit_satoshis(this_ptr);
14023                 return nativeResponseValue;
14024         }
14025         // void AcceptChannel_set_dust_limit_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
14026         export function AcceptChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
14027                 if(!isWasmInitialized) {
14028                         throw new Error("initializeWasm() must be awaited first!");
14029                 }
14030                 const nativeResponseValue = wasm.AcceptChannel_set_dust_limit_satoshis(this_ptr, val);
14031                 // debug statements here
14032         }
14033         // uint64_t AcceptChannel_get_max_htlc_value_in_flight_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
14034         export function AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
14035                 if(!isWasmInitialized) {
14036                         throw new Error("initializeWasm() must be awaited first!");
14037                 }
14038                 const nativeResponseValue = wasm.AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr);
14039                 return nativeResponseValue;
14040         }
14041         // void AcceptChannel_set_max_htlc_value_in_flight_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
14042         export function AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
14043                 if(!isWasmInitialized) {
14044                         throw new Error("initializeWasm() must be awaited first!");
14045                 }
14046                 const nativeResponseValue = wasm.AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
14047                 // debug statements here
14048         }
14049         // uint64_t AcceptChannel_get_channel_reserve_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
14050         export function AcceptChannel_get_channel_reserve_satoshis(this_ptr: number): number {
14051                 if(!isWasmInitialized) {
14052                         throw new Error("initializeWasm() must be awaited first!");
14053                 }
14054                 const nativeResponseValue = wasm.AcceptChannel_get_channel_reserve_satoshis(this_ptr);
14055                 return nativeResponseValue;
14056         }
14057         // void AcceptChannel_set_channel_reserve_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
14058         export function AcceptChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
14059                 if(!isWasmInitialized) {
14060                         throw new Error("initializeWasm() must be awaited first!");
14061                 }
14062                 const nativeResponseValue = wasm.AcceptChannel_set_channel_reserve_satoshis(this_ptr, val);
14063                 // debug statements here
14064         }
14065         // uint64_t AcceptChannel_get_htlc_minimum_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
14066         export function AcceptChannel_get_htlc_minimum_msat(this_ptr: number): number {
14067                 if(!isWasmInitialized) {
14068                         throw new Error("initializeWasm() must be awaited first!");
14069                 }
14070                 const nativeResponseValue = wasm.AcceptChannel_get_htlc_minimum_msat(this_ptr);
14071                 return nativeResponseValue;
14072         }
14073         // void AcceptChannel_set_htlc_minimum_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
14074         export function AcceptChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
14075                 if(!isWasmInitialized) {
14076                         throw new Error("initializeWasm() must be awaited first!");
14077                 }
14078                 const nativeResponseValue = wasm.AcceptChannel_set_htlc_minimum_msat(this_ptr, val);
14079                 // debug statements here
14080         }
14081         // uint32_t AcceptChannel_get_minimum_depth(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
14082         export function AcceptChannel_get_minimum_depth(this_ptr: number): number {
14083                 if(!isWasmInitialized) {
14084                         throw new Error("initializeWasm() must be awaited first!");
14085                 }
14086                 const nativeResponseValue = wasm.AcceptChannel_get_minimum_depth(this_ptr);
14087                 return nativeResponseValue;
14088         }
14089         // void AcceptChannel_set_minimum_depth(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint32_t val);
14090         export function AcceptChannel_set_minimum_depth(this_ptr: number, val: number): void {
14091                 if(!isWasmInitialized) {
14092                         throw new Error("initializeWasm() must be awaited first!");
14093                 }
14094                 const nativeResponseValue = wasm.AcceptChannel_set_minimum_depth(this_ptr, val);
14095                 // debug statements here
14096         }
14097         // uint16_t AcceptChannel_get_to_self_delay(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
14098         export function AcceptChannel_get_to_self_delay(this_ptr: number): number {
14099                 if(!isWasmInitialized) {
14100                         throw new Error("initializeWasm() must be awaited first!");
14101                 }
14102                 const nativeResponseValue = wasm.AcceptChannel_get_to_self_delay(this_ptr);
14103                 return nativeResponseValue;
14104         }
14105         // void AcceptChannel_set_to_self_delay(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
14106         export function AcceptChannel_set_to_self_delay(this_ptr: number, val: number): void {
14107                 if(!isWasmInitialized) {
14108                         throw new Error("initializeWasm() must be awaited first!");
14109                 }
14110                 const nativeResponseValue = wasm.AcceptChannel_set_to_self_delay(this_ptr, val);
14111                 // debug statements here
14112         }
14113         // uint16_t AcceptChannel_get_max_accepted_htlcs(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
14114         export function AcceptChannel_get_max_accepted_htlcs(this_ptr: number): number {
14115                 if(!isWasmInitialized) {
14116                         throw new Error("initializeWasm() must be awaited first!");
14117                 }
14118                 const nativeResponseValue = wasm.AcceptChannel_get_max_accepted_htlcs(this_ptr);
14119                 return nativeResponseValue;
14120         }
14121         // void AcceptChannel_set_max_accepted_htlcs(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
14122         export function AcceptChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
14123                 if(!isWasmInitialized) {
14124                         throw new Error("initializeWasm() must be awaited first!");
14125                 }
14126                 const nativeResponseValue = wasm.AcceptChannel_set_max_accepted_htlcs(this_ptr, val);
14127                 // debug statements here
14128         }
14129         // struct LDKPublicKey AcceptChannel_get_funding_pubkey(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
14130         export function AcceptChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
14131                 if(!isWasmInitialized) {
14132                         throw new Error("initializeWasm() must be awaited first!");
14133                 }
14134                 const nativeResponseValue = wasm.AcceptChannel_get_funding_pubkey(this_ptr);
14135                 return decodeArray(nativeResponseValue);
14136         }
14137         // void AcceptChannel_set_funding_pubkey(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14138         export function AcceptChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
14139                 if(!isWasmInitialized) {
14140                         throw new Error("initializeWasm() must be awaited first!");
14141                 }
14142                 const nativeResponseValue = wasm.AcceptChannel_set_funding_pubkey(this_ptr, encodeArray(val));
14143                 // debug statements here
14144         }
14145         // struct LDKPublicKey AcceptChannel_get_revocation_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
14146         export function AcceptChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
14147                 if(!isWasmInitialized) {
14148                         throw new Error("initializeWasm() must be awaited first!");
14149                 }
14150                 const nativeResponseValue = wasm.AcceptChannel_get_revocation_basepoint(this_ptr);
14151                 return decodeArray(nativeResponseValue);
14152         }
14153         // void AcceptChannel_set_revocation_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14154         export function AcceptChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
14155                 if(!isWasmInitialized) {
14156                         throw new Error("initializeWasm() must be awaited first!");
14157                 }
14158                 const nativeResponseValue = wasm.AcceptChannel_set_revocation_basepoint(this_ptr, encodeArray(val));
14159                 // debug statements here
14160         }
14161         // struct LDKPublicKey AcceptChannel_get_payment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
14162         export function AcceptChannel_get_payment_point(this_ptr: number): Uint8Array {
14163                 if(!isWasmInitialized) {
14164                         throw new Error("initializeWasm() must be awaited first!");
14165                 }
14166                 const nativeResponseValue = wasm.AcceptChannel_get_payment_point(this_ptr);
14167                 return decodeArray(nativeResponseValue);
14168         }
14169         // void AcceptChannel_set_payment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14170         export function AcceptChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
14171                 if(!isWasmInitialized) {
14172                         throw new Error("initializeWasm() must be awaited first!");
14173                 }
14174                 const nativeResponseValue = wasm.AcceptChannel_set_payment_point(this_ptr, encodeArray(val));
14175                 // debug statements here
14176         }
14177         // struct LDKPublicKey AcceptChannel_get_delayed_payment_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
14178         export function AcceptChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
14179                 if(!isWasmInitialized) {
14180                         throw new Error("initializeWasm() must be awaited first!");
14181                 }
14182                 const nativeResponseValue = wasm.AcceptChannel_get_delayed_payment_basepoint(this_ptr);
14183                 return decodeArray(nativeResponseValue);
14184         }
14185         // void AcceptChannel_set_delayed_payment_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14186         export function AcceptChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
14187                 if(!isWasmInitialized) {
14188                         throw new Error("initializeWasm() must be awaited first!");
14189                 }
14190                 const nativeResponseValue = wasm.AcceptChannel_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
14191                 // debug statements here
14192         }
14193         // struct LDKPublicKey AcceptChannel_get_htlc_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
14194         export function AcceptChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
14195                 if(!isWasmInitialized) {
14196                         throw new Error("initializeWasm() must be awaited first!");
14197                 }
14198                 const nativeResponseValue = wasm.AcceptChannel_get_htlc_basepoint(this_ptr);
14199                 return decodeArray(nativeResponseValue);
14200         }
14201         // void AcceptChannel_set_htlc_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14202         export function AcceptChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
14203                 if(!isWasmInitialized) {
14204                         throw new Error("initializeWasm() must be awaited first!");
14205                 }
14206                 const nativeResponseValue = wasm.AcceptChannel_set_htlc_basepoint(this_ptr, encodeArray(val));
14207                 // debug statements here
14208         }
14209         // struct LDKPublicKey AcceptChannel_get_first_per_commitment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
14210         export function AcceptChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
14211                 if(!isWasmInitialized) {
14212                         throw new Error("initializeWasm() must be awaited first!");
14213                 }
14214                 const nativeResponseValue = wasm.AcceptChannel_get_first_per_commitment_point(this_ptr);
14215                 return decodeArray(nativeResponseValue);
14216         }
14217         // void AcceptChannel_set_first_per_commitment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14218         export function AcceptChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
14219                 if(!isWasmInitialized) {
14220                         throw new Error("initializeWasm() must be awaited first!");
14221                 }
14222                 const nativeResponseValue = wasm.AcceptChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
14223                 // debug statements here
14224         }
14225         // uint64_t AcceptChannel_clone_ptr(LDKAcceptChannel *NONNULL_PTR arg);
14226         export function AcceptChannel_clone_ptr(arg: number): number {
14227                 if(!isWasmInitialized) {
14228                         throw new Error("initializeWasm() must be awaited first!");
14229                 }
14230                 const nativeResponseValue = wasm.AcceptChannel_clone_ptr(arg);
14231                 return nativeResponseValue;
14232         }
14233         // struct LDKAcceptChannel AcceptChannel_clone(const struct LDKAcceptChannel *NONNULL_PTR orig);
14234         export function AcceptChannel_clone(orig: number): number {
14235                 if(!isWasmInitialized) {
14236                         throw new Error("initializeWasm() must be awaited first!");
14237                 }
14238                 const nativeResponseValue = wasm.AcceptChannel_clone(orig);
14239                 return nativeResponseValue;
14240         }
14241         // void FundingCreated_free(struct LDKFundingCreated this_obj);
14242         export function FundingCreated_free(this_obj: number): void {
14243                 if(!isWasmInitialized) {
14244                         throw new Error("initializeWasm() must be awaited first!");
14245                 }
14246                 const nativeResponseValue = wasm.FundingCreated_free(this_obj);
14247                 // debug statements here
14248         }
14249         // const uint8_t (*FundingCreated_get_temporary_channel_id(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
14250         export function FundingCreated_get_temporary_channel_id(this_ptr: number): Uint8Array {
14251                 if(!isWasmInitialized) {
14252                         throw new Error("initializeWasm() must be awaited first!");
14253                 }
14254                 const nativeResponseValue = wasm.FundingCreated_get_temporary_channel_id(this_ptr);
14255                 return decodeArray(nativeResponseValue);
14256         }
14257         // void FundingCreated_set_temporary_channel_id(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14258         export function FundingCreated_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
14259                 if(!isWasmInitialized) {
14260                         throw new Error("initializeWasm() must be awaited first!");
14261                 }
14262                 const nativeResponseValue = wasm.FundingCreated_set_temporary_channel_id(this_ptr, encodeArray(val));
14263                 // debug statements here
14264         }
14265         // const uint8_t (*FundingCreated_get_funding_txid(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
14266         export function FundingCreated_get_funding_txid(this_ptr: number): Uint8Array {
14267                 if(!isWasmInitialized) {
14268                         throw new Error("initializeWasm() must be awaited first!");
14269                 }
14270                 const nativeResponseValue = wasm.FundingCreated_get_funding_txid(this_ptr);
14271                 return decodeArray(nativeResponseValue);
14272         }
14273         // void FundingCreated_set_funding_txid(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14274         export function FundingCreated_set_funding_txid(this_ptr: number, val: Uint8Array): void {
14275                 if(!isWasmInitialized) {
14276                         throw new Error("initializeWasm() must be awaited first!");
14277                 }
14278                 const nativeResponseValue = wasm.FundingCreated_set_funding_txid(this_ptr, encodeArray(val));
14279                 // debug statements here
14280         }
14281         // uint16_t FundingCreated_get_funding_output_index(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
14282         export function FundingCreated_get_funding_output_index(this_ptr: number): number {
14283                 if(!isWasmInitialized) {
14284                         throw new Error("initializeWasm() must be awaited first!");
14285                 }
14286                 const nativeResponseValue = wasm.FundingCreated_get_funding_output_index(this_ptr);
14287                 return nativeResponseValue;
14288         }
14289         // void FundingCreated_set_funding_output_index(struct LDKFundingCreated *NONNULL_PTR this_ptr, uint16_t val);
14290         export function FundingCreated_set_funding_output_index(this_ptr: number, val: number): void {
14291                 if(!isWasmInitialized) {
14292                         throw new Error("initializeWasm() must be awaited first!");
14293                 }
14294                 const nativeResponseValue = wasm.FundingCreated_set_funding_output_index(this_ptr, val);
14295                 // debug statements here
14296         }
14297         // struct LDKSignature FundingCreated_get_signature(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
14298         export function FundingCreated_get_signature(this_ptr: number): Uint8Array {
14299                 if(!isWasmInitialized) {
14300                         throw new Error("initializeWasm() must be awaited first!");
14301                 }
14302                 const nativeResponseValue = wasm.FundingCreated_get_signature(this_ptr);
14303                 return decodeArray(nativeResponseValue);
14304         }
14305         // void FundingCreated_set_signature(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKSignature val);
14306         export function FundingCreated_set_signature(this_ptr: number, val: Uint8Array): void {
14307                 if(!isWasmInitialized) {
14308                         throw new Error("initializeWasm() must be awaited first!");
14309                 }
14310                 const nativeResponseValue = wasm.FundingCreated_set_signature(this_ptr, encodeArray(val));
14311                 // debug statements here
14312         }
14313         // 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);
14314         export function FundingCreated_new(temporary_channel_id_arg: Uint8Array, funding_txid_arg: Uint8Array, funding_output_index_arg: number, signature_arg: Uint8Array): number {
14315                 if(!isWasmInitialized) {
14316                         throw new Error("initializeWasm() must be awaited first!");
14317                 }
14318                 const nativeResponseValue = wasm.FundingCreated_new(encodeArray(temporary_channel_id_arg), encodeArray(funding_txid_arg), funding_output_index_arg, encodeArray(signature_arg));
14319                 return nativeResponseValue;
14320         }
14321         // uint64_t FundingCreated_clone_ptr(LDKFundingCreated *NONNULL_PTR arg);
14322         export function FundingCreated_clone_ptr(arg: number): number {
14323                 if(!isWasmInitialized) {
14324                         throw new Error("initializeWasm() must be awaited first!");
14325                 }
14326                 const nativeResponseValue = wasm.FundingCreated_clone_ptr(arg);
14327                 return nativeResponseValue;
14328         }
14329         // struct LDKFundingCreated FundingCreated_clone(const struct LDKFundingCreated *NONNULL_PTR orig);
14330         export function FundingCreated_clone(orig: number): number {
14331                 if(!isWasmInitialized) {
14332                         throw new Error("initializeWasm() must be awaited first!");
14333                 }
14334                 const nativeResponseValue = wasm.FundingCreated_clone(orig);
14335                 return nativeResponseValue;
14336         }
14337         // void FundingSigned_free(struct LDKFundingSigned this_obj);
14338         export function FundingSigned_free(this_obj: number): void {
14339                 if(!isWasmInitialized) {
14340                         throw new Error("initializeWasm() must be awaited first!");
14341                 }
14342                 const nativeResponseValue = wasm.FundingSigned_free(this_obj);
14343                 // debug statements here
14344         }
14345         // const uint8_t (*FundingSigned_get_channel_id(const struct LDKFundingSigned *NONNULL_PTR this_ptr))[32];
14346         export function FundingSigned_get_channel_id(this_ptr: number): Uint8Array {
14347                 if(!isWasmInitialized) {
14348                         throw new Error("initializeWasm() must be awaited first!");
14349                 }
14350                 const nativeResponseValue = wasm.FundingSigned_get_channel_id(this_ptr);
14351                 return decodeArray(nativeResponseValue);
14352         }
14353         // void FundingSigned_set_channel_id(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14354         export function FundingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
14355                 if(!isWasmInitialized) {
14356                         throw new Error("initializeWasm() must be awaited first!");
14357                 }
14358                 const nativeResponseValue = wasm.FundingSigned_set_channel_id(this_ptr, encodeArray(val));
14359                 // debug statements here
14360         }
14361         // struct LDKSignature FundingSigned_get_signature(const struct LDKFundingSigned *NONNULL_PTR this_ptr);
14362         export function FundingSigned_get_signature(this_ptr: number): Uint8Array {
14363                 if(!isWasmInitialized) {
14364                         throw new Error("initializeWasm() must be awaited first!");
14365                 }
14366                 const nativeResponseValue = wasm.FundingSigned_get_signature(this_ptr);
14367                 return decodeArray(nativeResponseValue);
14368         }
14369         // void FundingSigned_set_signature(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
14370         export function FundingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
14371                 if(!isWasmInitialized) {
14372                         throw new Error("initializeWasm() must be awaited first!");
14373                 }
14374                 const nativeResponseValue = wasm.FundingSigned_set_signature(this_ptr, encodeArray(val));
14375                 // debug statements here
14376         }
14377         // MUST_USE_RES struct LDKFundingSigned FundingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg);
14378         export function FundingSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array): number {
14379                 if(!isWasmInitialized) {
14380                         throw new Error("initializeWasm() must be awaited first!");
14381                 }
14382                 const nativeResponseValue = wasm.FundingSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg));
14383                 return nativeResponseValue;
14384         }
14385         // uint64_t FundingSigned_clone_ptr(LDKFundingSigned *NONNULL_PTR arg);
14386         export function FundingSigned_clone_ptr(arg: number): number {
14387                 if(!isWasmInitialized) {
14388                         throw new Error("initializeWasm() must be awaited first!");
14389                 }
14390                 const nativeResponseValue = wasm.FundingSigned_clone_ptr(arg);
14391                 return nativeResponseValue;
14392         }
14393         // struct LDKFundingSigned FundingSigned_clone(const struct LDKFundingSigned *NONNULL_PTR orig);
14394         export function FundingSigned_clone(orig: number): number {
14395                 if(!isWasmInitialized) {
14396                         throw new Error("initializeWasm() must be awaited first!");
14397                 }
14398                 const nativeResponseValue = wasm.FundingSigned_clone(orig);
14399                 return nativeResponseValue;
14400         }
14401         // void FundingLocked_free(struct LDKFundingLocked this_obj);
14402         export function FundingLocked_free(this_obj: number): void {
14403                 if(!isWasmInitialized) {
14404                         throw new Error("initializeWasm() must be awaited first!");
14405                 }
14406                 const nativeResponseValue = wasm.FundingLocked_free(this_obj);
14407                 // debug statements here
14408         }
14409         // const uint8_t (*FundingLocked_get_channel_id(const struct LDKFundingLocked *NONNULL_PTR this_ptr))[32];
14410         export function FundingLocked_get_channel_id(this_ptr: number): Uint8Array {
14411                 if(!isWasmInitialized) {
14412                         throw new Error("initializeWasm() must be awaited first!");
14413                 }
14414                 const nativeResponseValue = wasm.FundingLocked_get_channel_id(this_ptr);
14415                 return decodeArray(nativeResponseValue);
14416         }
14417         // void FundingLocked_set_channel_id(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14418         export function FundingLocked_set_channel_id(this_ptr: number, val: Uint8Array): void {
14419                 if(!isWasmInitialized) {
14420                         throw new Error("initializeWasm() must be awaited first!");
14421                 }
14422                 const nativeResponseValue = wasm.FundingLocked_set_channel_id(this_ptr, encodeArray(val));
14423                 // debug statements here
14424         }
14425         // struct LDKPublicKey FundingLocked_get_next_per_commitment_point(const struct LDKFundingLocked *NONNULL_PTR this_ptr);
14426         export function FundingLocked_get_next_per_commitment_point(this_ptr: number): Uint8Array {
14427                 if(!isWasmInitialized) {
14428                         throw new Error("initializeWasm() must be awaited first!");
14429                 }
14430                 const nativeResponseValue = wasm.FundingLocked_get_next_per_commitment_point(this_ptr);
14431                 return decodeArray(nativeResponseValue);
14432         }
14433         // void FundingLocked_set_next_per_commitment_point(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14434         export function FundingLocked_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
14435                 if(!isWasmInitialized) {
14436                         throw new Error("initializeWasm() must be awaited first!");
14437                 }
14438                 const nativeResponseValue = wasm.FundingLocked_set_next_per_commitment_point(this_ptr, encodeArray(val));
14439                 // debug statements here
14440         }
14441         // MUST_USE_RES struct LDKFundingLocked FundingLocked_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKPublicKey next_per_commitment_point_arg);
14442         export function FundingLocked_new(channel_id_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
14443                 if(!isWasmInitialized) {
14444                         throw new Error("initializeWasm() must be awaited first!");
14445                 }
14446                 const nativeResponseValue = wasm.FundingLocked_new(encodeArray(channel_id_arg), encodeArray(next_per_commitment_point_arg));
14447                 return nativeResponseValue;
14448         }
14449         // uint64_t FundingLocked_clone_ptr(LDKFundingLocked *NONNULL_PTR arg);
14450         export function FundingLocked_clone_ptr(arg: number): number {
14451                 if(!isWasmInitialized) {
14452                         throw new Error("initializeWasm() must be awaited first!");
14453                 }
14454                 const nativeResponseValue = wasm.FundingLocked_clone_ptr(arg);
14455                 return nativeResponseValue;
14456         }
14457         // struct LDKFundingLocked FundingLocked_clone(const struct LDKFundingLocked *NONNULL_PTR orig);
14458         export function FundingLocked_clone(orig: number): number {
14459                 if(!isWasmInitialized) {
14460                         throw new Error("initializeWasm() must be awaited first!");
14461                 }
14462                 const nativeResponseValue = wasm.FundingLocked_clone(orig);
14463                 return nativeResponseValue;
14464         }
14465         // void Shutdown_free(struct LDKShutdown this_obj);
14466         export function Shutdown_free(this_obj: number): void {
14467                 if(!isWasmInitialized) {
14468                         throw new Error("initializeWasm() must be awaited first!");
14469                 }
14470                 const nativeResponseValue = wasm.Shutdown_free(this_obj);
14471                 // debug statements here
14472         }
14473         // const uint8_t (*Shutdown_get_channel_id(const struct LDKShutdown *NONNULL_PTR this_ptr))[32];
14474         export function Shutdown_get_channel_id(this_ptr: number): Uint8Array {
14475                 if(!isWasmInitialized) {
14476                         throw new Error("initializeWasm() must be awaited first!");
14477                 }
14478                 const nativeResponseValue = wasm.Shutdown_get_channel_id(this_ptr);
14479                 return decodeArray(nativeResponseValue);
14480         }
14481         // void Shutdown_set_channel_id(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14482         export function Shutdown_set_channel_id(this_ptr: number, val: Uint8Array): void {
14483                 if(!isWasmInitialized) {
14484                         throw new Error("initializeWasm() must be awaited first!");
14485                 }
14486                 const nativeResponseValue = wasm.Shutdown_set_channel_id(this_ptr, encodeArray(val));
14487                 // debug statements here
14488         }
14489         // struct LDKu8slice Shutdown_get_scriptpubkey(const struct LDKShutdown *NONNULL_PTR this_ptr);
14490         export function Shutdown_get_scriptpubkey(this_ptr: number): Uint8Array {
14491                 if(!isWasmInitialized) {
14492                         throw new Error("initializeWasm() must be awaited first!");
14493                 }
14494                 const nativeResponseValue = wasm.Shutdown_get_scriptpubkey(this_ptr);
14495                 return decodeArray(nativeResponseValue);
14496         }
14497         // void Shutdown_set_scriptpubkey(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
14498         export function Shutdown_set_scriptpubkey(this_ptr: number, val: Uint8Array): void {
14499                 if(!isWasmInitialized) {
14500                         throw new Error("initializeWasm() must be awaited first!");
14501                 }
14502                 const nativeResponseValue = wasm.Shutdown_set_scriptpubkey(this_ptr, encodeArray(val));
14503                 // debug statements here
14504         }
14505         // MUST_USE_RES struct LDKShutdown Shutdown_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z scriptpubkey_arg);
14506         export function Shutdown_new(channel_id_arg: Uint8Array, scriptpubkey_arg: Uint8Array): number {
14507                 if(!isWasmInitialized) {
14508                         throw new Error("initializeWasm() must be awaited first!");
14509                 }
14510                 const nativeResponseValue = wasm.Shutdown_new(encodeArray(channel_id_arg), encodeArray(scriptpubkey_arg));
14511                 return nativeResponseValue;
14512         }
14513         // uint64_t Shutdown_clone_ptr(LDKShutdown *NONNULL_PTR arg);
14514         export function Shutdown_clone_ptr(arg: number): number {
14515                 if(!isWasmInitialized) {
14516                         throw new Error("initializeWasm() must be awaited first!");
14517                 }
14518                 const nativeResponseValue = wasm.Shutdown_clone_ptr(arg);
14519                 return nativeResponseValue;
14520         }
14521         // struct LDKShutdown Shutdown_clone(const struct LDKShutdown *NONNULL_PTR orig);
14522         export function Shutdown_clone(orig: number): number {
14523                 if(!isWasmInitialized) {
14524                         throw new Error("initializeWasm() must be awaited first!");
14525                 }
14526                 const nativeResponseValue = wasm.Shutdown_clone(orig);
14527                 return nativeResponseValue;
14528         }
14529         // void ClosingSignedFeeRange_free(struct LDKClosingSignedFeeRange this_obj);
14530         export function ClosingSignedFeeRange_free(this_obj: number): void {
14531                 if(!isWasmInitialized) {
14532                         throw new Error("initializeWasm() must be awaited first!");
14533                 }
14534                 const nativeResponseValue = wasm.ClosingSignedFeeRange_free(this_obj);
14535                 // debug statements here
14536         }
14537         // uint64_t ClosingSignedFeeRange_get_min_fee_satoshis(const struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr);
14538         export function ClosingSignedFeeRange_get_min_fee_satoshis(this_ptr: number): number {
14539                 if(!isWasmInitialized) {
14540                         throw new Error("initializeWasm() must be awaited first!");
14541                 }
14542                 const nativeResponseValue = wasm.ClosingSignedFeeRange_get_min_fee_satoshis(this_ptr);
14543                 return nativeResponseValue;
14544         }
14545         // void ClosingSignedFeeRange_set_min_fee_satoshis(struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr, uint64_t val);
14546         export function ClosingSignedFeeRange_set_min_fee_satoshis(this_ptr: number, val: number): void {
14547                 if(!isWasmInitialized) {
14548                         throw new Error("initializeWasm() must be awaited first!");
14549                 }
14550                 const nativeResponseValue = wasm.ClosingSignedFeeRange_set_min_fee_satoshis(this_ptr, val);
14551                 // debug statements here
14552         }
14553         // uint64_t ClosingSignedFeeRange_get_max_fee_satoshis(const struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr);
14554         export function ClosingSignedFeeRange_get_max_fee_satoshis(this_ptr: number): number {
14555                 if(!isWasmInitialized) {
14556                         throw new Error("initializeWasm() must be awaited first!");
14557                 }
14558                 const nativeResponseValue = wasm.ClosingSignedFeeRange_get_max_fee_satoshis(this_ptr);
14559                 return nativeResponseValue;
14560         }
14561         // void ClosingSignedFeeRange_set_max_fee_satoshis(struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr, uint64_t val);
14562         export function ClosingSignedFeeRange_set_max_fee_satoshis(this_ptr: number, val: number): void {
14563                 if(!isWasmInitialized) {
14564                         throw new Error("initializeWasm() must be awaited first!");
14565                 }
14566                 const nativeResponseValue = wasm.ClosingSignedFeeRange_set_max_fee_satoshis(this_ptr, val);
14567                 // debug statements here
14568         }
14569         // MUST_USE_RES struct LDKClosingSignedFeeRange ClosingSignedFeeRange_new(uint64_t min_fee_satoshis_arg, uint64_t max_fee_satoshis_arg);
14570         export function ClosingSignedFeeRange_new(min_fee_satoshis_arg: number, max_fee_satoshis_arg: number): number {
14571                 if(!isWasmInitialized) {
14572                         throw new Error("initializeWasm() must be awaited first!");
14573                 }
14574                 const nativeResponseValue = wasm.ClosingSignedFeeRange_new(min_fee_satoshis_arg, max_fee_satoshis_arg);
14575                 return nativeResponseValue;
14576         }
14577         // uint64_t ClosingSignedFeeRange_clone_ptr(LDKClosingSignedFeeRange *NONNULL_PTR arg);
14578         export function ClosingSignedFeeRange_clone_ptr(arg: number): number {
14579                 if(!isWasmInitialized) {
14580                         throw new Error("initializeWasm() must be awaited first!");
14581                 }
14582                 const nativeResponseValue = wasm.ClosingSignedFeeRange_clone_ptr(arg);
14583                 return nativeResponseValue;
14584         }
14585         // struct LDKClosingSignedFeeRange ClosingSignedFeeRange_clone(const struct LDKClosingSignedFeeRange *NONNULL_PTR orig);
14586         export function ClosingSignedFeeRange_clone(orig: number): number {
14587                 if(!isWasmInitialized) {
14588                         throw new Error("initializeWasm() must be awaited first!");
14589                 }
14590                 const nativeResponseValue = wasm.ClosingSignedFeeRange_clone(orig);
14591                 return nativeResponseValue;
14592         }
14593         // void ClosingSigned_free(struct LDKClosingSigned this_obj);
14594         export function ClosingSigned_free(this_obj: number): void {
14595                 if(!isWasmInitialized) {
14596                         throw new Error("initializeWasm() must be awaited first!");
14597                 }
14598                 const nativeResponseValue = wasm.ClosingSigned_free(this_obj);
14599                 // debug statements here
14600         }
14601         // const uint8_t (*ClosingSigned_get_channel_id(const struct LDKClosingSigned *NONNULL_PTR this_ptr))[32];
14602         export function ClosingSigned_get_channel_id(this_ptr: number): Uint8Array {
14603                 if(!isWasmInitialized) {
14604                         throw new Error("initializeWasm() must be awaited first!");
14605                 }
14606                 const nativeResponseValue = wasm.ClosingSigned_get_channel_id(this_ptr);
14607                 return decodeArray(nativeResponseValue);
14608         }
14609         // void ClosingSigned_set_channel_id(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14610         export function ClosingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
14611                 if(!isWasmInitialized) {
14612                         throw new Error("initializeWasm() must be awaited first!");
14613                 }
14614                 const nativeResponseValue = wasm.ClosingSigned_set_channel_id(this_ptr, encodeArray(val));
14615                 // debug statements here
14616         }
14617         // uint64_t ClosingSigned_get_fee_satoshis(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
14618         export function ClosingSigned_get_fee_satoshis(this_ptr: number): number {
14619                 if(!isWasmInitialized) {
14620                         throw new Error("initializeWasm() must be awaited first!");
14621                 }
14622                 const nativeResponseValue = wasm.ClosingSigned_get_fee_satoshis(this_ptr);
14623                 return nativeResponseValue;
14624         }
14625         // void ClosingSigned_set_fee_satoshis(struct LDKClosingSigned *NONNULL_PTR this_ptr, uint64_t val);
14626         export function ClosingSigned_set_fee_satoshis(this_ptr: number, val: number): void {
14627                 if(!isWasmInitialized) {
14628                         throw new Error("initializeWasm() must be awaited first!");
14629                 }
14630                 const nativeResponseValue = wasm.ClosingSigned_set_fee_satoshis(this_ptr, val);
14631                 // debug statements here
14632         }
14633         // struct LDKSignature ClosingSigned_get_signature(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
14634         export function ClosingSigned_get_signature(this_ptr: number): Uint8Array {
14635                 if(!isWasmInitialized) {
14636                         throw new Error("initializeWasm() must be awaited first!");
14637                 }
14638                 const nativeResponseValue = wasm.ClosingSigned_get_signature(this_ptr);
14639                 return decodeArray(nativeResponseValue);
14640         }
14641         // void ClosingSigned_set_signature(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
14642         export function ClosingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
14643                 if(!isWasmInitialized) {
14644                         throw new Error("initializeWasm() must be awaited first!");
14645                 }
14646                 const nativeResponseValue = wasm.ClosingSigned_set_signature(this_ptr, encodeArray(val));
14647                 // debug statements here
14648         }
14649         // struct LDKClosingSignedFeeRange ClosingSigned_get_fee_range(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
14650         export function ClosingSigned_get_fee_range(this_ptr: number): number {
14651                 if(!isWasmInitialized) {
14652                         throw new Error("initializeWasm() must be awaited first!");
14653                 }
14654                 const nativeResponseValue = wasm.ClosingSigned_get_fee_range(this_ptr);
14655                 return nativeResponseValue;
14656         }
14657         // void ClosingSigned_set_fee_range(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKClosingSignedFeeRange val);
14658         export function ClosingSigned_set_fee_range(this_ptr: number, val: number): void {
14659                 if(!isWasmInitialized) {
14660                         throw new Error("initializeWasm() must be awaited first!");
14661                 }
14662                 const nativeResponseValue = wasm.ClosingSigned_set_fee_range(this_ptr, val);
14663                 // debug statements here
14664         }
14665         // MUST_USE_RES struct LDKClosingSigned ClosingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t fee_satoshis_arg, struct LDKSignature signature_arg, struct LDKClosingSignedFeeRange fee_range_arg);
14666         export function ClosingSigned_new(channel_id_arg: Uint8Array, fee_satoshis_arg: number, signature_arg: Uint8Array, fee_range_arg: number): number {
14667                 if(!isWasmInitialized) {
14668                         throw new Error("initializeWasm() must be awaited first!");
14669                 }
14670                 const nativeResponseValue = wasm.ClosingSigned_new(encodeArray(channel_id_arg), fee_satoshis_arg, encodeArray(signature_arg), fee_range_arg);
14671                 return nativeResponseValue;
14672         }
14673         // uint64_t ClosingSigned_clone_ptr(LDKClosingSigned *NONNULL_PTR arg);
14674         export function ClosingSigned_clone_ptr(arg: number): number {
14675                 if(!isWasmInitialized) {
14676                         throw new Error("initializeWasm() must be awaited first!");
14677                 }
14678                 const nativeResponseValue = wasm.ClosingSigned_clone_ptr(arg);
14679                 return nativeResponseValue;
14680         }
14681         // struct LDKClosingSigned ClosingSigned_clone(const struct LDKClosingSigned *NONNULL_PTR orig);
14682         export function ClosingSigned_clone(orig: number): number {
14683                 if(!isWasmInitialized) {
14684                         throw new Error("initializeWasm() must be awaited first!");
14685                 }
14686                 const nativeResponseValue = wasm.ClosingSigned_clone(orig);
14687                 return nativeResponseValue;
14688         }
14689         // void UpdateAddHTLC_free(struct LDKUpdateAddHTLC this_obj);
14690         export function UpdateAddHTLC_free(this_obj: number): void {
14691                 if(!isWasmInitialized) {
14692                         throw new Error("initializeWasm() must be awaited first!");
14693                 }
14694                 const nativeResponseValue = wasm.UpdateAddHTLC_free(this_obj);
14695                 // debug statements here
14696         }
14697         // const uint8_t (*UpdateAddHTLC_get_channel_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
14698         export function UpdateAddHTLC_get_channel_id(this_ptr: number): Uint8Array {
14699                 if(!isWasmInitialized) {
14700                         throw new Error("initializeWasm() must be awaited first!");
14701                 }
14702                 const nativeResponseValue = wasm.UpdateAddHTLC_get_channel_id(this_ptr);
14703                 return decodeArray(nativeResponseValue);
14704         }
14705         // void UpdateAddHTLC_set_channel_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14706         export function UpdateAddHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
14707                 if(!isWasmInitialized) {
14708                         throw new Error("initializeWasm() must be awaited first!");
14709                 }
14710                 const nativeResponseValue = wasm.UpdateAddHTLC_set_channel_id(this_ptr, encodeArray(val));
14711                 // debug statements here
14712         }
14713         // uint64_t UpdateAddHTLC_get_htlc_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
14714         export function UpdateAddHTLC_get_htlc_id(this_ptr: number): number {
14715                 if(!isWasmInitialized) {
14716                         throw new Error("initializeWasm() must be awaited first!");
14717                 }
14718                 const nativeResponseValue = wasm.UpdateAddHTLC_get_htlc_id(this_ptr);
14719                 return nativeResponseValue;
14720         }
14721         // void UpdateAddHTLC_set_htlc_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
14722         export function UpdateAddHTLC_set_htlc_id(this_ptr: number, val: number): void {
14723                 if(!isWasmInitialized) {
14724                         throw new Error("initializeWasm() must be awaited first!");
14725                 }
14726                 const nativeResponseValue = wasm.UpdateAddHTLC_set_htlc_id(this_ptr, val);
14727                 // debug statements here
14728         }
14729         // uint64_t UpdateAddHTLC_get_amount_msat(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
14730         export function UpdateAddHTLC_get_amount_msat(this_ptr: number): number {
14731                 if(!isWasmInitialized) {
14732                         throw new Error("initializeWasm() must be awaited first!");
14733                 }
14734                 const nativeResponseValue = wasm.UpdateAddHTLC_get_amount_msat(this_ptr);
14735                 return nativeResponseValue;
14736         }
14737         // void UpdateAddHTLC_set_amount_msat(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
14738         export function UpdateAddHTLC_set_amount_msat(this_ptr: number, val: number): void {
14739                 if(!isWasmInitialized) {
14740                         throw new Error("initializeWasm() must be awaited first!");
14741                 }
14742                 const nativeResponseValue = wasm.UpdateAddHTLC_set_amount_msat(this_ptr, val);
14743                 // debug statements here
14744         }
14745         // const uint8_t (*UpdateAddHTLC_get_payment_hash(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
14746         export function UpdateAddHTLC_get_payment_hash(this_ptr: number): Uint8Array {
14747                 if(!isWasmInitialized) {
14748                         throw new Error("initializeWasm() must be awaited first!");
14749                 }
14750                 const nativeResponseValue = wasm.UpdateAddHTLC_get_payment_hash(this_ptr);
14751                 return decodeArray(nativeResponseValue);
14752         }
14753         // void UpdateAddHTLC_set_payment_hash(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14754         export function UpdateAddHTLC_set_payment_hash(this_ptr: number, val: Uint8Array): void {
14755                 if(!isWasmInitialized) {
14756                         throw new Error("initializeWasm() must be awaited first!");
14757                 }
14758                 const nativeResponseValue = wasm.UpdateAddHTLC_set_payment_hash(this_ptr, encodeArray(val));
14759                 // debug statements here
14760         }
14761         // uint32_t UpdateAddHTLC_get_cltv_expiry(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
14762         export function UpdateAddHTLC_get_cltv_expiry(this_ptr: number): number {
14763                 if(!isWasmInitialized) {
14764                         throw new Error("initializeWasm() must be awaited first!");
14765                 }
14766                 const nativeResponseValue = wasm.UpdateAddHTLC_get_cltv_expiry(this_ptr);
14767                 return nativeResponseValue;
14768         }
14769         // void UpdateAddHTLC_set_cltv_expiry(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint32_t val);
14770         export function UpdateAddHTLC_set_cltv_expiry(this_ptr: number, val: number): void {
14771                 if(!isWasmInitialized) {
14772                         throw new Error("initializeWasm() must be awaited first!");
14773                 }
14774                 const nativeResponseValue = wasm.UpdateAddHTLC_set_cltv_expiry(this_ptr, val);
14775                 // debug statements here
14776         }
14777         // uint64_t UpdateAddHTLC_clone_ptr(LDKUpdateAddHTLC *NONNULL_PTR arg);
14778         export function UpdateAddHTLC_clone_ptr(arg: number): number {
14779                 if(!isWasmInitialized) {
14780                         throw new Error("initializeWasm() must be awaited first!");
14781                 }
14782                 const nativeResponseValue = wasm.UpdateAddHTLC_clone_ptr(arg);
14783                 return nativeResponseValue;
14784         }
14785         // struct LDKUpdateAddHTLC UpdateAddHTLC_clone(const struct LDKUpdateAddHTLC *NONNULL_PTR orig);
14786         export function UpdateAddHTLC_clone(orig: number): number {
14787                 if(!isWasmInitialized) {
14788                         throw new Error("initializeWasm() must be awaited first!");
14789                 }
14790                 const nativeResponseValue = wasm.UpdateAddHTLC_clone(orig);
14791                 return nativeResponseValue;
14792         }
14793         // void UpdateFulfillHTLC_free(struct LDKUpdateFulfillHTLC this_obj);
14794         export function UpdateFulfillHTLC_free(this_obj: number): void {
14795                 if(!isWasmInitialized) {
14796                         throw new Error("initializeWasm() must be awaited first!");
14797                 }
14798                 const nativeResponseValue = wasm.UpdateFulfillHTLC_free(this_obj);
14799                 // debug statements here
14800         }
14801         // const uint8_t (*UpdateFulfillHTLC_get_channel_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
14802         export function UpdateFulfillHTLC_get_channel_id(this_ptr: number): Uint8Array {
14803                 if(!isWasmInitialized) {
14804                         throw new Error("initializeWasm() must be awaited first!");
14805                 }
14806                 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_channel_id(this_ptr);
14807                 return decodeArray(nativeResponseValue);
14808         }
14809         // void UpdateFulfillHTLC_set_channel_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14810         export function UpdateFulfillHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
14811                 if(!isWasmInitialized) {
14812                         throw new Error("initializeWasm() must be awaited first!");
14813                 }
14814                 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_channel_id(this_ptr, encodeArray(val));
14815                 // debug statements here
14816         }
14817         // uint64_t UpdateFulfillHTLC_get_htlc_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr);
14818         export function UpdateFulfillHTLC_get_htlc_id(this_ptr: number): number {
14819                 if(!isWasmInitialized) {
14820                         throw new Error("initializeWasm() must be awaited first!");
14821                 }
14822                 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_htlc_id(this_ptr);
14823                 return nativeResponseValue;
14824         }
14825         // void UpdateFulfillHTLC_set_htlc_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, uint64_t val);
14826         export function UpdateFulfillHTLC_set_htlc_id(this_ptr: number, val: number): void {
14827                 if(!isWasmInitialized) {
14828                         throw new Error("initializeWasm() must be awaited first!");
14829                 }
14830                 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_htlc_id(this_ptr, val);
14831                 // debug statements here
14832         }
14833         // const uint8_t (*UpdateFulfillHTLC_get_payment_preimage(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
14834         export function UpdateFulfillHTLC_get_payment_preimage(this_ptr: number): Uint8Array {
14835                 if(!isWasmInitialized) {
14836                         throw new Error("initializeWasm() must be awaited first!");
14837                 }
14838                 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_payment_preimage(this_ptr);
14839                 return decodeArray(nativeResponseValue);
14840         }
14841         // void UpdateFulfillHTLC_set_payment_preimage(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14842         export function UpdateFulfillHTLC_set_payment_preimage(this_ptr: number, val: Uint8Array): void {
14843                 if(!isWasmInitialized) {
14844                         throw new Error("initializeWasm() must be awaited first!");
14845                 }
14846                 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_payment_preimage(this_ptr, encodeArray(val));
14847                 // debug statements here
14848         }
14849         // MUST_USE_RES struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t htlc_id_arg, struct LDKThirtyTwoBytes payment_preimage_arg);
14850         export function UpdateFulfillHTLC_new(channel_id_arg: Uint8Array, htlc_id_arg: number, payment_preimage_arg: Uint8Array): number {
14851                 if(!isWasmInitialized) {
14852                         throw new Error("initializeWasm() must be awaited first!");
14853                 }
14854                 const nativeResponseValue = wasm.UpdateFulfillHTLC_new(encodeArray(channel_id_arg), htlc_id_arg, encodeArray(payment_preimage_arg));
14855                 return nativeResponseValue;
14856         }
14857         // uint64_t UpdateFulfillHTLC_clone_ptr(LDKUpdateFulfillHTLC *NONNULL_PTR arg);
14858         export function UpdateFulfillHTLC_clone_ptr(arg: number): number {
14859                 if(!isWasmInitialized) {
14860                         throw new Error("initializeWasm() must be awaited first!");
14861                 }
14862                 const nativeResponseValue = wasm.UpdateFulfillHTLC_clone_ptr(arg);
14863                 return nativeResponseValue;
14864         }
14865         // struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_clone(const struct LDKUpdateFulfillHTLC *NONNULL_PTR orig);
14866         export function UpdateFulfillHTLC_clone(orig: number): number {
14867                 if(!isWasmInitialized) {
14868                         throw new Error("initializeWasm() must be awaited first!");
14869                 }
14870                 const nativeResponseValue = wasm.UpdateFulfillHTLC_clone(orig);
14871                 return nativeResponseValue;
14872         }
14873         // void UpdateFailHTLC_free(struct LDKUpdateFailHTLC this_obj);
14874         export function UpdateFailHTLC_free(this_obj: number): void {
14875                 if(!isWasmInitialized) {
14876                         throw new Error("initializeWasm() must be awaited first!");
14877                 }
14878                 const nativeResponseValue = wasm.UpdateFailHTLC_free(this_obj);
14879                 // debug statements here
14880         }
14881         // const uint8_t (*UpdateFailHTLC_get_channel_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr))[32];
14882         export function UpdateFailHTLC_get_channel_id(this_ptr: number): Uint8Array {
14883                 if(!isWasmInitialized) {
14884                         throw new Error("initializeWasm() must be awaited first!");
14885                 }
14886                 const nativeResponseValue = wasm.UpdateFailHTLC_get_channel_id(this_ptr);
14887                 return decodeArray(nativeResponseValue);
14888         }
14889         // void UpdateFailHTLC_set_channel_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14890         export function UpdateFailHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
14891                 if(!isWasmInitialized) {
14892                         throw new Error("initializeWasm() must be awaited first!");
14893                 }
14894                 const nativeResponseValue = wasm.UpdateFailHTLC_set_channel_id(this_ptr, encodeArray(val));
14895                 // debug statements here
14896         }
14897         // uint64_t UpdateFailHTLC_get_htlc_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr);
14898         export function UpdateFailHTLC_get_htlc_id(this_ptr: number): number {
14899                 if(!isWasmInitialized) {
14900                         throw new Error("initializeWasm() must be awaited first!");
14901                 }
14902                 const nativeResponseValue = wasm.UpdateFailHTLC_get_htlc_id(this_ptr);
14903                 return nativeResponseValue;
14904         }
14905         // void UpdateFailHTLC_set_htlc_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, uint64_t val);
14906         export function UpdateFailHTLC_set_htlc_id(this_ptr: number, val: number): void {
14907                 if(!isWasmInitialized) {
14908                         throw new Error("initializeWasm() must be awaited first!");
14909                 }
14910                 const nativeResponseValue = wasm.UpdateFailHTLC_set_htlc_id(this_ptr, val);
14911                 // debug statements here
14912         }
14913         // uint64_t UpdateFailHTLC_clone_ptr(LDKUpdateFailHTLC *NONNULL_PTR arg);
14914         export function UpdateFailHTLC_clone_ptr(arg: number): number {
14915                 if(!isWasmInitialized) {
14916                         throw new Error("initializeWasm() must be awaited first!");
14917                 }
14918                 const nativeResponseValue = wasm.UpdateFailHTLC_clone_ptr(arg);
14919                 return nativeResponseValue;
14920         }
14921         // struct LDKUpdateFailHTLC UpdateFailHTLC_clone(const struct LDKUpdateFailHTLC *NONNULL_PTR orig);
14922         export function UpdateFailHTLC_clone(orig: number): number {
14923                 if(!isWasmInitialized) {
14924                         throw new Error("initializeWasm() must be awaited first!");
14925                 }
14926                 const nativeResponseValue = wasm.UpdateFailHTLC_clone(orig);
14927                 return nativeResponseValue;
14928         }
14929         // void UpdateFailMalformedHTLC_free(struct LDKUpdateFailMalformedHTLC this_obj);
14930         export function UpdateFailMalformedHTLC_free(this_obj: number): void {
14931                 if(!isWasmInitialized) {
14932                         throw new Error("initializeWasm() must be awaited first!");
14933                 }
14934                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_free(this_obj);
14935                 // debug statements here
14936         }
14937         // const uint8_t (*UpdateFailMalformedHTLC_get_channel_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr))[32];
14938         export function UpdateFailMalformedHTLC_get_channel_id(this_ptr: number): Uint8Array {
14939                 if(!isWasmInitialized) {
14940                         throw new Error("initializeWasm() must be awaited first!");
14941                 }
14942                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_channel_id(this_ptr);
14943                 return decodeArray(nativeResponseValue);
14944         }
14945         // void UpdateFailMalformedHTLC_set_channel_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14946         export function UpdateFailMalformedHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
14947                 if(!isWasmInitialized) {
14948                         throw new Error("initializeWasm() must be awaited first!");
14949                 }
14950                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_channel_id(this_ptr, encodeArray(val));
14951                 // debug statements here
14952         }
14953         // uint64_t UpdateFailMalformedHTLC_get_htlc_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
14954         export function UpdateFailMalformedHTLC_get_htlc_id(this_ptr: number): number {
14955                 if(!isWasmInitialized) {
14956                         throw new Error("initializeWasm() must be awaited first!");
14957                 }
14958                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_htlc_id(this_ptr);
14959                 return nativeResponseValue;
14960         }
14961         // void UpdateFailMalformedHTLC_set_htlc_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint64_t val);
14962         export function UpdateFailMalformedHTLC_set_htlc_id(this_ptr: number, val: number): void {
14963                 if(!isWasmInitialized) {
14964                         throw new Error("initializeWasm() must be awaited first!");
14965                 }
14966                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_htlc_id(this_ptr, val);
14967                 // debug statements here
14968         }
14969         // uint16_t UpdateFailMalformedHTLC_get_failure_code(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
14970         export function UpdateFailMalformedHTLC_get_failure_code(this_ptr: number): number {
14971                 if(!isWasmInitialized) {
14972                         throw new Error("initializeWasm() must be awaited first!");
14973                 }
14974                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_failure_code(this_ptr);
14975                 return nativeResponseValue;
14976         }
14977         // void UpdateFailMalformedHTLC_set_failure_code(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint16_t val);
14978         export function UpdateFailMalformedHTLC_set_failure_code(this_ptr: number, val: number): void {
14979                 if(!isWasmInitialized) {
14980                         throw new Error("initializeWasm() must be awaited first!");
14981                 }
14982                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_failure_code(this_ptr, val);
14983                 // debug statements here
14984         }
14985         // uint64_t UpdateFailMalformedHTLC_clone_ptr(LDKUpdateFailMalformedHTLC *NONNULL_PTR arg);
14986         export function UpdateFailMalformedHTLC_clone_ptr(arg: number): number {
14987                 if(!isWasmInitialized) {
14988                         throw new Error("initializeWasm() must be awaited first!");
14989                 }
14990                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_clone_ptr(arg);
14991                 return nativeResponseValue;
14992         }
14993         // struct LDKUpdateFailMalformedHTLC UpdateFailMalformedHTLC_clone(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR orig);
14994         export function UpdateFailMalformedHTLC_clone(orig: number): number {
14995                 if(!isWasmInitialized) {
14996                         throw new Error("initializeWasm() must be awaited first!");
14997                 }
14998                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_clone(orig);
14999                 return nativeResponseValue;
15000         }
15001         // void CommitmentSigned_free(struct LDKCommitmentSigned this_obj);
15002         export function CommitmentSigned_free(this_obj: number): void {
15003                 if(!isWasmInitialized) {
15004                         throw new Error("initializeWasm() must be awaited first!");
15005                 }
15006                 const nativeResponseValue = wasm.CommitmentSigned_free(this_obj);
15007                 // debug statements here
15008         }
15009         // const uint8_t (*CommitmentSigned_get_channel_id(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr))[32];
15010         export function CommitmentSigned_get_channel_id(this_ptr: number): Uint8Array {
15011                 if(!isWasmInitialized) {
15012                         throw new Error("initializeWasm() must be awaited first!");
15013                 }
15014                 const nativeResponseValue = wasm.CommitmentSigned_get_channel_id(this_ptr);
15015                 return decodeArray(nativeResponseValue);
15016         }
15017         // void CommitmentSigned_set_channel_id(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15018         export function CommitmentSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
15019                 if(!isWasmInitialized) {
15020                         throw new Error("initializeWasm() must be awaited first!");
15021                 }
15022                 const nativeResponseValue = wasm.CommitmentSigned_set_channel_id(this_ptr, encodeArray(val));
15023                 // debug statements here
15024         }
15025         // struct LDKSignature CommitmentSigned_get_signature(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr);
15026         export function CommitmentSigned_get_signature(this_ptr: number): Uint8Array {
15027                 if(!isWasmInitialized) {
15028                         throw new Error("initializeWasm() must be awaited first!");
15029                 }
15030                 const nativeResponseValue = wasm.CommitmentSigned_get_signature(this_ptr);
15031                 return decodeArray(nativeResponseValue);
15032         }
15033         // void CommitmentSigned_set_signature(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
15034         export function CommitmentSigned_set_signature(this_ptr: number, val: Uint8Array): void {
15035                 if(!isWasmInitialized) {
15036                         throw new Error("initializeWasm() must be awaited first!");
15037                 }
15038                 const nativeResponseValue = wasm.CommitmentSigned_set_signature(this_ptr, encodeArray(val));
15039                 // debug statements here
15040         }
15041         // void CommitmentSigned_set_htlc_signatures(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
15042         export function CommitmentSigned_set_htlc_signatures(this_ptr: number, val: Uint8Array[]): void {
15043                 if(!isWasmInitialized) {
15044                         throw new Error("initializeWasm() must be awaited first!");
15045                 }
15046                 const nativeResponseValue = wasm.CommitmentSigned_set_htlc_signatures(this_ptr, val);
15047                 // debug statements here
15048         }
15049         // MUST_USE_RES struct LDKCommitmentSigned CommitmentSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg, struct LDKCVec_SignatureZ htlc_signatures_arg);
15050         export function CommitmentSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array, htlc_signatures_arg: Uint8Array[]): number {
15051                 if(!isWasmInitialized) {
15052                         throw new Error("initializeWasm() must be awaited first!");
15053                 }
15054                 const nativeResponseValue = wasm.CommitmentSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg), htlc_signatures_arg);
15055                 return nativeResponseValue;
15056         }
15057         // uint64_t CommitmentSigned_clone_ptr(LDKCommitmentSigned *NONNULL_PTR arg);
15058         export function CommitmentSigned_clone_ptr(arg: number): number {
15059                 if(!isWasmInitialized) {
15060                         throw new Error("initializeWasm() must be awaited first!");
15061                 }
15062                 const nativeResponseValue = wasm.CommitmentSigned_clone_ptr(arg);
15063                 return nativeResponseValue;
15064         }
15065         // struct LDKCommitmentSigned CommitmentSigned_clone(const struct LDKCommitmentSigned *NONNULL_PTR orig);
15066         export function CommitmentSigned_clone(orig: number): number {
15067                 if(!isWasmInitialized) {
15068                         throw new Error("initializeWasm() must be awaited first!");
15069                 }
15070                 const nativeResponseValue = wasm.CommitmentSigned_clone(orig);
15071                 return nativeResponseValue;
15072         }
15073         // void RevokeAndACK_free(struct LDKRevokeAndACK this_obj);
15074         export function RevokeAndACK_free(this_obj: number): void {
15075                 if(!isWasmInitialized) {
15076                         throw new Error("initializeWasm() must be awaited first!");
15077                 }
15078                 const nativeResponseValue = wasm.RevokeAndACK_free(this_obj);
15079                 // debug statements here
15080         }
15081         // const uint8_t (*RevokeAndACK_get_channel_id(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
15082         export function RevokeAndACK_get_channel_id(this_ptr: number): Uint8Array {
15083                 if(!isWasmInitialized) {
15084                         throw new Error("initializeWasm() must be awaited first!");
15085                 }
15086                 const nativeResponseValue = wasm.RevokeAndACK_get_channel_id(this_ptr);
15087                 return decodeArray(nativeResponseValue);
15088         }
15089         // void RevokeAndACK_set_channel_id(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15090         export function RevokeAndACK_set_channel_id(this_ptr: number, val: Uint8Array): void {
15091                 if(!isWasmInitialized) {
15092                         throw new Error("initializeWasm() must be awaited first!");
15093                 }
15094                 const nativeResponseValue = wasm.RevokeAndACK_set_channel_id(this_ptr, encodeArray(val));
15095                 // debug statements here
15096         }
15097         // const uint8_t (*RevokeAndACK_get_per_commitment_secret(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
15098         export function RevokeAndACK_get_per_commitment_secret(this_ptr: number): Uint8Array {
15099                 if(!isWasmInitialized) {
15100                         throw new Error("initializeWasm() must be awaited first!");
15101                 }
15102                 const nativeResponseValue = wasm.RevokeAndACK_get_per_commitment_secret(this_ptr);
15103                 return decodeArray(nativeResponseValue);
15104         }
15105         // void RevokeAndACK_set_per_commitment_secret(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15106         export function RevokeAndACK_set_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
15107                 if(!isWasmInitialized) {
15108                         throw new Error("initializeWasm() must be awaited first!");
15109                 }
15110                 const nativeResponseValue = wasm.RevokeAndACK_set_per_commitment_secret(this_ptr, encodeArray(val));
15111                 // debug statements here
15112         }
15113         // struct LDKPublicKey RevokeAndACK_get_next_per_commitment_point(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr);
15114         export function RevokeAndACK_get_next_per_commitment_point(this_ptr: number): Uint8Array {
15115                 if(!isWasmInitialized) {
15116                         throw new Error("initializeWasm() must be awaited first!");
15117                 }
15118                 const nativeResponseValue = wasm.RevokeAndACK_get_next_per_commitment_point(this_ptr);
15119                 return decodeArray(nativeResponseValue);
15120         }
15121         // void RevokeAndACK_set_next_per_commitment_point(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKPublicKey val);
15122         export function RevokeAndACK_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
15123                 if(!isWasmInitialized) {
15124                         throw new Error("initializeWasm() must be awaited first!");
15125                 }
15126                 const nativeResponseValue = wasm.RevokeAndACK_set_next_per_commitment_point(this_ptr, encodeArray(val));
15127                 // debug statements here
15128         }
15129         // 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);
15130         export function RevokeAndACK_new(channel_id_arg: Uint8Array, per_commitment_secret_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
15131                 if(!isWasmInitialized) {
15132                         throw new Error("initializeWasm() must be awaited first!");
15133                 }
15134                 const nativeResponseValue = wasm.RevokeAndACK_new(encodeArray(channel_id_arg), encodeArray(per_commitment_secret_arg), encodeArray(next_per_commitment_point_arg));
15135                 return nativeResponseValue;
15136         }
15137         // uint64_t RevokeAndACK_clone_ptr(LDKRevokeAndACK *NONNULL_PTR arg);
15138         export function RevokeAndACK_clone_ptr(arg: number): number {
15139                 if(!isWasmInitialized) {
15140                         throw new Error("initializeWasm() must be awaited first!");
15141                 }
15142                 const nativeResponseValue = wasm.RevokeAndACK_clone_ptr(arg);
15143                 return nativeResponseValue;
15144         }
15145         // struct LDKRevokeAndACK RevokeAndACK_clone(const struct LDKRevokeAndACK *NONNULL_PTR orig);
15146         export function RevokeAndACK_clone(orig: number): number {
15147                 if(!isWasmInitialized) {
15148                         throw new Error("initializeWasm() must be awaited first!");
15149                 }
15150                 const nativeResponseValue = wasm.RevokeAndACK_clone(orig);
15151                 return nativeResponseValue;
15152         }
15153         // void UpdateFee_free(struct LDKUpdateFee this_obj);
15154         export function UpdateFee_free(this_obj: number): void {
15155                 if(!isWasmInitialized) {
15156                         throw new Error("initializeWasm() must be awaited first!");
15157                 }
15158                 const nativeResponseValue = wasm.UpdateFee_free(this_obj);
15159                 // debug statements here
15160         }
15161         // const uint8_t (*UpdateFee_get_channel_id(const struct LDKUpdateFee *NONNULL_PTR this_ptr))[32];
15162         export function UpdateFee_get_channel_id(this_ptr: number): Uint8Array {
15163                 if(!isWasmInitialized) {
15164                         throw new Error("initializeWasm() must be awaited first!");
15165                 }
15166                 const nativeResponseValue = wasm.UpdateFee_get_channel_id(this_ptr);
15167                 return decodeArray(nativeResponseValue);
15168         }
15169         // void UpdateFee_set_channel_id(struct LDKUpdateFee *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15170         export function UpdateFee_set_channel_id(this_ptr: number, val: Uint8Array): void {
15171                 if(!isWasmInitialized) {
15172                         throw new Error("initializeWasm() must be awaited first!");
15173                 }
15174                 const nativeResponseValue = wasm.UpdateFee_set_channel_id(this_ptr, encodeArray(val));
15175                 // debug statements here
15176         }
15177         // uint32_t UpdateFee_get_feerate_per_kw(const struct LDKUpdateFee *NONNULL_PTR this_ptr);
15178         export function UpdateFee_get_feerate_per_kw(this_ptr: number): number {
15179                 if(!isWasmInitialized) {
15180                         throw new Error("initializeWasm() must be awaited first!");
15181                 }
15182                 const nativeResponseValue = wasm.UpdateFee_get_feerate_per_kw(this_ptr);
15183                 return nativeResponseValue;
15184         }
15185         // void UpdateFee_set_feerate_per_kw(struct LDKUpdateFee *NONNULL_PTR this_ptr, uint32_t val);
15186         export function UpdateFee_set_feerate_per_kw(this_ptr: number, val: number): void {
15187                 if(!isWasmInitialized) {
15188                         throw new Error("initializeWasm() must be awaited first!");
15189                 }
15190                 const nativeResponseValue = wasm.UpdateFee_set_feerate_per_kw(this_ptr, val);
15191                 // debug statements here
15192         }
15193         // MUST_USE_RES struct LDKUpdateFee UpdateFee_new(struct LDKThirtyTwoBytes channel_id_arg, uint32_t feerate_per_kw_arg);
15194         export function UpdateFee_new(channel_id_arg: Uint8Array, feerate_per_kw_arg: number): number {
15195                 if(!isWasmInitialized) {
15196                         throw new Error("initializeWasm() must be awaited first!");
15197                 }
15198                 const nativeResponseValue = wasm.UpdateFee_new(encodeArray(channel_id_arg), feerate_per_kw_arg);
15199                 return nativeResponseValue;
15200         }
15201         // uint64_t UpdateFee_clone_ptr(LDKUpdateFee *NONNULL_PTR arg);
15202         export function UpdateFee_clone_ptr(arg: number): number {
15203                 if(!isWasmInitialized) {
15204                         throw new Error("initializeWasm() must be awaited first!");
15205                 }
15206                 const nativeResponseValue = wasm.UpdateFee_clone_ptr(arg);
15207                 return nativeResponseValue;
15208         }
15209         // struct LDKUpdateFee UpdateFee_clone(const struct LDKUpdateFee *NONNULL_PTR orig);
15210         export function UpdateFee_clone(orig: number): number {
15211                 if(!isWasmInitialized) {
15212                         throw new Error("initializeWasm() must be awaited first!");
15213                 }
15214                 const nativeResponseValue = wasm.UpdateFee_clone(orig);
15215                 return nativeResponseValue;
15216         }
15217         // void DataLossProtect_free(struct LDKDataLossProtect this_obj);
15218         export function DataLossProtect_free(this_obj: number): void {
15219                 if(!isWasmInitialized) {
15220                         throw new Error("initializeWasm() must be awaited first!");
15221                 }
15222                 const nativeResponseValue = wasm.DataLossProtect_free(this_obj);
15223                 // debug statements here
15224         }
15225         // const uint8_t (*DataLossProtect_get_your_last_per_commitment_secret(const struct LDKDataLossProtect *NONNULL_PTR this_ptr))[32];
15226         export function DataLossProtect_get_your_last_per_commitment_secret(this_ptr: number): Uint8Array {
15227                 if(!isWasmInitialized) {
15228                         throw new Error("initializeWasm() must be awaited first!");
15229                 }
15230                 const nativeResponseValue = wasm.DataLossProtect_get_your_last_per_commitment_secret(this_ptr);
15231                 return decodeArray(nativeResponseValue);
15232         }
15233         // void DataLossProtect_set_your_last_per_commitment_secret(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15234         export function DataLossProtect_set_your_last_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
15235                 if(!isWasmInitialized) {
15236                         throw new Error("initializeWasm() must be awaited first!");
15237                 }
15238                 const nativeResponseValue = wasm.DataLossProtect_set_your_last_per_commitment_secret(this_ptr, encodeArray(val));
15239                 // debug statements here
15240         }
15241         // struct LDKPublicKey DataLossProtect_get_my_current_per_commitment_point(const struct LDKDataLossProtect *NONNULL_PTR this_ptr);
15242         export function DataLossProtect_get_my_current_per_commitment_point(this_ptr: number): Uint8Array {
15243                 if(!isWasmInitialized) {
15244                         throw new Error("initializeWasm() must be awaited first!");
15245                 }
15246                 const nativeResponseValue = wasm.DataLossProtect_get_my_current_per_commitment_point(this_ptr);
15247                 return decodeArray(nativeResponseValue);
15248         }
15249         // void DataLossProtect_set_my_current_per_commitment_point(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKPublicKey val);
15250         export function DataLossProtect_set_my_current_per_commitment_point(this_ptr: number, val: Uint8Array): void {
15251                 if(!isWasmInitialized) {
15252                         throw new Error("initializeWasm() must be awaited first!");
15253                 }
15254                 const nativeResponseValue = wasm.DataLossProtect_set_my_current_per_commitment_point(this_ptr, encodeArray(val));
15255                 // debug statements here
15256         }
15257         // MUST_USE_RES struct LDKDataLossProtect DataLossProtect_new(struct LDKThirtyTwoBytes your_last_per_commitment_secret_arg, struct LDKPublicKey my_current_per_commitment_point_arg);
15258         export function DataLossProtect_new(your_last_per_commitment_secret_arg: Uint8Array, my_current_per_commitment_point_arg: Uint8Array): number {
15259                 if(!isWasmInitialized) {
15260                         throw new Error("initializeWasm() must be awaited first!");
15261                 }
15262                 const nativeResponseValue = wasm.DataLossProtect_new(encodeArray(your_last_per_commitment_secret_arg), encodeArray(my_current_per_commitment_point_arg));
15263                 return nativeResponseValue;
15264         }
15265         // uint64_t DataLossProtect_clone_ptr(LDKDataLossProtect *NONNULL_PTR arg);
15266         export function DataLossProtect_clone_ptr(arg: number): number {
15267                 if(!isWasmInitialized) {
15268                         throw new Error("initializeWasm() must be awaited first!");
15269                 }
15270                 const nativeResponseValue = wasm.DataLossProtect_clone_ptr(arg);
15271                 return nativeResponseValue;
15272         }
15273         // struct LDKDataLossProtect DataLossProtect_clone(const struct LDKDataLossProtect *NONNULL_PTR orig);
15274         export function DataLossProtect_clone(orig: number): number {
15275                 if(!isWasmInitialized) {
15276                         throw new Error("initializeWasm() must be awaited first!");
15277                 }
15278                 const nativeResponseValue = wasm.DataLossProtect_clone(orig);
15279                 return nativeResponseValue;
15280         }
15281         // void ChannelReestablish_free(struct LDKChannelReestablish this_obj);
15282         export function ChannelReestablish_free(this_obj: number): void {
15283                 if(!isWasmInitialized) {
15284                         throw new Error("initializeWasm() must be awaited first!");
15285                 }
15286                 const nativeResponseValue = wasm.ChannelReestablish_free(this_obj);
15287                 // debug statements here
15288         }
15289         // const uint8_t (*ChannelReestablish_get_channel_id(const struct LDKChannelReestablish *NONNULL_PTR this_ptr))[32];
15290         export function ChannelReestablish_get_channel_id(this_ptr: number): Uint8Array {
15291                 if(!isWasmInitialized) {
15292                         throw new Error("initializeWasm() must be awaited first!");
15293                 }
15294                 const nativeResponseValue = wasm.ChannelReestablish_get_channel_id(this_ptr);
15295                 return decodeArray(nativeResponseValue);
15296         }
15297         // void ChannelReestablish_set_channel_id(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15298         export function ChannelReestablish_set_channel_id(this_ptr: number, val: Uint8Array): void {
15299                 if(!isWasmInitialized) {
15300                         throw new Error("initializeWasm() must be awaited first!");
15301                 }
15302                 const nativeResponseValue = wasm.ChannelReestablish_set_channel_id(this_ptr, encodeArray(val));
15303                 // debug statements here
15304         }
15305         // uint64_t ChannelReestablish_get_next_local_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
15306         export function ChannelReestablish_get_next_local_commitment_number(this_ptr: number): number {
15307                 if(!isWasmInitialized) {
15308                         throw new Error("initializeWasm() must be awaited first!");
15309                 }
15310                 const nativeResponseValue = wasm.ChannelReestablish_get_next_local_commitment_number(this_ptr);
15311                 return nativeResponseValue;
15312         }
15313         // void ChannelReestablish_set_next_local_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
15314         export function ChannelReestablish_set_next_local_commitment_number(this_ptr: number, val: number): void {
15315                 if(!isWasmInitialized) {
15316                         throw new Error("initializeWasm() must be awaited first!");
15317                 }
15318                 const nativeResponseValue = wasm.ChannelReestablish_set_next_local_commitment_number(this_ptr, val);
15319                 // debug statements here
15320         }
15321         // uint64_t ChannelReestablish_get_next_remote_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
15322         export function ChannelReestablish_get_next_remote_commitment_number(this_ptr: number): number {
15323                 if(!isWasmInitialized) {
15324                         throw new Error("initializeWasm() must be awaited first!");
15325                 }
15326                 const nativeResponseValue = wasm.ChannelReestablish_get_next_remote_commitment_number(this_ptr);
15327                 return nativeResponseValue;
15328         }
15329         // void ChannelReestablish_set_next_remote_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
15330         export function ChannelReestablish_set_next_remote_commitment_number(this_ptr: number, val: number): void {
15331                 if(!isWasmInitialized) {
15332                         throw new Error("initializeWasm() must be awaited first!");
15333                 }
15334                 const nativeResponseValue = wasm.ChannelReestablish_set_next_remote_commitment_number(this_ptr, val);
15335                 // debug statements here
15336         }
15337         // uint64_t ChannelReestablish_clone_ptr(LDKChannelReestablish *NONNULL_PTR arg);
15338         export function ChannelReestablish_clone_ptr(arg: number): number {
15339                 if(!isWasmInitialized) {
15340                         throw new Error("initializeWasm() must be awaited first!");
15341                 }
15342                 const nativeResponseValue = wasm.ChannelReestablish_clone_ptr(arg);
15343                 return nativeResponseValue;
15344         }
15345         // struct LDKChannelReestablish ChannelReestablish_clone(const struct LDKChannelReestablish *NONNULL_PTR orig);
15346         export function ChannelReestablish_clone(orig: number): number {
15347                 if(!isWasmInitialized) {
15348                         throw new Error("initializeWasm() must be awaited first!");
15349                 }
15350                 const nativeResponseValue = wasm.ChannelReestablish_clone(orig);
15351                 return nativeResponseValue;
15352         }
15353         // void AnnouncementSignatures_free(struct LDKAnnouncementSignatures this_obj);
15354         export function AnnouncementSignatures_free(this_obj: number): void {
15355                 if(!isWasmInitialized) {
15356                         throw new Error("initializeWasm() must be awaited first!");
15357                 }
15358                 const nativeResponseValue = wasm.AnnouncementSignatures_free(this_obj);
15359                 // debug statements here
15360         }
15361         // const uint8_t (*AnnouncementSignatures_get_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr))[32];
15362         export function AnnouncementSignatures_get_channel_id(this_ptr: number): Uint8Array {
15363                 if(!isWasmInitialized) {
15364                         throw new Error("initializeWasm() must be awaited first!");
15365                 }
15366                 const nativeResponseValue = wasm.AnnouncementSignatures_get_channel_id(this_ptr);
15367                 return decodeArray(nativeResponseValue);
15368         }
15369         // void AnnouncementSignatures_set_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15370         export function AnnouncementSignatures_set_channel_id(this_ptr: number, val: Uint8Array): void {
15371                 if(!isWasmInitialized) {
15372                         throw new Error("initializeWasm() must be awaited first!");
15373                 }
15374                 const nativeResponseValue = wasm.AnnouncementSignatures_set_channel_id(this_ptr, encodeArray(val));
15375                 // debug statements here
15376         }
15377         // uint64_t AnnouncementSignatures_get_short_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
15378         export function AnnouncementSignatures_get_short_channel_id(this_ptr: number): number {
15379                 if(!isWasmInitialized) {
15380                         throw new Error("initializeWasm() must be awaited first!");
15381                 }
15382                 const nativeResponseValue = wasm.AnnouncementSignatures_get_short_channel_id(this_ptr);
15383                 return nativeResponseValue;
15384         }
15385         // void AnnouncementSignatures_set_short_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, uint64_t val);
15386         export function AnnouncementSignatures_set_short_channel_id(this_ptr: number, val: number): void {
15387                 if(!isWasmInitialized) {
15388                         throw new Error("initializeWasm() must be awaited first!");
15389                 }
15390                 const nativeResponseValue = wasm.AnnouncementSignatures_set_short_channel_id(this_ptr, val);
15391                 // debug statements here
15392         }
15393         // struct LDKSignature AnnouncementSignatures_get_node_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
15394         export function AnnouncementSignatures_get_node_signature(this_ptr: number): Uint8Array {
15395                 if(!isWasmInitialized) {
15396                         throw new Error("initializeWasm() must be awaited first!");
15397                 }
15398                 const nativeResponseValue = wasm.AnnouncementSignatures_get_node_signature(this_ptr);
15399                 return decodeArray(nativeResponseValue);
15400         }
15401         // void AnnouncementSignatures_set_node_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
15402         export function AnnouncementSignatures_set_node_signature(this_ptr: number, val: Uint8Array): void {
15403                 if(!isWasmInitialized) {
15404                         throw new Error("initializeWasm() must be awaited first!");
15405                 }
15406                 const nativeResponseValue = wasm.AnnouncementSignatures_set_node_signature(this_ptr, encodeArray(val));
15407                 // debug statements here
15408         }
15409         // struct LDKSignature AnnouncementSignatures_get_bitcoin_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
15410         export function AnnouncementSignatures_get_bitcoin_signature(this_ptr: number): Uint8Array {
15411                 if(!isWasmInitialized) {
15412                         throw new Error("initializeWasm() must be awaited first!");
15413                 }
15414                 const nativeResponseValue = wasm.AnnouncementSignatures_get_bitcoin_signature(this_ptr);
15415                 return decodeArray(nativeResponseValue);
15416         }
15417         // void AnnouncementSignatures_set_bitcoin_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
15418         export function AnnouncementSignatures_set_bitcoin_signature(this_ptr: number, val: Uint8Array): void {
15419                 if(!isWasmInitialized) {
15420                         throw new Error("initializeWasm() must be awaited first!");
15421                 }
15422                 const nativeResponseValue = wasm.AnnouncementSignatures_set_bitcoin_signature(this_ptr, encodeArray(val));
15423                 // debug statements here
15424         }
15425         // 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);
15426         export function AnnouncementSignatures_new(channel_id_arg: Uint8Array, short_channel_id_arg: number, node_signature_arg: Uint8Array, bitcoin_signature_arg: Uint8Array): number {
15427                 if(!isWasmInitialized) {
15428                         throw new Error("initializeWasm() must be awaited first!");
15429                 }
15430                 const nativeResponseValue = wasm.AnnouncementSignatures_new(encodeArray(channel_id_arg), short_channel_id_arg, encodeArray(node_signature_arg), encodeArray(bitcoin_signature_arg));
15431                 return nativeResponseValue;
15432         }
15433         // uint64_t AnnouncementSignatures_clone_ptr(LDKAnnouncementSignatures *NONNULL_PTR arg);
15434         export function AnnouncementSignatures_clone_ptr(arg: number): number {
15435                 if(!isWasmInitialized) {
15436                         throw new Error("initializeWasm() must be awaited first!");
15437                 }
15438                 const nativeResponseValue = wasm.AnnouncementSignatures_clone_ptr(arg);
15439                 return nativeResponseValue;
15440         }
15441         // struct LDKAnnouncementSignatures AnnouncementSignatures_clone(const struct LDKAnnouncementSignatures *NONNULL_PTR orig);
15442         export function AnnouncementSignatures_clone(orig: number): number {
15443                 if(!isWasmInitialized) {
15444                         throw new Error("initializeWasm() must be awaited first!");
15445                 }
15446                 const nativeResponseValue = wasm.AnnouncementSignatures_clone(orig);
15447                 return nativeResponseValue;
15448         }
15449         // void NetAddress_free(struct LDKNetAddress this_ptr);
15450         export function NetAddress_free(this_ptr: number): void {
15451                 if(!isWasmInitialized) {
15452                         throw new Error("initializeWasm() must be awaited first!");
15453                 }
15454                 const nativeResponseValue = wasm.NetAddress_free(this_ptr);
15455                 // debug statements here
15456         }
15457         // uint64_t NetAddress_clone_ptr(LDKNetAddress *NONNULL_PTR arg);
15458         export function NetAddress_clone_ptr(arg: number): number {
15459                 if(!isWasmInitialized) {
15460                         throw new Error("initializeWasm() must be awaited first!");
15461                 }
15462                 const nativeResponseValue = wasm.NetAddress_clone_ptr(arg);
15463                 return nativeResponseValue;
15464         }
15465         // struct LDKNetAddress NetAddress_clone(const struct LDKNetAddress *NONNULL_PTR orig);
15466         export function NetAddress_clone(orig: number): number {
15467                 if(!isWasmInitialized) {
15468                         throw new Error("initializeWasm() must be awaited first!");
15469                 }
15470                 const nativeResponseValue = wasm.NetAddress_clone(orig);
15471                 return nativeResponseValue;
15472         }
15473         // struct LDKNetAddress NetAddress_ipv4(struct LDKFourBytes addr, uint16_t port);
15474         export function NetAddress_ipv4(addr: Uint8Array, port: number): number {
15475                 if(!isWasmInitialized) {
15476                         throw new Error("initializeWasm() must be awaited first!");
15477                 }
15478                 const nativeResponseValue = wasm.NetAddress_ipv4(encodeArray(addr), port);
15479                 return nativeResponseValue;
15480         }
15481         // struct LDKNetAddress NetAddress_ipv6(struct LDKSixteenBytes addr, uint16_t port);
15482         export function NetAddress_ipv6(addr: Uint8Array, port: number): number {
15483                 if(!isWasmInitialized) {
15484                         throw new Error("initializeWasm() must be awaited first!");
15485                 }
15486                 const nativeResponseValue = wasm.NetAddress_ipv6(encodeArray(addr), port);
15487                 return nativeResponseValue;
15488         }
15489         // struct LDKNetAddress NetAddress_onion_v2(struct LDKTwelveBytes a);
15490         export function NetAddress_onion_v2(a: Uint8Array): number {
15491                 if(!isWasmInitialized) {
15492                         throw new Error("initializeWasm() must be awaited first!");
15493                 }
15494                 const nativeResponseValue = wasm.NetAddress_onion_v2(encodeArray(a));
15495                 return nativeResponseValue;
15496         }
15497         // struct LDKNetAddress NetAddress_onion_v3(struct LDKThirtyTwoBytes ed25519_pubkey, uint16_t checksum, uint8_t version, uint16_t port);
15498         export function NetAddress_onion_v3(ed25519_pubkey: Uint8Array, checksum: number, version: number, port: number): number {
15499                 if(!isWasmInitialized) {
15500                         throw new Error("initializeWasm() must be awaited first!");
15501                 }
15502                 const nativeResponseValue = wasm.NetAddress_onion_v3(encodeArray(ed25519_pubkey), checksum, version, port);
15503                 return nativeResponseValue;
15504         }
15505         // struct LDKCVec_u8Z NetAddress_write(const struct LDKNetAddress *NONNULL_PTR obj);
15506         export function NetAddress_write(obj: number): Uint8Array {
15507                 if(!isWasmInitialized) {
15508                         throw new Error("initializeWasm() must be awaited first!");
15509                 }
15510                 const nativeResponseValue = wasm.NetAddress_write(obj);
15511                 return decodeArray(nativeResponseValue);
15512         }
15513         // struct LDKCResult_NetAddressDecodeErrorZ NetAddress_read(struct LDKu8slice ser);
15514         export function NetAddress_read(ser: Uint8Array): number {
15515                 if(!isWasmInitialized) {
15516                         throw new Error("initializeWasm() must be awaited first!");
15517                 }
15518                 const nativeResponseValue = wasm.NetAddress_read(encodeArray(ser));
15519                 return nativeResponseValue;
15520         }
15521         // void UnsignedNodeAnnouncement_free(struct LDKUnsignedNodeAnnouncement this_obj);
15522         export function UnsignedNodeAnnouncement_free(this_obj: number): void {
15523                 if(!isWasmInitialized) {
15524                         throw new Error("initializeWasm() must be awaited first!");
15525                 }
15526                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_free(this_obj);
15527                 // debug statements here
15528         }
15529         // struct LDKNodeFeatures UnsignedNodeAnnouncement_get_features(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
15530         export function UnsignedNodeAnnouncement_get_features(this_ptr: number): number {
15531                 if(!isWasmInitialized) {
15532                         throw new Error("initializeWasm() must be awaited first!");
15533                 }
15534                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_features(this_ptr);
15535                 return nativeResponseValue;
15536         }
15537         // void UnsignedNodeAnnouncement_set_features(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
15538         export function UnsignedNodeAnnouncement_set_features(this_ptr: number, val: number): void {
15539                 if(!isWasmInitialized) {
15540                         throw new Error("initializeWasm() must be awaited first!");
15541                 }
15542                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_features(this_ptr, val);
15543                 // debug statements here
15544         }
15545         // uint32_t UnsignedNodeAnnouncement_get_timestamp(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
15546         export function UnsignedNodeAnnouncement_get_timestamp(this_ptr: number): number {
15547                 if(!isWasmInitialized) {
15548                         throw new Error("initializeWasm() must be awaited first!");
15549                 }
15550                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_timestamp(this_ptr);
15551                 return nativeResponseValue;
15552         }
15553         // void UnsignedNodeAnnouncement_set_timestamp(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, uint32_t val);
15554         export function UnsignedNodeAnnouncement_set_timestamp(this_ptr: number, val: number): void {
15555                 if(!isWasmInitialized) {
15556                         throw new Error("initializeWasm() must be awaited first!");
15557                 }
15558                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_timestamp(this_ptr, val);
15559                 // debug statements here
15560         }
15561         // struct LDKPublicKey UnsignedNodeAnnouncement_get_node_id(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
15562         export function UnsignedNodeAnnouncement_get_node_id(this_ptr: number): Uint8Array {
15563                 if(!isWasmInitialized) {
15564                         throw new Error("initializeWasm() must be awaited first!");
15565                 }
15566                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_node_id(this_ptr);
15567                 return decodeArray(nativeResponseValue);
15568         }
15569         // void UnsignedNodeAnnouncement_set_node_id(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
15570         export function UnsignedNodeAnnouncement_set_node_id(this_ptr: number, val: Uint8Array): void {
15571                 if(!isWasmInitialized) {
15572                         throw new Error("initializeWasm() must be awaited first!");
15573                 }
15574                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_node_id(this_ptr, encodeArray(val));
15575                 // debug statements here
15576         }
15577         // const uint8_t (*UnsignedNodeAnnouncement_get_rgb(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[3];
15578         export function UnsignedNodeAnnouncement_get_rgb(this_ptr: number): Uint8Array {
15579                 if(!isWasmInitialized) {
15580                         throw new Error("initializeWasm() must be awaited first!");
15581                 }
15582                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_rgb(this_ptr);
15583                 return decodeArray(nativeResponseValue);
15584         }
15585         // void UnsignedNodeAnnouncement_set_rgb(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
15586         export function UnsignedNodeAnnouncement_set_rgb(this_ptr: number, val: Uint8Array): void {
15587                 if(!isWasmInitialized) {
15588                         throw new Error("initializeWasm() must be awaited first!");
15589                 }
15590                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_rgb(this_ptr, encodeArray(val));
15591                 // debug statements here
15592         }
15593         // const uint8_t (*UnsignedNodeAnnouncement_get_alias(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[32];
15594         export function UnsignedNodeAnnouncement_get_alias(this_ptr: number): Uint8Array {
15595                 if(!isWasmInitialized) {
15596                         throw new Error("initializeWasm() must be awaited first!");
15597                 }
15598                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_alias(this_ptr);
15599                 return decodeArray(nativeResponseValue);
15600         }
15601         // void UnsignedNodeAnnouncement_set_alias(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15602         export function UnsignedNodeAnnouncement_set_alias(this_ptr: number, val: Uint8Array): void {
15603                 if(!isWasmInitialized) {
15604                         throw new Error("initializeWasm() must be awaited first!");
15605                 }
15606                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_alias(this_ptr, encodeArray(val));
15607                 // debug statements here
15608         }
15609         // void UnsignedNodeAnnouncement_set_addresses(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
15610         export function UnsignedNodeAnnouncement_set_addresses(this_ptr: number, val: number[]): void {
15611                 if(!isWasmInitialized) {
15612                         throw new Error("initializeWasm() must be awaited first!");
15613                 }
15614                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_addresses(this_ptr, val);
15615                 // debug statements here
15616         }
15617         // uint64_t UnsignedNodeAnnouncement_clone_ptr(LDKUnsignedNodeAnnouncement *NONNULL_PTR arg);
15618         export function UnsignedNodeAnnouncement_clone_ptr(arg: number): number {
15619                 if(!isWasmInitialized) {
15620                         throw new Error("initializeWasm() must be awaited first!");
15621                 }
15622                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_clone_ptr(arg);
15623                 return nativeResponseValue;
15624         }
15625         // struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_clone(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR orig);
15626         export function UnsignedNodeAnnouncement_clone(orig: number): number {
15627                 if(!isWasmInitialized) {
15628                         throw new Error("initializeWasm() must be awaited first!");
15629                 }
15630                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_clone(orig);
15631                 return nativeResponseValue;
15632         }
15633         // void NodeAnnouncement_free(struct LDKNodeAnnouncement this_obj);
15634         export function NodeAnnouncement_free(this_obj: number): void {
15635                 if(!isWasmInitialized) {
15636                         throw new Error("initializeWasm() must be awaited first!");
15637                 }
15638                 const nativeResponseValue = wasm.NodeAnnouncement_free(this_obj);
15639                 // debug statements here
15640         }
15641         // struct LDKSignature NodeAnnouncement_get_signature(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
15642         export function NodeAnnouncement_get_signature(this_ptr: number): Uint8Array {
15643                 if(!isWasmInitialized) {
15644                         throw new Error("initializeWasm() must be awaited first!");
15645                 }
15646                 const nativeResponseValue = wasm.NodeAnnouncement_get_signature(this_ptr);
15647                 return decodeArray(nativeResponseValue);
15648         }
15649         // void NodeAnnouncement_set_signature(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
15650         export function NodeAnnouncement_set_signature(this_ptr: number, val: Uint8Array): void {
15651                 if(!isWasmInitialized) {
15652                         throw new Error("initializeWasm() must be awaited first!");
15653                 }
15654                 const nativeResponseValue = wasm.NodeAnnouncement_set_signature(this_ptr, encodeArray(val));
15655                 // debug statements here
15656         }
15657         // struct LDKUnsignedNodeAnnouncement NodeAnnouncement_get_contents(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
15658         export function NodeAnnouncement_get_contents(this_ptr: number): number {
15659                 if(!isWasmInitialized) {
15660                         throw new Error("initializeWasm() must be awaited first!");
15661                 }
15662                 const nativeResponseValue = wasm.NodeAnnouncement_get_contents(this_ptr);
15663                 return nativeResponseValue;
15664         }
15665         // void NodeAnnouncement_set_contents(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedNodeAnnouncement val);
15666         export function NodeAnnouncement_set_contents(this_ptr: number, val: number): void {
15667                 if(!isWasmInitialized) {
15668                         throw new Error("initializeWasm() must be awaited first!");
15669                 }
15670                 const nativeResponseValue = wasm.NodeAnnouncement_set_contents(this_ptr, val);
15671                 // debug statements here
15672         }
15673         // MUST_USE_RES struct LDKNodeAnnouncement NodeAnnouncement_new(struct LDKSignature signature_arg, struct LDKUnsignedNodeAnnouncement contents_arg);
15674         export function NodeAnnouncement_new(signature_arg: Uint8Array, contents_arg: number): number {
15675                 if(!isWasmInitialized) {
15676                         throw new Error("initializeWasm() must be awaited first!");
15677                 }
15678                 const nativeResponseValue = wasm.NodeAnnouncement_new(encodeArray(signature_arg), contents_arg);
15679                 return nativeResponseValue;
15680         }
15681         // uint64_t NodeAnnouncement_clone_ptr(LDKNodeAnnouncement *NONNULL_PTR arg);
15682         export function NodeAnnouncement_clone_ptr(arg: number): number {
15683                 if(!isWasmInitialized) {
15684                         throw new Error("initializeWasm() must be awaited first!");
15685                 }
15686                 const nativeResponseValue = wasm.NodeAnnouncement_clone_ptr(arg);
15687                 return nativeResponseValue;
15688         }
15689         // struct LDKNodeAnnouncement NodeAnnouncement_clone(const struct LDKNodeAnnouncement *NONNULL_PTR orig);
15690         export function NodeAnnouncement_clone(orig: number): number {
15691                 if(!isWasmInitialized) {
15692                         throw new Error("initializeWasm() must be awaited first!");
15693                 }
15694                 const nativeResponseValue = wasm.NodeAnnouncement_clone(orig);
15695                 return nativeResponseValue;
15696         }
15697         // void UnsignedChannelAnnouncement_free(struct LDKUnsignedChannelAnnouncement this_obj);
15698         export function UnsignedChannelAnnouncement_free(this_obj: number): void {
15699                 if(!isWasmInitialized) {
15700                         throw new Error("initializeWasm() must be awaited first!");
15701                 }
15702                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_free(this_obj);
15703                 // debug statements here
15704         }
15705         // struct LDKChannelFeatures UnsignedChannelAnnouncement_get_features(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
15706         export function UnsignedChannelAnnouncement_get_features(this_ptr: number): number {
15707                 if(!isWasmInitialized) {
15708                         throw new Error("initializeWasm() must be awaited first!");
15709                 }
15710                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_features(this_ptr);
15711                 return nativeResponseValue;
15712         }
15713         // void UnsignedChannelAnnouncement_set_features(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
15714         export function UnsignedChannelAnnouncement_set_features(this_ptr: number, val: number): void {
15715                 if(!isWasmInitialized) {
15716                         throw new Error("initializeWasm() must be awaited first!");
15717                 }
15718                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_features(this_ptr, val);
15719                 // debug statements here
15720         }
15721         // const uint8_t (*UnsignedChannelAnnouncement_get_chain_hash(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr))[32];
15722         export function UnsignedChannelAnnouncement_get_chain_hash(this_ptr: number): Uint8Array {
15723                 if(!isWasmInitialized) {
15724                         throw new Error("initializeWasm() must be awaited first!");
15725                 }
15726                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_chain_hash(this_ptr);
15727                 return decodeArray(nativeResponseValue);
15728         }
15729         // void UnsignedChannelAnnouncement_set_chain_hash(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15730         export function UnsignedChannelAnnouncement_set_chain_hash(this_ptr: number, val: Uint8Array): void {
15731                 if(!isWasmInitialized) {
15732                         throw new Error("initializeWasm() must be awaited first!");
15733                 }
15734                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_chain_hash(this_ptr, encodeArray(val));
15735                 // debug statements here
15736         }
15737         // uint64_t UnsignedChannelAnnouncement_get_short_channel_id(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
15738         export function UnsignedChannelAnnouncement_get_short_channel_id(this_ptr: number): number {
15739                 if(!isWasmInitialized) {
15740                         throw new Error("initializeWasm() must be awaited first!");
15741                 }
15742                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_short_channel_id(this_ptr);
15743                 return nativeResponseValue;
15744         }
15745         // void UnsignedChannelAnnouncement_set_short_channel_id(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, uint64_t val);
15746         export function UnsignedChannelAnnouncement_set_short_channel_id(this_ptr: number, val: number): void {
15747                 if(!isWasmInitialized) {
15748                         throw new Error("initializeWasm() must be awaited first!");
15749                 }
15750                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_short_channel_id(this_ptr, val);
15751                 // debug statements here
15752         }
15753         // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
15754         export function UnsignedChannelAnnouncement_get_node_id_1(this_ptr: number): Uint8Array {
15755                 if(!isWasmInitialized) {
15756                         throw new Error("initializeWasm() must be awaited first!");
15757                 }
15758                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_node_id_1(this_ptr);
15759                 return decodeArray(nativeResponseValue);
15760         }
15761         // void UnsignedChannelAnnouncement_set_node_id_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
15762         export function UnsignedChannelAnnouncement_set_node_id_1(this_ptr: number, val: Uint8Array): void {
15763                 if(!isWasmInitialized) {
15764                         throw new Error("initializeWasm() must be awaited first!");
15765                 }
15766                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_node_id_1(this_ptr, encodeArray(val));
15767                 // debug statements here
15768         }
15769         // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
15770         export function UnsignedChannelAnnouncement_get_node_id_2(this_ptr: number): Uint8Array {
15771                 if(!isWasmInitialized) {
15772                         throw new Error("initializeWasm() must be awaited first!");
15773                 }
15774                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_node_id_2(this_ptr);
15775                 return decodeArray(nativeResponseValue);
15776         }
15777         // void UnsignedChannelAnnouncement_set_node_id_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
15778         export function UnsignedChannelAnnouncement_set_node_id_2(this_ptr: number, val: Uint8Array): void {
15779                 if(!isWasmInitialized) {
15780                         throw new Error("initializeWasm() must be awaited first!");
15781                 }
15782                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_node_id_2(this_ptr, encodeArray(val));
15783                 // debug statements here
15784         }
15785         // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
15786         export function UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr: number): Uint8Array {
15787                 if(!isWasmInitialized) {
15788                         throw new Error("initializeWasm() must be awaited first!");
15789                 }
15790                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr);
15791                 return decodeArray(nativeResponseValue);
15792         }
15793         // void UnsignedChannelAnnouncement_set_bitcoin_key_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
15794         export function UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr: number, val: Uint8Array): void {
15795                 if(!isWasmInitialized) {
15796                         throw new Error("initializeWasm() must be awaited first!");
15797                 }
15798                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr, encodeArray(val));
15799                 // debug statements here
15800         }
15801         // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
15802         export function UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr: number): Uint8Array {
15803                 if(!isWasmInitialized) {
15804                         throw new Error("initializeWasm() must be awaited first!");
15805                 }
15806                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr);
15807                 return decodeArray(nativeResponseValue);
15808         }
15809         // void UnsignedChannelAnnouncement_set_bitcoin_key_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
15810         export function UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr: number, val: Uint8Array): void {
15811                 if(!isWasmInitialized) {
15812                         throw new Error("initializeWasm() must be awaited first!");
15813                 }
15814                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr, encodeArray(val));
15815                 // debug statements here
15816         }
15817         // uint64_t UnsignedChannelAnnouncement_clone_ptr(LDKUnsignedChannelAnnouncement *NONNULL_PTR arg);
15818         export function UnsignedChannelAnnouncement_clone_ptr(arg: number): number {
15819                 if(!isWasmInitialized) {
15820                         throw new Error("initializeWasm() must be awaited first!");
15821                 }
15822                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_clone_ptr(arg);
15823                 return nativeResponseValue;
15824         }
15825         // struct LDKUnsignedChannelAnnouncement UnsignedChannelAnnouncement_clone(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR orig);
15826         export function UnsignedChannelAnnouncement_clone(orig: number): number {
15827                 if(!isWasmInitialized) {
15828                         throw new Error("initializeWasm() must be awaited first!");
15829                 }
15830                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_clone(orig);
15831                 return nativeResponseValue;
15832         }
15833         // void ChannelAnnouncement_free(struct LDKChannelAnnouncement this_obj);
15834         export function ChannelAnnouncement_free(this_obj: number): void {
15835                 if(!isWasmInitialized) {
15836                         throw new Error("initializeWasm() must be awaited first!");
15837                 }
15838                 const nativeResponseValue = wasm.ChannelAnnouncement_free(this_obj);
15839                 // debug statements here
15840         }
15841         // struct LDKSignature ChannelAnnouncement_get_node_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
15842         export function ChannelAnnouncement_get_node_signature_1(this_ptr: number): Uint8Array {
15843                 if(!isWasmInitialized) {
15844                         throw new Error("initializeWasm() must be awaited first!");
15845                 }
15846                 const nativeResponseValue = wasm.ChannelAnnouncement_get_node_signature_1(this_ptr);
15847                 return decodeArray(nativeResponseValue);
15848         }
15849         // void ChannelAnnouncement_set_node_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
15850         export function ChannelAnnouncement_set_node_signature_1(this_ptr: number, val: Uint8Array): void {
15851                 if(!isWasmInitialized) {
15852                         throw new Error("initializeWasm() must be awaited first!");
15853                 }
15854                 const nativeResponseValue = wasm.ChannelAnnouncement_set_node_signature_1(this_ptr, encodeArray(val));
15855                 // debug statements here
15856         }
15857         // struct LDKSignature ChannelAnnouncement_get_node_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
15858         export function ChannelAnnouncement_get_node_signature_2(this_ptr: number): Uint8Array {
15859                 if(!isWasmInitialized) {
15860                         throw new Error("initializeWasm() must be awaited first!");
15861                 }
15862                 const nativeResponseValue = wasm.ChannelAnnouncement_get_node_signature_2(this_ptr);
15863                 return decodeArray(nativeResponseValue);
15864         }
15865         // void ChannelAnnouncement_set_node_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
15866         export function ChannelAnnouncement_set_node_signature_2(this_ptr: number, val: Uint8Array): void {
15867                 if(!isWasmInitialized) {
15868                         throw new Error("initializeWasm() must be awaited first!");
15869                 }
15870                 const nativeResponseValue = wasm.ChannelAnnouncement_set_node_signature_2(this_ptr, encodeArray(val));
15871                 // debug statements here
15872         }
15873         // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
15874         export function ChannelAnnouncement_get_bitcoin_signature_1(this_ptr: number): Uint8Array {
15875                 if(!isWasmInitialized) {
15876                         throw new Error("initializeWasm() must be awaited first!");
15877                 }
15878                 const nativeResponseValue = wasm.ChannelAnnouncement_get_bitcoin_signature_1(this_ptr);
15879                 return decodeArray(nativeResponseValue);
15880         }
15881         // void ChannelAnnouncement_set_bitcoin_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
15882         export function ChannelAnnouncement_set_bitcoin_signature_1(this_ptr: number, val: Uint8Array): void {
15883                 if(!isWasmInitialized) {
15884                         throw new Error("initializeWasm() must be awaited first!");
15885                 }
15886                 const nativeResponseValue = wasm.ChannelAnnouncement_set_bitcoin_signature_1(this_ptr, encodeArray(val));
15887                 // debug statements here
15888         }
15889         // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
15890         export function ChannelAnnouncement_get_bitcoin_signature_2(this_ptr: number): Uint8Array {
15891                 if(!isWasmInitialized) {
15892                         throw new Error("initializeWasm() must be awaited first!");
15893                 }
15894                 const nativeResponseValue = wasm.ChannelAnnouncement_get_bitcoin_signature_2(this_ptr);
15895                 return decodeArray(nativeResponseValue);
15896         }
15897         // void ChannelAnnouncement_set_bitcoin_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
15898         export function ChannelAnnouncement_set_bitcoin_signature_2(this_ptr: number, val: Uint8Array): void {
15899                 if(!isWasmInitialized) {
15900                         throw new Error("initializeWasm() must be awaited first!");
15901                 }
15902                 const nativeResponseValue = wasm.ChannelAnnouncement_set_bitcoin_signature_2(this_ptr, encodeArray(val));
15903                 // debug statements here
15904         }
15905         // struct LDKUnsignedChannelAnnouncement ChannelAnnouncement_get_contents(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
15906         export function ChannelAnnouncement_get_contents(this_ptr: number): number {
15907                 if(!isWasmInitialized) {
15908                         throw new Error("initializeWasm() must be awaited first!");
15909                 }
15910                 const nativeResponseValue = wasm.ChannelAnnouncement_get_contents(this_ptr);
15911                 return nativeResponseValue;
15912         }
15913         // void ChannelAnnouncement_set_contents(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedChannelAnnouncement val);
15914         export function ChannelAnnouncement_set_contents(this_ptr: number, val: number): void {
15915                 if(!isWasmInitialized) {
15916                         throw new Error("initializeWasm() must be awaited first!");
15917                 }
15918                 const nativeResponseValue = wasm.ChannelAnnouncement_set_contents(this_ptr, val);
15919                 // debug statements here
15920         }
15921         // 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);
15922         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 {
15923                 if(!isWasmInitialized) {
15924                         throw new Error("initializeWasm() must be awaited first!");
15925                 }
15926                 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);
15927                 return nativeResponseValue;
15928         }
15929         // uint64_t ChannelAnnouncement_clone_ptr(LDKChannelAnnouncement *NONNULL_PTR arg);
15930         export function ChannelAnnouncement_clone_ptr(arg: number): number {
15931                 if(!isWasmInitialized) {
15932                         throw new Error("initializeWasm() must be awaited first!");
15933                 }
15934                 const nativeResponseValue = wasm.ChannelAnnouncement_clone_ptr(arg);
15935                 return nativeResponseValue;
15936         }
15937         // struct LDKChannelAnnouncement ChannelAnnouncement_clone(const struct LDKChannelAnnouncement *NONNULL_PTR orig);
15938         export function ChannelAnnouncement_clone(orig: number): number {
15939                 if(!isWasmInitialized) {
15940                         throw new Error("initializeWasm() must be awaited first!");
15941                 }
15942                 const nativeResponseValue = wasm.ChannelAnnouncement_clone(orig);
15943                 return nativeResponseValue;
15944         }
15945         // void UnsignedChannelUpdate_free(struct LDKUnsignedChannelUpdate this_obj);
15946         export function UnsignedChannelUpdate_free(this_obj: number): void {
15947                 if(!isWasmInitialized) {
15948                         throw new Error("initializeWasm() must be awaited first!");
15949                 }
15950                 const nativeResponseValue = wasm.UnsignedChannelUpdate_free(this_obj);
15951                 // debug statements here
15952         }
15953         // const uint8_t (*UnsignedChannelUpdate_get_chain_hash(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr))[32];
15954         export function UnsignedChannelUpdate_get_chain_hash(this_ptr: number): Uint8Array {
15955                 if(!isWasmInitialized) {
15956                         throw new Error("initializeWasm() must be awaited first!");
15957                 }
15958                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_chain_hash(this_ptr);
15959                 return decodeArray(nativeResponseValue);
15960         }
15961         // void UnsignedChannelUpdate_set_chain_hash(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15962         export function UnsignedChannelUpdate_set_chain_hash(this_ptr: number, val: Uint8Array): void {
15963                 if(!isWasmInitialized) {
15964                         throw new Error("initializeWasm() must be awaited first!");
15965                 }
15966                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_chain_hash(this_ptr, encodeArray(val));
15967                 // debug statements here
15968         }
15969         // uint64_t UnsignedChannelUpdate_get_short_channel_id(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
15970         export function UnsignedChannelUpdate_get_short_channel_id(this_ptr: number): number {
15971                 if(!isWasmInitialized) {
15972                         throw new Error("initializeWasm() must be awaited first!");
15973                 }
15974                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_short_channel_id(this_ptr);
15975                 return nativeResponseValue;
15976         }
15977         // void UnsignedChannelUpdate_set_short_channel_id(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
15978         export function UnsignedChannelUpdate_set_short_channel_id(this_ptr: number, val: number): void {
15979                 if(!isWasmInitialized) {
15980                         throw new Error("initializeWasm() must be awaited first!");
15981                 }
15982                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_short_channel_id(this_ptr, val);
15983                 // debug statements here
15984         }
15985         // uint32_t UnsignedChannelUpdate_get_timestamp(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
15986         export function UnsignedChannelUpdate_get_timestamp(this_ptr: number): number {
15987                 if(!isWasmInitialized) {
15988                         throw new Error("initializeWasm() must be awaited first!");
15989                 }
15990                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_timestamp(this_ptr);
15991                 return nativeResponseValue;
15992         }
15993         // void UnsignedChannelUpdate_set_timestamp(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
15994         export function UnsignedChannelUpdate_set_timestamp(this_ptr: number, val: number): void {
15995                 if(!isWasmInitialized) {
15996                         throw new Error("initializeWasm() must be awaited first!");
15997                 }
15998                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_timestamp(this_ptr, val);
15999                 // debug statements here
16000         }
16001         // uint8_t UnsignedChannelUpdate_get_flags(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
16002         export function UnsignedChannelUpdate_get_flags(this_ptr: number): number {
16003                 if(!isWasmInitialized) {
16004                         throw new Error("initializeWasm() must be awaited first!");
16005                 }
16006                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_flags(this_ptr);
16007                 return nativeResponseValue;
16008         }
16009         // void UnsignedChannelUpdate_set_flags(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint8_t val);
16010         export function UnsignedChannelUpdate_set_flags(this_ptr: number, val: number): void {
16011                 if(!isWasmInitialized) {
16012                         throw new Error("initializeWasm() must be awaited first!");
16013                 }
16014                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_flags(this_ptr, val);
16015                 // debug statements here
16016         }
16017         // uint16_t UnsignedChannelUpdate_get_cltv_expiry_delta(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
16018         export function UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr: number): number {
16019                 if(!isWasmInitialized) {
16020                         throw new Error("initializeWasm() must be awaited first!");
16021                 }
16022                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr);
16023                 return nativeResponseValue;
16024         }
16025         // void UnsignedChannelUpdate_set_cltv_expiry_delta(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint16_t val);
16026         export function UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr: number, val: number): void {
16027                 if(!isWasmInitialized) {
16028                         throw new Error("initializeWasm() must be awaited first!");
16029                 }
16030                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr, val);
16031                 // debug statements here
16032         }
16033         // uint64_t UnsignedChannelUpdate_get_htlc_minimum_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
16034         export function UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr: number): number {
16035                 if(!isWasmInitialized) {
16036                         throw new Error("initializeWasm() must be awaited first!");
16037                 }
16038                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr);
16039                 return nativeResponseValue;
16040         }
16041         // void UnsignedChannelUpdate_set_htlc_minimum_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
16042         export function UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr: number, val: number): void {
16043                 if(!isWasmInitialized) {
16044                         throw new Error("initializeWasm() must be awaited first!");
16045                 }
16046                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr, val);
16047                 // debug statements here
16048         }
16049         // uint32_t UnsignedChannelUpdate_get_fee_base_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
16050         export function UnsignedChannelUpdate_get_fee_base_msat(this_ptr: number): number {
16051                 if(!isWasmInitialized) {
16052                         throw new Error("initializeWasm() must be awaited first!");
16053                 }
16054                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_fee_base_msat(this_ptr);
16055                 return nativeResponseValue;
16056         }
16057         // void UnsignedChannelUpdate_set_fee_base_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
16058         export function UnsignedChannelUpdate_set_fee_base_msat(this_ptr: number, val: number): void {
16059                 if(!isWasmInitialized) {
16060                         throw new Error("initializeWasm() must be awaited first!");
16061                 }
16062                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_base_msat(this_ptr, val);
16063                 // debug statements here
16064         }
16065         // uint32_t UnsignedChannelUpdate_get_fee_proportional_millionths(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
16066         export function UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr: number): number {
16067                 if(!isWasmInitialized) {
16068                         throw new Error("initializeWasm() must be awaited first!");
16069                 }
16070                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr);
16071                 return nativeResponseValue;
16072         }
16073         // void UnsignedChannelUpdate_set_fee_proportional_millionths(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
16074         export function UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr: number, val: number): void {
16075                 if(!isWasmInitialized) {
16076                         throw new Error("initializeWasm() must be awaited first!");
16077                 }
16078                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr, val);
16079                 // debug statements here
16080         }
16081         // uint64_t UnsignedChannelUpdate_clone_ptr(LDKUnsignedChannelUpdate *NONNULL_PTR arg);
16082         export function UnsignedChannelUpdate_clone_ptr(arg: number): number {
16083                 if(!isWasmInitialized) {
16084                         throw new Error("initializeWasm() must be awaited first!");
16085                 }
16086                 const nativeResponseValue = wasm.UnsignedChannelUpdate_clone_ptr(arg);
16087                 return nativeResponseValue;
16088         }
16089         // struct LDKUnsignedChannelUpdate UnsignedChannelUpdate_clone(const struct LDKUnsignedChannelUpdate *NONNULL_PTR orig);
16090         export function UnsignedChannelUpdate_clone(orig: number): number {
16091                 if(!isWasmInitialized) {
16092                         throw new Error("initializeWasm() must be awaited first!");
16093                 }
16094                 const nativeResponseValue = wasm.UnsignedChannelUpdate_clone(orig);
16095                 return nativeResponseValue;
16096         }
16097         // void ChannelUpdate_free(struct LDKChannelUpdate this_obj);
16098         export function ChannelUpdate_free(this_obj: number): void {
16099                 if(!isWasmInitialized) {
16100                         throw new Error("initializeWasm() must be awaited first!");
16101                 }
16102                 const nativeResponseValue = wasm.ChannelUpdate_free(this_obj);
16103                 // debug statements here
16104         }
16105         // struct LDKSignature ChannelUpdate_get_signature(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
16106         export function ChannelUpdate_get_signature(this_ptr: number): Uint8Array {
16107                 if(!isWasmInitialized) {
16108                         throw new Error("initializeWasm() must be awaited first!");
16109                 }
16110                 const nativeResponseValue = wasm.ChannelUpdate_get_signature(this_ptr);
16111                 return decodeArray(nativeResponseValue);
16112         }
16113         // void ChannelUpdate_set_signature(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKSignature val);
16114         export function ChannelUpdate_set_signature(this_ptr: number, val: Uint8Array): void {
16115                 if(!isWasmInitialized) {
16116                         throw new Error("initializeWasm() must be awaited first!");
16117                 }
16118                 const nativeResponseValue = wasm.ChannelUpdate_set_signature(this_ptr, encodeArray(val));
16119                 // debug statements here
16120         }
16121         // struct LDKUnsignedChannelUpdate ChannelUpdate_get_contents(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
16122         export function ChannelUpdate_get_contents(this_ptr: number): number {
16123                 if(!isWasmInitialized) {
16124                         throw new Error("initializeWasm() must be awaited first!");
16125                 }
16126                 const nativeResponseValue = wasm.ChannelUpdate_get_contents(this_ptr);
16127                 return nativeResponseValue;
16128         }
16129         // void ChannelUpdate_set_contents(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKUnsignedChannelUpdate val);
16130         export function ChannelUpdate_set_contents(this_ptr: number, val: number): void {
16131                 if(!isWasmInitialized) {
16132                         throw new Error("initializeWasm() must be awaited first!");
16133                 }
16134                 const nativeResponseValue = wasm.ChannelUpdate_set_contents(this_ptr, val);
16135                 // debug statements here
16136         }
16137         // MUST_USE_RES struct LDKChannelUpdate ChannelUpdate_new(struct LDKSignature signature_arg, struct LDKUnsignedChannelUpdate contents_arg);
16138         export function ChannelUpdate_new(signature_arg: Uint8Array, contents_arg: number): number {
16139                 if(!isWasmInitialized) {
16140                         throw new Error("initializeWasm() must be awaited first!");
16141                 }
16142                 const nativeResponseValue = wasm.ChannelUpdate_new(encodeArray(signature_arg), contents_arg);
16143                 return nativeResponseValue;
16144         }
16145         // uint64_t ChannelUpdate_clone_ptr(LDKChannelUpdate *NONNULL_PTR arg);
16146         export function ChannelUpdate_clone_ptr(arg: number): number {
16147                 if(!isWasmInitialized) {
16148                         throw new Error("initializeWasm() must be awaited first!");
16149                 }
16150                 const nativeResponseValue = wasm.ChannelUpdate_clone_ptr(arg);
16151                 return nativeResponseValue;
16152         }
16153         // struct LDKChannelUpdate ChannelUpdate_clone(const struct LDKChannelUpdate *NONNULL_PTR orig);
16154         export function ChannelUpdate_clone(orig: number): number {
16155                 if(!isWasmInitialized) {
16156                         throw new Error("initializeWasm() must be awaited first!");
16157                 }
16158                 const nativeResponseValue = wasm.ChannelUpdate_clone(orig);
16159                 return nativeResponseValue;
16160         }
16161         // void QueryChannelRange_free(struct LDKQueryChannelRange this_obj);
16162         export function QueryChannelRange_free(this_obj: number): void {
16163                 if(!isWasmInitialized) {
16164                         throw new Error("initializeWasm() must be awaited first!");
16165                 }
16166                 const nativeResponseValue = wasm.QueryChannelRange_free(this_obj);
16167                 // debug statements here
16168         }
16169         // const uint8_t (*QueryChannelRange_get_chain_hash(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr))[32];
16170         export function QueryChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
16171                 if(!isWasmInitialized) {
16172                         throw new Error("initializeWasm() must be awaited first!");
16173                 }
16174                 const nativeResponseValue = wasm.QueryChannelRange_get_chain_hash(this_ptr);
16175                 return decodeArray(nativeResponseValue);
16176         }
16177         // void QueryChannelRange_set_chain_hash(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
16178         export function QueryChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
16179                 if(!isWasmInitialized) {
16180                         throw new Error("initializeWasm() must be awaited first!");
16181                 }
16182                 const nativeResponseValue = wasm.QueryChannelRange_set_chain_hash(this_ptr, encodeArray(val));
16183                 // debug statements here
16184         }
16185         // uint32_t QueryChannelRange_get_first_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
16186         export function QueryChannelRange_get_first_blocknum(this_ptr: number): number {
16187                 if(!isWasmInitialized) {
16188                         throw new Error("initializeWasm() must be awaited first!");
16189                 }
16190                 const nativeResponseValue = wasm.QueryChannelRange_get_first_blocknum(this_ptr);
16191                 return nativeResponseValue;
16192         }
16193         // void QueryChannelRange_set_first_blocknum(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
16194         export function QueryChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
16195                 if(!isWasmInitialized) {
16196                         throw new Error("initializeWasm() must be awaited first!");
16197                 }
16198                 const nativeResponseValue = wasm.QueryChannelRange_set_first_blocknum(this_ptr, val);
16199                 // debug statements here
16200         }
16201         // uint32_t QueryChannelRange_get_number_of_blocks(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
16202         export function QueryChannelRange_get_number_of_blocks(this_ptr: number): number {
16203                 if(!isWasmInitialized) {
16204                         throw new Error("initializeWasm() must be awaited first!");
16205                 }
16206                 const nativeResponseValue = wasm.QueryChannelRange_get_number_of_blocks(this_ptr);
16207                 return nativeResponseValue;
16208         }
16209         // void QueryChannelRange_set_number_of_blocks(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
16210         export function QueryChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
16211                 if(!isWasmInitialized) {
16212                         throw new Error("initializeWasm() must be awaited first!");
16213                 }
16214                 const nativeResponseValue = wasm.QueryChannelRange_set_number_of_blocks(this_ptr, val);
16215                 // debug statements here
16216         }
16217         // MUST_USE_RES struct LDKQueryChannelRange QueryChannelRange_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg);
16218         export function QueryChannelRange_new(chain_hash_arg: Uint8Array, first_blocknum_arg: number, number_of_blocks_arg: number): number {
16219                 if(!isWasmInitialized) {
16220                         throw new Error("initializeWasm() must be awaited first!");
16221                 }
16222                 const nativeResponseValue = wasm.QueryChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg);
16223                 return nativeResponseValue;
16224         }
16225         // uint64_t QueryChannelRange_clone_ptr(LDKQueryChannelRange *NONNULL_PTR arg);
16226         export function QueryChannelRange_clone_ptr(arg: number): number {
16227                 if(!isWasmInitialized) {
16228                         throw new Error("initializeWasm() must be awaited first!");
16229                 }
16230                 const nativeResponseValue = wasm.QueryChannelRange_clone_ptr(arg);
16231                 return nativeResponseValue;
16232         }
16233         // struct LDKQueryChannelRange QueryChannelRange_clone(const struct LDKQueryChannelRange *NONNULL_PTR orig);
16234         export function QueryChannelRange_clone(orig: number): number {
16235                 if(!isWasmInitialized) {
16236                         throw new Error("initializeWasm() must be awaited first!");
16237                 }
16238                 const nativeResponseValue = wasm.QueryChannelRange_clone(orig);
16239                 return nativeResponseValue;
16240         }
16241         // void ReplyChannelRange_free(struct LDKReplyChannelRange this_obj);
16242         export function ReplyChannelRange_free(this_obj: number): void {
16243                 if(!isWasmInitialized) {
16244                         throw new Error("initializeWasm() must be awaited first!");
16245                 }
16246                 const nativeResponseValue = wasm.ReplyChannelRange_free(this_obj);
16247                 // debug statements here
16248         }
16249         // const uint8_t (*ReplyChannelRange_get_chain_hash(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr))[32];
16250         export function ReplyChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
16251                 if(!isWasmInitialized) {
16252                         throw new Error("initializeWasm() must be awaited first!");
16253                 }
16254                 const nativeResponseValue = wasm.ReplyChannelRange_get_chain_hash(this_ptr);
16255                 return decodeArray(nativeResponseValue);
16256         }
16257         // void ReplyChannelRange_set_chain_hash(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
16258         export function ReplyChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
16259                 if(!isWasmInitialized) {
16260                         throw new Error("initializeWasm() must be awaited first!");
16261                 }
16262                 const nativeResponseValue = wasm.ReplyChannelRange_set_chain_hash(this_ptr, encodeArray(val));
16263                 // debug statements here
16264         }
16265         // uint32_t ReplyChannelRange_get_first_blocknum(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
16266         export function ReplyChannelRange_get_first_blocknum(this_ptr: number): number {
16267                 if(!isWasmInitialized) {
16268                         throw new Error("initializeWasm() must be awaited first!");
16269                 }
16270                 const nativeResponseValue = wasm.ReplyChannelRange_get_first_blocknum(this_ptr);
16271                 return nativeResponseValue;
16272         }
16273         // void ReplyChannelRange_set_first_blocknum(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
16274         export function ReplyChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
16275                 if(!isWasmInitialized) {
16276                         throw new Error("initializeWasm() must be awaited first!");
16277                 }
16278                 const nativeResponseValue = wasm.ReplyChannelRange_set_first_blocknum(this_ptr, val);
16279                 // debug statements here
16280         }
16281         // uint32_t ReplyChannelRange_get_number_of_blocks(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
16282         export function ReplyChannelRange_get_number_of_blocks(this_ptr: number): number {
16283                 if(!isWasmInitialized) {
16284                         throw new Error("initializeWasm() must be awaited first!");
16285                 }
16286                 const nativeResponseValue = wasm.ReplyChannelRange_get_number_of_blocks(this_ptr);
16287                 return nativeResponseValue;
16288         }
16289         // void ReplyChannelRange_set_number_of_blocks(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
16290         export function ReplyChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
16291                 if(!isWasmInitialized) {
16292                         throw new Error("initializeWasm() must be awaited first!");
16293                 }
16294                 const nativeResponseValue = wasm.ReplyChannelRange_set_number_of_blocks(this_ptr, val);
16295                 // debug statements here
16296         }
16297         // bool ReplyChannelRange_get_sync_complete(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
16298         export function ReplyChannelRange_get_sync_complete(this_ptr: number): boolean {
16299                 if(!isWasmInitialized) {
16300                         throw new Error("initializeWasm() must be awaited first!");
16301                 }
16302                 const nativeResponseValue = wasm.ReplyChannelRange_get_sync_complete(this_ptr);
16303                 return nativeResponseValue;
16304         }
16305         // void ReplyChannelRange_set_sync_complete(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, bool val);
16306         export function ReplyChannelRange_set_sync_complete(this_ptr: number, val: boolean): void {
16307                 if(!isWasmInitialized) {
16308                         throw new Error("initializeWasm() must be awaited first!");
16309                 }
16310                 const nativeResponseValue = wasm.ReplyChannelRange_set_sync_complete(this_ptr, val);
16311                 // debug statements here
16312         }
16313         // void ReplyChannelRange_set_short_channel_ids(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
16314         export function ReplyChannelRange_set_short_channel_ids(this_ptr: number, val: number[]): void {
16315                 if(!isWasmInitialized) {
16316                         throw new Error("initializeWasm() must be awaited first!");
16317                 }
16318                 const nativeResponseValue = wasm.ReplyChannelRange_set_short_channel_ids(this_ptr, val);
16319                 // debug statements here
16320         }
16321         // MUST_USE_RES struct LDKReplyChannelRange ReplyChannelRange_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg, bool sync_complete_arg, struct LDKCVec_u64Z short_channel_ids_arg);
16322         export function ReplyChannelRange_new(chain_hash_arg: Uint8Array, first_blocknum_arg: number, number_of_blocks_arg: number, sync_complete_arg: boolean, short_channel_ids_arg: number[]): number {
16323                 if(!isWasmInitialized) {
16324                         throw new Error("initializeWasm() must be awaited first!");
16325                 }
16326                 const nativeResponseValue = wasm.ReplyChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg, sync_complete_arg, short_channel_ids_arg);
16327                 return nativeResponseValue;
16328         }
16329         // uint64_t ReplyChannelRange_clone_ptr(LDKReplyChannelRange *NONNULL_PTR arg);
16330         export function ReplyChannelRange_clone_ptr(arg: number): number {
16331                 if(!isWasmInitialized) {
16332                         throw new Error("initializeWasm() must be awaited first!");
16333                 }
16334                 const nativeResponseValue = wasm.ReplyChannelRange_clone_ptr(arg);
16335                 return nativeResponseValue;
16336         }
16337         // struct LDKReplyChannelRange ReplyChannelRange_clone(const struct LDKReplyChannelRange *NONNULL_PTR orig);
16338         export function ReplyChannelRange_clone(orig: number): number {
16339                 if(!isWasmInitialized) {
16340                         throw new Error("initializeWasm() must be awaited first!");
16341                 }
16342                 const nativeResponseValue = wasm.ReplyChannelRange_clone(orig);
16343                 return nativeResponseValue;
16344         }
16345         // void QueryShortChannelIds_free(struct LDKQueryShortChannelIds this_obj);
16346         export function QueryShortChannelIds_free(this_obj: number): void {
16347                 if(!isWasmInitialized) {
16348                         throw new Error("initializeWasm() must be awaited first!");
16349                 }
16350                 const nativeResponseValue = wasm.QueryShortChannelIds_free(this_obj);
16351                 // debug statements here
16352         }
16353         // const uint8_t (*QueryShortChannelIds_get_chain_hash(const struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr))[32];
16354         export function QueryShortChannelIds_get_chain_hash(this_ptr: number): Uint8Array {
16355                 if(!isWasmInitialized) {
16356                         throw new Error("initializeWasm() must be awaited first!");
16357                 }
16358                 const nativeResponseValue = wasm.QueryShortChannelIds_get_chain_hash(this_ptr);
16359                 return decodeArray(nativeResponseValue);
16360         }
16361         // void QueryShortChannelIds_set_chain_hash(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
16362         export function QueryShortChannelIds_set_chain_hash(this_ptr: number, val: Uint8Array): void {
16363                 if(!isWasmInitialized) {
16364                         throw new Error("initializeWasm() must be awaited first!");
16365                 }
16366                 const nativeResponseValue = wasm.QueryShortChannelIds_set_chain_hash(this_ptr, encodeArray(val));
16367                 // debug statements here
16368         }
16369         // void QueryShortChannelIds_set_short_channel_ids(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
16370         export function QueryShortChannelIds_set_short_channel_ids(this_ptr: number, val: number[]): void {
16371                 if(!isWasmInitialized) {
16372                         throw new Error("initializeWasm() must be awaited first!");
16373                 }
16374                 const nativeResponseValue = wasm.QueryShortChannelIds_set_short_channel_ids(this_ptr, val);
16375                 // debug statements here
16376         }
16377         // MUST_USE_RES struct LDKQueryShortChannelIds QueryShortChannelIds_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKCVec_u64Z short_channel_ids_arg);
16378         export function QueryShortChannelIds_new(chain_hash_arg: Uint8Array, short_channel_ids_arg: number[]): number {
16379                 if(!isWasmInitialized) {
16380                         throw new Error("initializeWasm() must be awaited first!");
16381                 }
16382                 const nativeResponseValue = wasm.QueryShortChannelIds_new(encodeArray(chain_hash_arg), short_channel_ids_arg);
16383                 return nativeResponseValue;
16384         }
16385         // uint64_t QueryShortChannelIds_clone_ptr(LDKQueryShortChannelIds *NONNULL_PTR arg);
16386         export function QueryShortChannelIds_clone_ptr(arg: number): number {
16387                 if(!isWasmInitialized) {
16388                         throw new Error("initializeWasm() must be awaited first!");
16389                 }
16390                 const nativeResponseValue = wasm.QueryShortChannelIds_clone_ptr(arg);
16391                 return nativeResponseValue;
16392         }
16393         // struct LDKQueryShortChannelIds QueryShortChannelIds_clone(const struct LDKQueryShortChannelIds *NONNULL_PTR orig);
16394         export function QueryShortChannelIds_clone(orig: number): number {
16395                 if(!isWasmInitialized) {
16396                         throw new Error("initializeWasm() must be awaited first!");
16397                 }
16398                 const nativeResponseValue = wasm.QueryShortChannelIds_clone(orig);
16399                 return nativeResponseValue;
16400         }
16401         // void ReplyShortChannelIdsEnd_free(struct LDKReplyShortChannelIdsEnd this_obj);
16402         export function ReplyShortChannelIdsEnd_free(this_obj: number): void {
16403                 if(!isWasmInitialized) {
16404                         throw new Error("initializeWasm() must be awaited first!");
16405                 }
16406                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_free(this_obj);
16407                 // debug statements here
16408         }
16409         // const uint8_t (*ReplyShortChannelIdsEnd_get_chain_hash(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr))[32];
16410         export function ReplyShortChannelIdsEnd_get_chain_hash(this_ptr: number): Uint8Array {
16411                 if(!isWasmInitialized) {
16412                         throw new Error("initializeWasm() must be awaited first!");
16413                 }
16414                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_get_chain_hash(this_ptr);
16415                 return decodeArray(nativeResponseValue);
16416         }
16417         // void ReplyShortChannelIdsEnd_set_chain_hash(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
16418         export function ReplyShortChannelIdsEnd_set_chain_hash(this_ptr: number, val: Uint8Array): void {
16419                 if(!isWasmInitialized) {
16420                         throw new Error("initializeWasm() must be awaited first!");
16421                 }
16422                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_set_chain_hash(this_ptr, encodeArray(val));
16423                 // debug statements here
16424         }
16425         // bool ReplyShortChannelIdsEnd_get_full_information(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr);
16426         export function ReplyShortChannelIdsEnd_get_full_information(this_ptr: number): boolean {
16427                 if(!isWasmInitialized) {
16428                         throw new Error("initializeWasm() must be awaited first!");
16429                 }
16430                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_get_full_information(this_ptr);
16431                 return nativeResponseValue;
16432         }
16433         // void ReplyShortChannelIdsEnd_set_full_information(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, bool val);
16434         export function ReplyShortChannelIdsEnd_set_full_information(this_ptr: number, val: boolean): void {
16435                 if(!isWasmInitialized) {
16436                         throw new Error("initializeWasm() must be awaited first!");
16437                 }
16438                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_set_full_information(this_ptr, val);
16439                 // debug statements here
16440         }
16441         // MUST_USE_RES struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_new(struct LDKThirtyTwoBytes chain_hash_arg, bool full_information_arg);
16442         export function ReplyShortChannelIdsEnd_new(chain_hash_arg: Uint8Array, full_information_arg: boolean): number {
16443                 if(!isWasmInitialized) {
16444                         throw new Error("initializeWasm() must be awaited first!");
16445                 }
16446                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_new(encodeArray(chain_hash_arg), full_information_arg);
16447                 return nativeResponseValue;
16448         }
16449         // uint64_t ReplyShortChannelIdsEnd_clone_ptr(LDKReplyShortChannelIdsEnd *NONNULL_PTR arg);
16450         export function ReplyShortChannelIdsEnd_clone_ptr(arg: number): number {
16451                 if(!isWasmInitialized) {
16452                         throw new Error("initializeWasm() must be awaited first!");
16453                 }
16454                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_clone_ptr(arg);
16455                 return nativeResponseValue;
16456         }
16457         // struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_clone(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR orig);
16458         export function ReplyShortChannelIdsEnd_clone(orig: number): number {
16459                 if(!isWasmInitialized) {
16460                         throw new Error("initializeWasm() must be awaited first!");
16461                 }
16462                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_clone(orig);
16463                 return nativeResponseValue;
16464         }
16465         // void GossipTimestampFilter_free(struct LDKGossipTimestampFilter this_obj);
16466         export function GossipTimestampFilter_free(this_obj: number): void {
16467                 if(!isWasmInitialized) {
16468                         throw new Error("initializeWasm() must be awaited first!");
16469                 }
16470                 const nativeResponseValue = wasm.GossipTimestampFilter_free(this_obj);
16471                 // debug statements here
16472         }
16473         // const uint8_t (*GossipTimestampFilter_get_chain_hash(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr))[32];
16474         export function GossipTimestampFilter_get_chain_hash(this_ptr: number): Uint8Array {
16475                 if(!isWasmInitialized) {
16476                         throw new Error("initializeWasm() must be awaited first!");
16477                 }
16478                 const nativeResponseValue = wasm.GossipTimestampFilter_get_chain_hash(this_ptr);
16479                 return decodeArray(nativeResponseValue);
16480         }
16481         // void GossipTimestampFilter_set_chain_hash(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
16482         export function GossipTimestampFilter_set_chain_hash(this_ptr: number, val: Uint8Array): void {
16483                 if(!isWasmInitialized) {
16484                         throw new Error("initializeWasm() must be awaited first!");
16485                 }
16486                 const nativeResponseValue = wasm.GossipTimestampFilter_set_chain_hash(this_ptr, encodeArray(val));
16487                 // debug statements here
16488         }
16489         // uint32_t GossipTimestampFilter_get_first_timestamp(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
16490         export function GossipTimestampFilter_get_first_timestamp(this_ptr: number): number {
16491                 if(!isWasmInitialized) {
16492                         throw new Error("initializeWasm() must be awaited first!");
16493                 }
16494                 const nativeResponseValue = wasm.GossipTimestampFilter_get_first_timestamp(this_ptr);
16495                 return nativeResponseValue;
16496         }
16497         // void GossipTimestampFilter_set_first_timestamp(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
16498         export function GossipTimestampFilter_set_first_timestamp(this_ptr: number, val: number): void {
16499                 if(!isWasmInitialized) {
16500                         throw new Error("initializeWasm() must be awaited first!");
16501                 }
16502                 const nativeResponseValue = wasm.GossipTimestampFilter_set_first_timestamp(this_ptr, val);
16503                 // debug statements here
16504         }
16505         // uint32_t GossipTimestampFilter_get_timestamp_range(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
16506         export function GossipTimestampFilter_get_timestamp_range(this_ptr: number): number {
16507                 if(!isWasmInitialized) {
16508                         throw new Error("initializeWasm() must be awaited first!");
16509                 }
16510                 const nativeResponseValue = wasm.GossipTimestampFilter_get_timestamp_range(this_ptr);
16511                 return nativeResponseValue;
16512         }
16513         // void GossipTimestampFilter_set_timestamp_range(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
16514         export function GossipTimestampFilter_set_timestamp_range(this_ptr: number, val: number): void {
16515                 if(!isWasmInitialized) {
16516                         throw new Error("initializeWasm() must be awaited first!");
16517                 }
16518                 const nativeResponseValue = wasm.GossipTimestampFilter_set_timestamp_range(this_ptr, val);
16519                 // debug statements here
16520         }
16521         // MUST_USE_RES struct LDKGossipTimestampFilter GossipTimestampFilter_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_timestamp_arg, uint32_t timestamp_range_arg);
16522         export function GossipTimestampFilter_new(chain_hash_arg: Uint8Array, first_timestamp_arg: number, timestamp_range_arg: number): number {
16523                 if(!isWasmInitialized) {
16524                         throw new Error("initializeWasm() must be awaited first!");
16525                 }
16526                 const nativeResponseValue = wasm.GossipTimestampFilter_new(encodeArray(chain_hash_arg), first_timestamp_arg, timestamp_range_arg);
16527                 return nativeResponseValue;
16528         }
16529         // uint64_t GossipTimestampFilter_clone_ptr(LDKGossipTimestampFilter *NONNULL_PTR arg);
16530         export function GossipTimestampFilter_clone_ptr(arg: number): number {
16531                 if(!isWasmInitialized) {
16532                         throw new Error("initializeWasm() must be awaited first!");
16533                 }
16534                 const nativeResponseValue = wasm.GossipTimestampFilter_clone_ptr(arg);
16535                 return nativeResponseValue;
16536         }
16537         // struct LDKGossipTimestampFilter GossipTimestampFilter_clone(const struct LDKGossipTimestampFilter *NONNULL_PTR orig);
16538         export function GossipTimestampFilter_clone(orig: number): number {
16539                 if(!isWasmInitialized) {
16540                         throw new Error("initializeWasm() must be awaited first!");
16541                 }
16542                 const nativeResponseValue = wasm.GossipTimestampFilter_clone(orig);
16543                 return nativeResponseValue;
16544         }
16545         // void ErrorAction_free(struct LDKErrorAction this_ptr);
16546         export function ErrorAction_free(this_ptr: number): void {
16547                 if(!isWasmInitialized) {
16548                         throw new Error("initializeWasm() must be awaited first!");
16549                 }
16550                 const nativeResponseValue = wasm.ErrorAction_free(this_ptr);
16551                 // debug statements here
16552         }
16553         // uint64_t ErrorAction_clone_ptr(LDKErrorAction *NONNULL_PTR arg);
16554         export function ErrorAction_clone_ptr(arg: number): number {
16555                 if(!isWasmInitialized) {
16556                         throw new Error("initializeWasm() must be awaited first!");
16557                 }
16558                 const nativeResponseValue = wasm.ErrorAction_clone_ptr(arg);
16559                 return nativeResponseValue;
16560         }
16561         // struct LDKErrorAction ErrorAction_clone(const struct LDKErrorAction *NONNULL_PTR orig);
16562         export function ErrorAction_clone(orig: number): number {
16563                 if(!isWasmInitialized) {
16564                         throw new Error("initializeWasm() must be awaited first!");
16565                 }
16566                 const nativeResponseValue = wasm.ErrorAction_clone(orig);
16567                 return nativeResponseValue;
16568         }
16569         // struct LDKErrorAction ErrorAction_disconnect_peer(struct LDKErrorMessage msg);
16570         export function ErrorAction_disconnect_peer(msg: number): number {
16571                 if(!isWasmInitialized) {
16572                         throw new Error("initializeWasm() must be awaited first!");
16573                 }
16574                 const nativeResponseValue = wasm.ErrorAction_disconnect_peer(msg);
16575                 return nativeResponseValue;
16576         }
16577         // struct LDKErrorAction ErrorAction_ignore_error(void);
16578         export function ErrorAction_ignore_error(): number {
16579                 if(!isWasmInitialized) {
16580                         throw new Error("initializeWasm() must be awaited first!");
16581                 }
16582                 const nativeResponseValue = wasm.ErrorAction_ignore_error();
16583                 return nativeResponseValue;
16584         }
16585         // struct LDKErrorAction ErrorAction_ignore_and_log(enum LDKLevel a);
16586         export function ErrorAction_ignore_and_log(a: Level): number {
16587                 if(!isWasmInitialized) {
16588                         throw new Error("initializeWasm() must be awaited first!");
16589                 }
16590                 const nativeResponseValue = wasm.ErrorAction_ignore_and_log(a);
16591                 return nativeResponseValue;
16592         }
16593         // struct LDKErrorAction ErrorAction_ignore_duplicate_gossip(void);
16594         export function ErrorAction_ignore_duplicate_gossip(): number {
16595                 if(!isWasmInitialized) {
16596                         throw new Error("initializeWasm() must be awaited first!");
16597                 }
16598                 const nativeResponseValue = wasm.ErrorAction_ignore_duplicate_gossip();
16599                 return nativeResponseValue;
16600         }
16601         // struct LDKErrorAction ErrorAction_send_error_message(struct LDKErrorMessage msg);
16602         export function ErrorAction_send_error_message(msg: number): number {
16603                 if(!isWasmInitialized) {
16604                         throw new Error("initializeWasm() must be awaited first!");
16605                 }
16606                 const nativeResponseValue = wasm.ErrorAction_send_error_message(msg);
16607                 return nativeResponseValue;
16608         }
16609         // void LightningError_free(struct LDKLightningError this_obj);
16610         export function LightningError_free(this_obj: number): void {
16611                 if(!isWasmInitialized) {
16612                         throw new Error("initializeWasm() must be awaited first!");
16613                 }
16614                 const nativeResponseValue = wasm.LightningError_free(this_obj);
16615                 // debug statements here
16616         }
16617         // struct LDKStr LightningError_get_err(const struct LDKLightningError *NONNULL_PTR this_ptr);
16618         export function LightningError_get_err(this_ptr: number): String {
16619                 if(!isWasmInitialized) {
16620                         throw new Error("initializeWasm() must be awaited first!");
16621                 }
16622                 const nativeResponseValue = wasm.LightningError_get_err(this_ptr);
16623                 return nativeResponseValue;
16624         }
16625         // void LightningError_set_err(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKStr val);
16626         export function LightningError_set_err(this_ptr: number, val: String): void {
16627                 if(!isWasmInitialized) {
16628                         throw new Error("initializeWasm() must be awaited first!");
16629                 }
16630                 const nativeResponseValue = wasm.LightningError_set_err(this_ptr, val);
16631                 // debug statements here
16632         }
16633         // struct LDKErrorAction LightningError_get_action(const struct LDKLightningError *NONNULL_PTR this_ptr);
16634         export function LightningError_get_action(this_ptr: number): number {
16635                 if(!isWasmInitialized) {
16636                         throw new Error("initializeWasm() must be awaited first!");
16637                 }
16638                 const nativeResponseValue = wasm.LightningError_get_action(this_ptr);
16639                 return nativeResponseValue;
16640         }
16641         // void LightningError_set_action(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKErrorAction val);
16642         export function LightningError_set_action(this_ptr: number, val: number): void {
16643                 if(!isWasmInitialized) {
16644                         throw new Error("initializeWasm() must be awaited first!");
16645                 }
16646                 const nativeResponseValue = wasm.LightningError_set_action(this_ptr, val);
16647                 // debug statements here
16648         }
16649         // MUST_USE_RES struct LDKLightningError LightningError_new(struct LDKStr err_arg, struct LDKErrorAction action_arg);
16650         export function LightningError_new(err_arg: String, action_arg: number): number {
16651                 if(!isWasmInitialized) {
16652                         throw new Error("initializeWasm() must be awaited first!");
16653                 }
16654                 const nativeResponseValue = wasm.LightningError_new(err_arg, action_arg);
16655                 return nativeResponseValue;
16656         }
16657         // uint64_t LightningError_clone_ptr(LDKLightningError *NONNULL_PTR arg);
16658         export function LightningError_clone_ptr(arg: number): number {
16659                 if(!isWasmInitialized) {
16660                         throw new Error("initializeWasm() must be awaited first!");
16661                 }
16662                 const nativeResponseValue = wasm.LightningError_clone_ptr(arg);
16663                 return nativeResponseValue;
16664         }
16665         // struct LDKLightningError LightningError_clone(const struct LDKLightningError *NONNULL_PTR orig);
16666         export function LightningError_clone(orig: number): number {
16667                 if(!isWasmInitialized) {
16668                         throw new Error("initializeWasm() must be awaited first!");
16669                 }
16670                 const nativeResponseValue = wasm.LightningError_clone(orig);
16671                 return nativeResponseValue;
16672         }
16673         // void CommitmentUpdate_free(struct LDKCommitmentUpdate this_obj);
16674         export function CommitmentUpdate_free(this_obj: number): void {
16675                 if(!isWasmInitialized) {
16676                         throw new Error("initializeWasm() must be awaited first!");
16677                 }
16678                 const nativeResponseValue = wasm.CommitmentUpdate_free(this_obj);
16679                 // debug statements here
16680         }
16681         // struct LDKCVec_UpdateAddHTLCZ CommitmentUpdate_get_update_add_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
16682         export function CommitmentUpdate_get_update_add_htlcs(this_ptr: number): number[] {
16683                 if(!isWasmInitialized) {
16684                         throw new Error("initializeWasm() must be awaited first!");
16685                 }
16686                 const nativeResponseValue = wasm.CommitmentUpdate_get_update_add_htlcs(this_ptr);
16687                 return nativeResponseValue;
16688         }
16689         // void CommitmentUpdate_set_update_add_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateAddHTLCZ val);
16690         export function CommitmentUpdate_set_update_add_htlcs(this_ptr: number, val: number[]): void {
16691                 if(!isWasmInitialized) {
16692                         throw new Error("initializeWasm() must be awaited first!");
16693                 }
16694                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_add_htlcs(this_ptr, val);
16695                 // debug statements here
16696         }
16697         // struct LDKCVec_UpdateFulfillHTLCZ CommitmentUpdate_get_update_fulfill_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
16698         export function CommitmentUpdate_get_update_fulfill_htlcs(this_ptr: number): number[] {
16699                 if(!isWasmInitialized) {
16700                         throw new Error("initializeWasm() must be awaited first!");
16701                 }
16702                 const nativeResponseValue = wasm.CommitmentUpdate_get_update_fulfill_htlcs(this_ptr);
16703                 return nativeResponseValue;
16704         }
16705         // void CommitmentUpdate_set_update_fulfill_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFulfillHTLCZ val);
16706         export function CommitmentUpdate_set_update_fulfill_htlcs(this_ptr: number, val: number[]): void {
16707                 if(!isWasmInitialized) {
16708                         throw new Error("initializeWasm() must be awaited first!");
16709                 }
16710                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fulfill_htlcs(this_ptr, val);
16711                 // debug statements here
16712         }
16713         // struct LDKCVec_UpdateFailHTLCZ CommitmentUpdate_get_update_fail_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
16714         export function CommitmentUpdate_get_update_fail_htlcs(this_ptr: number): number[] {
16715                 if(!isWasmInitialized) {
16716                         throw new Error("initializeWasm() must be awaited first!");
16717                 }
16718                 const nativeResponseValue = wasm.CommitmentUpdate_get_update_fail_htlcs(this_ptr);
16719                 return nativeResponseValue;
16720         }
16721         // void CommitmentUpdate_set_update_fail_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailHTLCZ val);
16722         export function CommitmentUpdate_set_update_fail_htlcs(this_ptr: number, val: number[]): void {
16723                 if(!isWasmInitialized) {
16724                         throw new Error("initializeWasm() must be awaited first!");
16725                 }
16726                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fail_htlcs(this_ptr, val);
16727                 // debug statements here
16728         }
16729         // struct LDKCVec_UpdateFailMalformedHTLCZ CommitmentUpdate_get_update_fail_malformed_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
16730         export function CommitmentUpdate_get_update_fail_malformed_htlcs(this_ptr: number): number[] {
16731                 if(!isWasmInitialized) {
16732                         throw new Error("initializeWasm() must be awaited first!");
16733                 }
16734                 const nativeResponseValue = wasm.CommitmentUpdate_get_update_fail_malformed_htlcs(this_ptr);
16735                 return nativeResponseValue;
16736         }
16737         // void CommitmentUpdate_set_update_fail_malformed_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailMalformedHTLCZ val);
16738         export function CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr: number, val: number[]): void {
16739                 if(!isWasmInitialized) {
16740                         throw new Error("initializeWasm() must be awaited first!");
16741                 }
16742                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr, val);
16743                 // debug statements here
16744         }
16745         // struct LDKUpdateFee CommitmentUpdate_get_update_fee(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
16746         export function CommitmentUpdate_get_update_fee(this_ptr: number): number {
16747                 if(!isWasmInitialized) {
16748                         throw new Error("initializeWasm() must be awaited first!");
16749                 }
16750                 const nativeResponseValue = wasm.CommitmentUpdate_get_update_fee(this_ptr);
16751                 return nativeResponseValue;
16752         }
16753         // void CommitmentUpdate_set_update_fee(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKUpdateFee val);
16754         export function CommitmentUpdate_set_update_fee(this_ptr: number, val: number): void {
16755                 if(!isWasmInitialized) {
16756                         throw new Error("initializeWasm() must be awaited first!");
16757                 }
16758                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fee(this_ptr, val);
16759                 // debug statements here
16760         }
16761         // struct LDKCommitmentSigned CommitmentUpdate_get_commitment_signed(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
16762         export function CommitmentUpdate_get_commitment_signed(this_ptr: number): number {
16763                 if(!isWasmInitialized) {
16764                         throw new Error("initializeWasm() must be awaited first!");
16765                 }
16766                 const nativeResponseValue = wasm.CommitmentUpdate_get_commitment_signed(this_ptr);
16767                 return nativeResponseValue;
16768         }
16769         // void CommitmentUpdate_set_commitment_signed(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCommitmentSigned val);
16770         export function CommitmentUpdate_set_commitment_signed(this_ptr: number, val: number): void {
16771                 if(!isWasmInitialized) {
16772                         throw new Error("initializeWasm() must be awaited first!");
16773                 }
16774                 const nativeResponseValue = wasm.CommitmentUpdate_set_commitment_signed(this_ptr, val);
16775                 // debug statements here
16776         }
16777         // 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);
16778         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 {
16779                 if(!isWasmInitialized) {
16780                         throw new Error("initializeWasm() must be awaited first!");
16781                 }
16782                 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);
16783                 return nativeResponseValue;
16784         }
16785         // uint64_t CommitmentUpdate_clone_ptr(LDKCommitmentUpdate *NONNULL_PTR arg);
16786         export function CommitmentUpdate_clone_ptr(arg: number): number {
16787                 if(!isWasmInitialized) {
16788                         throw new Error("initializeWasm() must be awaited first!");
16789                 }
16790                 const nativeResponseValue = wasm.CommitmentUpdate_clone_ptr(arg);
16791                 return nativeResponseValue;
16792         }
16793         // struct LDKCommitmentUpdate CommitmentUpdate_clone(const struct LDKCommitmentUpdate *NONNULL_PTR orig);
16794         export function CommitmentUpdate_clone(orig: number): number {
16795                 if(!isWasmInitialized) {
16796                         throw new Error("initializeWasm() must be awaited first!");
16797                 }
16798                 const nativeResponseValue = wasm.CommitmentUpdate_clone(orig);
16799                 return nativeResponseValue;
16800         }
16801         // void ChannelMessageHandler_free(struct LDKChannelMessageHandler this_ptr);
16802         export function ChannelMessageHandler_free(this_ptr: number): void {
16803                 if(!isWasmInitialized) {
16804                         throw new Error("initializeWasm() must be awaited first!");
16805                 }
16806                 const nativeResponseValue = wasm.ChannelMessageHandler_free(this_ptr);
16807                 // debug statements here
16808         }
16809         // void RoutingMessageHandler_free(struct LDKRoutingMessageHandler this_ptr);
16810         export function RoutingMessageHandler_free(this_ptr: number): void {
16811                 if(!isWasmInitialized) {
16812                         throw new Error("initializeWasm() must be awaited first!");
16813                 }
16814                 const nativeResponseValue = wasm.RoutingMessageHandler_free(this_ptr);
16815                 // debug statements here
16816         }
16817         // struct LDKCVec_u8Z AcceptChannel_write(const struct LDKAcceptChannel *NONNULL_PTR obj);
16818         export function AcceptChannel_write(obj: number): Uint8Array {
16819                 if(!isWasmInitialized) {
16820                         throw new Error("initializeWasm() must be awaited first!");
16821                 }
16822                 const nativeResponseValue = wasm.AcceptChannel_write(obj);
16823                 return decodeArray(nativeResponseValue);
16824         }
16825         // struct LDKCResult_AcceptChannelDecodeErrorZ AcceptChannel_read(struct LDKu8slice ser);
16826         export function AcceptChannel_read(ser: Uint8Array): number {
16827                 if(!isWasmInitialized) {
16828                         throw new Error("initializeWasm() must be awaited first!");
16829                 }
16830                 const nativeResponseValue = wasm.AcceptChannel_read(encodeArray(ser));
16831                 return nativeResponseValue;
16832         }
16833         // struct LDKCVec_u8Z AnnouncementSignatures_write(const struct LDKAnnouncementSignatures *NONNULL_PTR obj);
16834         export function AnnouncementSignatures_write(obj: number): Uint8Array {
16835                 if(!isWasmInitialized) {
16836                         throw new Error("initializeWasm() must be awaited first!");
16837                 }
16838                 const nativeResponseValue = wasm.AnnouncementSignatures_write(obj);
16839                 return decodeArray(nativeResponseValue);
16840         }
16841         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ AnnouncementSignatures_read(struct LDKu8slice ser);
16842         export function AnnouncementSignatures_read(ser: Uint8Array): number {
16843                 if(!isWasmInitialized) {
16844                         throw new Error("initializeWasm() must be awaited first!");
16845                 }
16846                 const nativeResponseValue = wasm.AnnouncementSignatures_read(encodeArray(ser));
16847                 return nativeResponseValue;
16848         }
16849         // struct LDKCVec_u8Z ChannelReestablish_write(const struct LDKChannelReestablish *NONNULL_PTR obj);
16850         export function ChannelReestablish_write(obj: number): Uint8Array {
16851                 if(!isWasmInitialized) {
16852                         throw new Error("initializeWasm() must be awaited first!");
16853                 }
16854                 const nativeResponseValue = wasm.ChannelReestablish_write(obj);
16855                 return decodeArray(nativeResponseValue);
16856         }
16857         // struct LDKCResult_ChannelReestablishDecodeErrorZ ChannelReestablish_read(struct LDKu8slice ser);
16858         export function ChannelReestablish_read(ser: Uint8Array): number {
16859                 if(!isWasmInitialized) {
16860                         throw new Error("initializeWasm() must be awaited first!");
16861                 }
16862                 const nativeResponseValue = wasm.ChannelReestablish_read(encodeArray(ser));
16863                 return nativeResponseValue;
16864         }
16865         // struct LDKCVec_u8Z ClosingSigned_write(const struct LDKClosingSigned *NONNULL_PTR obj);
16866         export function ClosingSigned_write(obj: number): Uint8Array {
16867                 if(!isWasmInitialized) {
16868                         throw new Error("initializeWasm() must be awaited first!");
16869                 }
16870                 const nativeResponseValue = wasm.ClosingSigned_write(obj);
16871                 return decodeArray(nativeResponseValue);
16872         }
16873         // struct LDKCResult_ClosingSignedDecodeErrorZ ClosingSigned_read(struct LDKu8slice ser);
16874         export function ClosingSigned_read(ser: Uint8Array): number {
16875                 if(!isWasmInitialized) {
16876                         throw new Error("initializeWasm() must be awaited first!");
16877                 }
16878                 const nativeResponseValue = wasm.ClosingSigned_read(encodeArray(ser));
16879                 return nativeResponseValue;
16880         }
16881         // struct LDKCVec_u8Z ClosingSignedFeeRange_write(const struct LDKClosingSignedFeeRange *NONNULL_PTR obj);
16882         export function ClosingSignedFeeRange_write(obj: number): Uint8Array {
16883                 if(!isWasmInitialized) {
16884                         throw new Error("initializeWasm() must be awaited first!");
16885                 }
16886                 const nativeResponseValue = wasm.ClosingSignedFeeRange_write(obj);
16887                 return decodeArray(nativeResponseValue);
16888         }
16889         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ ClosingSignedFeeRange_read(struct LDKu8slice ser);
16890         export function ClosingSignedFeeRange_read(ser: Uint8Array): number {
16891                 if(!isWasmInitialized) {
16892                         throw new Error("initializeWasm() must be awaited first!");
16893                 }
16894                 const nativeResponseValue = wasm.ClosingSignedFeeRange_read(encodeArray(ser));
16895                 return nativeResponseValue;
16896         }
16897         // struct LDKCVec_u8Z CommitmentSigned_write(const struct LDKCommitmentSigned *NONNULL_PTR obj);
16898         export function CommitmentSigned_write(obj: number): Uint8Array {
16899                 if(!isWasmInitialized) {
16900                         throw new Error("initializeWasm() must be awaited first!");
16901                 }
16902                 const nativeResponseValue = wasm.CommitmentSigned_write(obj);
16903                 return decodeArray(nativeResponseValue);
16904         }
16905         // struct LDKCResult_CommitmentSignedDecodeErrorZ CommitmentSigned_read(struct LDKu8slice ser);
16906         export function CommitmentSigned_read(ser: Uint8Array): number {
16907                 if(!isWasmInitialized) {
16908                         throw new Error("initializeWasm() must be awaited first!");
16909                 }
16910                 const nativeResponseValue = wasm.CommitmentSigned_read(encodeArray(ser));
16911                 return nativeResponseValue;
16912         }
16913         // struct LDKCVec_u8Z FundingCreated_write(const struct LDKFundingCreated *NONNULL_PTR obj);
16914         export function FundingCreated_write(obj: number): Uint8Array {
16915                 if(!isWasmInitialized) {
16916                         throw new Error("initializeWasm() must be awaited first!");
16917                 }
16918                 const nativeResponseValue = wasm.FundingCreated_write(obj);
16919                 return decodeArray(nativeResponseValue);
16920         }
16921         // struct LDKCResult_FundingCreatedDecodeErrorZ FundingCreated_read(struct LDKu8slice ser);
16922         export function FundingCreated_read(ser: Uint8Array): number {
16923                 if(!isWasmInitialized) {
16924                         throw new Error("initializeWasm() must be awaited first!");
16925                 }
16926                 const nativeResponseValue = wasm.FundingCreated_read(encodeArray(ser));
16927                 return nativeResponseValue;
16928         }
16929         // struct LDKCVec_u8Z FundingSigned_write(const struct LDKFundingSigned *NONNULL_PTR obj);
16930         export function FundingSigned_write(obj: number): Uint8Array {
16931                 if(!isWasmInitialized) {
16932                         throw new Error("initializeWasm() must be awaited first!");
16933                 }
16934                 const nativeResponseValue = wasm.FundingSigned_write(obj);
16935                 return decodeArray(nativeResponseValue);
16936         }
16937         // struct LDKCResult_FundingSignedDecodeErrorZ FundingSigned_read(struct LDKu8slice ser);
16938         export function FundingSigned_read(ser: Uint8Array): number {
16939                 if(!isWasmInitialized) {
16940                         throw new Error("initializeWasm() must be awaited first!");
16941                 }
16942                 const nativeResponseValue = wasm.FundingSigned_read(encodeArray(ser));
16943                 return nativeResponseValue;
16944         }
16945         // struct LDKCVec_u8Z FundingLocked_write(const struct LDKFundingLocked *NONNULL_PTR obj);
16946         export function FundingLocked_write(obj: number): Uint8Array {
16947                 if(!isWasmInitialized) {
16948                         throw new Error("initializeWasm() must be awaited first!");
16949                 }
16950                 const nativeResponseValue = wasm.FundingLocked_write(obj);
16951                 return decodeArray(nativeResponseValue);
16952         }
16953         // struct LDKCResult_FundingLockedDecodeErrorZ FundingLocked_read(struct LDKu8slice ser);
16954         export function FundingLocked_read(ser: Uint8Array): number {
16955                 if(!isWasmInitialized) {
16956                         throw new Error("initializeWasm() must be awaited first!");
16957                 }
16958                 const nativeResponseValue = wasm.FundingLocked_read(encodeArray(ser));
16959                 return nativeResponseValue;
16960         }
16961         // struct LDKCVec_u8Z Init_write(const struct LDKInit *NONNULL_PTR obj);
16962         export function Init_write(obj: number): Uint8Array {
16963                 if(!isWasmInitialized) {
16964                         throw new Error("initializeWasm() must be awaited first!");
16965                 }
16966                 const nativeResponseValue = wasm.Init_write(obj);
16967                 return decodeArray(nativeResponseValue);
16968         }
16969         // struct LDKCResult_InitDecodeErrorZ Init_read(struct LDKu8slice ser);
16970         export function Init_read(ser: Uint8Array): number {
16971                 if(!isWasmInitialized) {
16972                         throw new Error("initializeWasm() must be awaited first!");
16973                 }
16974                 const nativeResponseValue = wasm.Init_read(encodeArray(ser));
16975                 return nativeResponseValue;
16976         }
16977         // struct LDKCVec_u8Z OpenChannel_write(const struct LDKOpenChannel *NONNULL_PTR obj);
16978         export function OpenChannel_write(obj: number): Uint8Array {
16979                 if(!isWasmInitialized) {
16980                         throw new Error("initializeWasm() must be awaited first!");
16981                 }
16982                 const nativeResponseValue = wasm.OpenChannel_write(obj);
16983                 return decodeArray(nativeResponseValue);
16984         }
16985         // struct LDKCResult_OpenChannelDecodeErrorZ OpenChannel_read(struct LDKu8slice ser);
16986         export function OpenChannel_read(ser: Uint8Array): number {
16987                 if(!isWasmInitialized) {
16988                         throw new Error("initializeWasm() must be awaited first!");
16989                 }
16990                 const nativeResponseValue = wasm.OpenChannel_read(encodeArray(ser));
16991                 return nativeResponseValue;
16992         }
16993         // struct LDKCVec_u8Z RevokeAndACK_write(const struct LDKRevokeAndACK *NONNULL_PTR obj);
16994         export function RevokeAndACK_write(obj: number): Uint8Array {
16995                 if(!isWasmInitialized) {
16996                         throw new Error("initializeWasm() must be awaited first!");
16997                 }
16998                 const nativeResponseValue = wasm.RevokeAndACK_write(obj);
16999                 return decodeArray(nativeResponseValue);
17000         }
17001         // struct LDKCResult_RevokeAndACKDecodeErrorZ RevokeAndACK_read(struct LDKu8slice ser);
17002         export function RevokeAndACK_read(ser: Uint8Array): number {
17003                 if(!isWasmInitialized) {
17004                         throw new Error("initializeWasm() must be awaited first!");
17005                 }
17006                 const nativeResponseValue = wasm.RevokeAndACK_read(encodeArray(ser));
17007                 return nativeResponseValue;
17008         }
17009         // struct LDKCVec_u8Z Shutdown_write(const struct LDKShutdown *NONNULL_PTR obj);
17010         export function Shutdown_write(obj: number): Uint8Array {
17011                 if(!isWasmInitialized) {
17012                         throw new Error("initializeWasm() must be awaited first!");
17013                 }
17014                 const nativeResponseValue = wasm.Shutdown_write(obj);
17015                 return decodeArray(nativeResponseValue);
17016         }
17017         // struct LDKCResult_ShutdownDecodeErrorZ Shutdown_read(struct LDKu8slice ser);
17018         export function Shutdown_read(ser: Uint8Array): number {
17019                 if(!isWasmInitialized) {
17020                         throw new Error("initializeWasm() must be awaited first!");
17021                 }
17022                 const nativeResponseValue = wasm.Shutdown_read(encodeArray(ser));
17023                 return nativeResponseValue;
17024         }
17025         // struct LDKCVec_u8Z UpdateFailHTLC_write(const struct LDKUpdateFailHTLC *NONNULL_PTR obj);
17026         export function UpdateFailHTLC_write(obj: number): Uint8Array {
17027                 if(!isWasmInitialized) {
17028                         throw new Error("initializeWasm() must be awaited first!");
17029                 }
17030                 const nativeResponseValue = wasm.UpdateFailHTLC_write(obj);
17031                 return decodeArray(nativeResponseValue);
17032         }
17033         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ UpdateFailHTLC_read(struct LDKu8slice ser);
17034         export function UpdateFailHTLC_read(ser: Uint8Array): number {
17035                 if(!isWasmInitialized) {
17036                         throw new Error("initializeWasm() must be awaited first!");
17037                 }
17038                 const nativeResponseValue = wasm.UpdateFailHTLC_read(encodeArray(ser));
17039                 return nativeResponseValue;
17040         }
17041         // struct LDKCVec_u8Z UpdateFailMalformedHTLC_write(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR obj);
17042         export function UpdateFailMalformedHTLC_write(obj: number): Uint8Array {
17043                 if(!isWasmInitialized) {
17044                         throw new Error("initializeWasm() must be awaited first!");
17045                 }
17046                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_write(obj);
17047                 return decodeArray(nativeResponseValue);
17048         }
17049         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ UpdateFailMalformedHTLC_read(struct LDKu8slice ser);
17050         export function UpdateFailMalformedHTLC_read(ser: Uint8Array): number {
17051                 if(!isWasmInitialized) {
17052                         throw new Error("initializeWasm() must be awaited first!");
17053                 }
17054                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_read(encodeArray(ser));
17055                 return nativeResponseValue;
17056         }
17057         // struct LDKCVec_u8Z UpdateFee_write(const struct LDKUpdateFee *NONNULL_PTR obj);
17058         export function UpdateFee_write(obj: number): Uint8Array {
17059                 if(!isWasmInitialized) {
17060                         throw new Error("initializeWasm() must be awaited first!");
17061                 }
17062                 const nativeResponseValue = wasm.UpdateFee_write(obj);
17063                 return decodeArray(nativeResponseValue);
17064         }
17065         // struct LDKCResult_UpdateFeeDecodeErrorZ UpdateFee_read(struct LDKu8slice ser);
17066         export function UpdateFee_read(ser: Uint8Array): number {
17067                 if(!isWasmInitialized) {
17068                         throw new Error("initializeWasm() must be awaited first!");
17069                 }
17070                 const nativeResponseValue = wasm.UpdateFee_read(encodeArray(ser));
17071                 return nativeResponseValue;
17072         }
17073         // struct LDKCVec_u8Z UpdateFulfillHTLC_write(const struct LDKUpdateFulfillHTLC *NONNULL_PTR obj);
17074         export function UpdateFulfillHTLC_write(obj: number): Uint8Array {
17075                 if(!isWasmInitialized) {
17076                         throw new Error("initializeWasm() must be awaited first!");
17077                 }
17078                 const nativeResponseValue = wasm.UpdateFulfillHTLC_write(obj);
17079                 return decodeArray(nativeResponseValue);
17080         }
17081         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ UpdateFulfillHTLC_read(struct LDKu8slice ser);
17082         export function UpdateFulfillHTLC_read(ser: Uint8Array): number {
17083                 if(!isWasmInitialized) {
17084                         throw new Error("initializeWasm() must be awaited first!");
17085                 }
17086                 const nativeResponseValue = wasm.UpdateFulfillHTLC_read(encodeArray(ser));
17087                 return nativeResponseValue;
17088         }
17089         // struct LDKCVec_u8Z UpdateAddHTLC_write(const struct LDKUpdateAddHTLC *NONNULL_PTR obj);
17090         export function UpdateAddHTLC_write(obj: number): Uint8Array {
17091                 if(!isWasmInitialized) {
17092                         throw new Error("initializeWasm() must be awaited first!");
17093                 }
17094                 const nativeResponseValue = wasm.UpdateAddHTLC_write(obj);
17095                 return decodeArray(nativeResponseValue);
17096         }
17097         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ UpdateAddHTLC_read(struct LDKu8slice ser);
17098         export function UpdateAddHTLC_read(ser: Uint8Array): number {
17099                 if(!isWasmInitialized) {
17100                         throw new Error("initializeWasm() must be awaited first!");
17101                 }
17102                 const nativeResponseValue = wasm.UpdateAddHTLC_read(encodeArray(ser));
17103                 return nativeResponseValue;
17104         }
17105         // struct LDKCVec_u8Z Ping_write(const struct LDKPing *NONNULL_PTR obj);
17106         export function Ping_write(obj: number): Uint8Array {
17107                 if(!isWasmInitialized) {
17108                         throw new Error("initializeWasm() must be awaited first!");
17109                 }
17110                 const nativeResponseValue = wasm.Ping_write(obj);
17111                 return decodeArray(nativeResponseValue);
17112         }
17113         // struct LDKCResult_PingDecodeErrorZ Ping_read(struct LDKu8slice ser);
17114         export function Ping_read(ser: Uint8Array): number {
17115                 if(!isWasmInitialized) {
17116                         throw new Error("initializeWasm() must be awaited first!");
17117                 }
17118                 const nativeResponseValue = wasm.Ping_read(encodeArray(ser));
17119                 return nativeResponseValue;
17120         }
17121         // struct LDKCVec_u8Z Pong_write(const struct LDKPong *NONNULL_PTR obj);
17122         export function Pong_write(obj: number): Uint8Array {
17123                 if(!isWasmInitialized) {
17124                         throw new Error("initializeWasm() must be awaited first!");
17125                 }
17126                 const nativeResponseValue = wasm.Pong_write(obj);
17127                 return decodeArray(nativeResponseValue);
17128         }
17129         // struct LDKCResult_PongDecodeErrorZ Pong_read(struct LDKu8slice ser);
17130         export function Pong_read(ser: Uint8Array): number {
17131                 if(!isWasmInitialized) {
17132                         throw new Error("initializeWasm() must be awaited first!");
17133                 }
17134                 const nativeResponseValue = wasm.Pong_read(encodeArray(ser));
17135                 return nativeResponseValue;
17136         }
17137         // struct LDKCVec_u8Z UnsignedChannelAnnouncement_write(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR obj);
17138         export function UnsignedChannelAnnouncement_write(obj: number): Uint8Array {
17139                 if(!isWasmInitialized) {
17140                         throw new Error("initializeWasm() must be awaited first!");
17141                 }
17142                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_write(obj);
17143                 return decodeArray(nativeResponseValue);
17144         }
17145         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ UnsignedChannelAnnouncement_read(struct LDKu8slice ser);
17146         export function UnsignedChannelAnnouncement_read(ser: Uint8Array): number {
17147                 if(!isWasmInitialized) {
17148                         throw new Error("initializeWasm() must be awaited first!");
17149                 }
17150                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_read(encodeArray(ser));
17151                 return nativeResponseValue;
17152         }
17153         // struct LDKCVec_u8Z ChannelAnnouncement_write(const struct LDKChannelAnnouncement *NONNULL_PTR obj);
17154         export function ChannelAnnouncement_write(obj: number): Uint8Array {
17155                 if(!isWasmInitialized) {
17156                         throw new Error("initializeWasm() must be awaited first!");
17157                 }
17158                 const nativeResponseValue = wasm.ChannelAnnouncement_write(obj);
17159                 return decodeArray(nativeResponseValue);
17160         }
17161         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ ChannelAnnouncement_read(struct LDKu8slice ser);
17162         export function ChannelAnnouncement_read(ser: Uint8Array): number {
17163                 if(!isWasmInitialized) {
17164                         throw new Error("initializeWasm() must be awaited first!");
17165                 }
17166                 const nativeResponseValue = wasm.ChannelAnnouncement_read(encodeArray(ser));
17167                 return nativeResponseValue;
17168         }
17169         // struct LDKCVec_u8Z UnsignedChannelUpdate_write(const struct LDKUnsignedChannelUpdate *NONNULL_PTR obj);
17170         export function UnsignedChannelUpdate_write(obj: number): Uint8Array {
17171                 if(!isWasmInitialized) {
17172                         throw new Error("initializeWasm() must be awaited first!");
17173                 }
17174                 const nativeResponseValue = wasm.UnsignedChannelUpdate_write(obj);
17175                 return decodeArray(nativeResponseValue);
17176         }
17177         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ UnsignedChannelUpdate_read(struct LDKu8slice ser);
17178         export function UnsignedChannelUpdate_read(ser: Uint8Array): number {
17179                 if(!isWasmInitialized) {
17180                         throw new Error("initializeWasm() must be awaited first!");
17181                 }
17182                 const nativeResponseValue = wasm.UnsignedChannelUpdate_read(encodeArray(ser));
17183                 return nativeResponseValue;
17184         }
17185         // struct LDKCVec_u8Z ChannelUpdate_write(const struct LDKChannelUpdate *NONNULL_PTR obj);
17186         export function ChannelUpdate_write(obj: number): Uint8Array {
17187                 if(!isWasmInitialized) {
17188                         throw new Error("initializeWasm() must be awaited first!");
17189                 }
17190                 const nativeResponseValue = wasm.ChannelUpdate_write(obj);
17191                 return decodeArray(nativeResponseValue);
17192         }
17193         // struct LDKCResult_ChannelUpdateDecodeErrorZ ChannelUpdate_read(struct LDKu8slice ser);
17194         export function ChannelUpdate_read(ser: Uint8Array): number {
17195                 if(!isWasmInitialized) {
17196                         throw new Error("initializeWasm() must be awaited first!");
17197                 }
17198                 const nativeResponseValue = wasm.ChannelUpdate_read(encodeArray(ser));
17199                 return nativeResponseValue;
17200         }
17201         // struct LDKCVec_u8Z ErrorMessage_write(const struct LDKErrorMessage *NONNULL_PTR obj);
17202         export function ErrorMessage_write(obj: number): Uint8Array {
17203                 if(!isWasmInitialized) {
17204                         throw new Error("initializeWasm() must be awaited first!");
17205                 }
17206                 const nativeResponseValue = wasm.ErrorMessage_write(obj);
17207                 return decodeArray(nativeResponseValue);
17208         }
17209         // struct LDKCResult_ErrorMessageDecodeErrorZ ErrorMessage_read(struct LDKu8slice ser);
17210         export function ErrorMessage_read(ser: Uint8Array): number {
17211                 if(!isWasmInitialized) {
17212                         throw new Error("initializeWasm() must be awaited first!");
17213                 }
17214                 const nativeResponseValue = wasm.ErrorMessage_read(encodeArray(ser));
17215                 return nativeResponseValue;
17216         }
17217         // struct LDKCVec_u8Z UnsignedNodeAnnouncement_write(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR obj);
17218         export function UnsignedNodeAnnouncement_write(obj: number): Uint8Array {
17219                 if(!isWasmInitialized) {
17220                         throw new Error("initializeWasm() must be awaited first!");
17221                 }
17222                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_write(obj);
17223                 return decodeArray(nativeResponseValue);
17224         }
17225         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ UnsignedNodeAnnouncement_read(struct LDKu8slice ser);
17226         export function UnsignedNodeAnnouncement_read(ser: Uint8Array): number {
17227                 if(!isWasmInitialized) {
17228                         throw new Error("initializeWasm() must be awaited first!");
17229                 }
17230                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_read(encodeArray(ser));
17231                 return nativeResponseValue;
17232         }
17233         // struct LDKCVec_u8Z NodeAnnouncement_write(const struct LDKNodeAnnouncement *NONNULL_PTR obj);
17234         export function NodeAnnouncement_write(obj: number): Uint8Array {
17235                 if(!isWasmInitialized) {
17236                         throw new Error("initializeWasm() must be awaited first!");
17237                 }
17238                 const nativeResponseValue = wasm.NodeAnnouncement_write(obj);
17239                 return decodeArray(nativeResponseValue);
17240         }
17241         // struct LDKCResult_NodeAnnouncementDecodeErrorZ NodeAnnouncement_read(struct LDKu8slice ser);
17242         export function NodeAnnouncement_read(ser: Uint8Array): number {
17243                 if(!isWasmInitialized) {
17244                         throw new Error("initializeWasm() must be awaited first!");
17245                 }
17246                 const nativeResponseValue = wasm.NodeAnnouncement_read(encodeArray(ser));
17247                 return nativeResponseValue;
17248         }
17249         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ QueryShortChannelIds_read(struct LDKu8slice ser);
17250         export function QueryShortChannelIds_read(ser: Uint8Array): number {
17251                 if(!isWasmInitialized) {
17252                         throw new Error("initializeWasm() must be awaited first!");
17253                 }
17254                 const nativeResponseValue = wasm.QueryShortChannelIds_read(encodeArray(ser));
17255                 return nativeResponseValue;
17256         }
17257         // struct LDKCVec_u8Z QueryShortChannelIds_write(const struct LDKQueryShortChannelIds *NONNULL_PTR obj);
17258         export function QueryShortChannelIds_write(obj: number): Uint8Array {
17259                 if(!isWasmInitialized) {
17260                         throw new Error("initializeWasm() must be awaited first!");
17261                 }
17262                 const nativeResponseValue = wasm.QueryShortChannelIds_write(obj);
17263                 return decodeArray(nativeResponseValue);
17264         }
17265         // struct LDKCVec_u8Z ReplyShortChannelIdsEnd_write(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR obj);
17266         export function ReplyShortChannelIdsEnd_write(obj: number): Uint8Array {
17267                 if(!isWasmInitialized) {
17268                         throw new Error("initializeWasm() must be awaited first!");
17269                 }
17270                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_write(obj);
17271                 return decodeArray(nativeResponseValue);
17272         }
17273         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ ReplyShortChannelIdsEnd_read(struct LDKu8slice ser);
17274         export function ReplyShortChannelIdsEnd_read(ser: Uint8Array): number {
17275                 if(!isWasmInitialized) {
17276                         throw new Error("initializeWasm() must be awaited first!");
17277                 }
17278                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_read(encodeArray(ser));
17279                 return nativeResponseValue;
17280         }
17281         // MUST_USE_RES uint32_t QueryChannelRange_end_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_arg);
17282         export function QueryChannelRange_end_blocknum(this_arg: number): number {
17283                 if(!isWasmInitialized) {
17284                         throw new Error("initializeWasm() must be awaited first!");
17285                 }
17286                 const nativeResponseValue = wasm.QueryChannelRange_end_blocknum(this_arg);
17287                 return nativeResponseValue;
17288         }
17289         // struct LDKCVec_u8Z QueryChannelRange_write(const struct LDKQueryChannelRange *NONNULL_PTR obj);
17290         export function QueryChannelRange_write(obj: number): Uint8Array {
17291                 if(!isWasmInitialized) {
17292                         throw new Error("initializeWasm() must be awaited first!");
17293                 }
17294                 const nativeResponseValue = wasm.QueryChannelRange_write(obj);
17295                 return decodeArray(nativeResponseValue);
17296         }
17297         // struct LDKCResult_QueryChannelRangeDecodeErrorZ QueryChannelRange_read(struct LDKu8slice ser);
17298         export function QueryChannelRange_read(ser: Uint8Array): number {
17299                 if(!isWasmInitialized) {
17300                         throw new Error("initializeWasm() must be awaited first!");
17301                 }
17302                 const nativeResponseValue = wasm.QueryChannelRange_read(encodeArray(ser));
17303                 return nativeResponseValue;
17304         }
17305         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ ReplyChannelRange_read(struct LDKu8slice ser);
17306         export function ReplyChannelRange_read(ser: Uint8Array): number {
17307                 if(!isWasmInitialized) {
17308                         throw new Error("initializeWasm() must be awaited first!");
17309                 }
17310                 const nativeResponseValue = wasm.ReplyChannelRange_read(encodeArray(ser));
17311                 return nativeResponseValue;
17312         }
17313         // struct LDKCVec_u8Z ReplyChannelRange_write(const struct LDKReplyChannelRange *NONNULL_PTR obj);
17314         export function ReplyChannelRange_write(obj: number): Uint8Array {
17315                 if(!isWasmInitialized) {
17316                         throw new Error("initializeWasm() must be awaited first!");
17317                 }
17318                 const nativeResponseValue = wasm.ReplyChannelRange_write(obj);
17319                 return decodeArray(nativeResponseValue);
17320         }
17321         // struct LDKCVec_u8Z GossipTimestampFilter_write(const struct LDKGossipTimestampFilter *NONNULL_PTR obj);
17322         export function GossipTimestampFilter_write(obj: number): Uint8Array {
17323                 if(!isWasmInitialized) {
17324                         throw new Error("initializeWasm() must be awaited first!");
17325                 }
17326                 const nativeResponseValue = wasm.GossipTimestampFilter_write(obj);
17327                 return decodeArray(nativeResponseValue);
17328         }
17329         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ GossipTimestampFilter_read(struct LDKu8slice ser);
17330         export function GossipTimestampFilter_read(ser: Uint8Array): number {
17331                 if(!isWasmInitialized) {
17332                         throw new Error("initializeWasm() must be awaited first!");
17333                 }
17334                 const nativeResponseValue = wasm.GossipTimestampFilter_read(encodeArray(ser));
17335                 return nativeResponseValue;
17336         }
17337         // void CustomMessageHandler_free(struct LDKCustomMessageHandler this_ptr);
17338         export function CustomMessageHandler_free(this_ptr: number): void {
17339                 if(!isWasmInitialized) {
17340                         throw new Error("initializeWasm() must be awaited first!");
17341                 }
17342                 const nativeResponseValue = wasm.CustomMessageHandler_free(this_ptr);
17343                 // debug statements here
17344         }
17345         // void IgnoringMessageHandler_free(struct LDKIgnoringMessageHandler this_obj);
17346         export function IgnoringMessageHandler_free(this_obj: number): void {
17347                 if(!isWasmInitialized) {
17348                         throw new Error("initializeWasm() must be awaited first!");
17349                 }
17350                 const nativeResponseValue = wasm.IgnoringMessageHandler_free(this_obj);
17351                 // debug statements here
17352         }
17353         // MUST_USE_RES struct LDKIgnoringMessageHandler IgnoringMessageHandler_new(void);
17354         export function IgnoringMessageHandler_new(): number {
17355                 if(!isWasmInitialized) {
17356                         throw new Error("initializeWasm() must be awaited first!");
17357                 }
17358                 const nativeResponseValue = wasm.IgnoringMessageHandler_new();
17359                 return nativeResponseValue;
17360         }
17361         // struct LDKMessageSendEventsProvider IgnoringMessageHandler_as_MessageSendEventsProvider(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
17362         export function IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
17363                 if(!isWasmInitialized) {
17364                         throw new Error("initializeWasm() must be awaited first!");
17365                 }
17366                 const nativeResponseValue = wasm.IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg);
17367                 return nativeResponseValue;
17368         }
17369         // struct LDKRoutingMessageHandler IgnoringMessageHandler_as_RoutingMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
17370         export function IgnoringMessageHandler_as_RoutingMessageHandler(this_arg: number): number {
17371                 if(!isWasmInitialized) {
17372                         throw new Error("initializeWasm() must be awaited first!");
17373                 }
17374                 const nativeResponseValue = wasm.IgnoringMessageHandler_as_RoutingMessageHandler(this_arg);
17375                 return nativeResponseValue;
17376         }
17377         // struct LDKCustomMessageReader IgnoringMessageHandler_as_CustomMessageReader(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
17378         export function IgnoringMessageHandler_as_CustomMessageReader(this_arg: number): number {
17379                 if(!isWasmInitialized) {
17380                         throw new Error("initializeWasm() must be awaited first!");
17381                 }
17382                 const nativeResponseValue = wasm.IgnoringMessageHandler_as_CustomMessageReader(this_arg);
17383                 return nativeResponseValue;
17384         }
17385         // struct LDKCustomMessageHandler IgnoringMessageHandler_as_CustomMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
17386         export function IgnoringMessageHandler_as_CustomMessageHandler(this_arg: number): number {
17387                 if(!isWasmInitialized) {
17388                         throw new Error("initializeWasm() must be awaited first!");
17389                 }
17390                 const nativeResponseValue = wasm.IgnoringMessageHandler_as_CustomMessageHandler(this_arg);
17391                 return nativeResponseValue;
17392         }
17393         // void ErroringMessageHandler_free(struct LDKErroringMessageHandler this_obj);
17394         export function ErroringMessageHandler_free(this_obj: number): void {
17395                 if(!isWasmInitialized) {
17396                         throw new Error("initializeWasm() must be awaited first!");
17397                 }
17398                 const nativeResponseValue = wasm.ErroringMessageHandler_free(this_obj);
17399                 // debug statements here
17400         }
17401         // MUST_USE_RES struct LDKErroringMessageHandler ErroringMessageHandler_new(void);
17402         export function ErroringMessageHandler_new(): number {
17403                 if(!isWasmInitialized) {
17404                         throw new Error("initializeWasm() must be awaited first!");
17405                 }
17406                 const nativeResponseValue = wasm.ErroringMessageHandler_new();
17407                 return nativeResponseValue;
17408         }
17409         // struct LDKMessageSendEventsProvider ErroringMessageHandler_as_MessageSendEventsProvider(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
17410         export function ErroringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
17411                 if(!isWasmInitialized) {
17412                         throw new Error("initializeWasm() must be awaited first!");
17413                 }
17414                 const nativeResponseValue = wasm.ErroringMessageHandler_as_MessageSendEventsProvider(this_arg);
17415                 return nativeResponseValue;
17416         }
17417         // struct LDKChannelMessageHandler ErroringMessageHandler_as_ChannelMessageHandler(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
17418         export function ErroringMessageHandler_as_ChannelMessageHandler(this_arg: number): number {
17419                 if(!isWasmInitialized) {
17420                         throw new Error("initializeWasm() must be awaited first!");
17421                 }
17422                 const nativeResponseValue = wasm.ErroringMessageHandler_as_ChannelMessageHandler(this_arg);
17423                 return nativeResponseValue;
17424         }
17425         // void MessageHandler_free(struct LDKMessageHandler this_obj);
17426         export function MessageHandler_free(this_obj: number): void {
17427                 if(!isWasmInitialized) {
17428                         throw new Error("initializeWasm() must be awaited first!");
17429                 }
17430                 const nativeResponseValue = wasm.MessageHandler_free(this_obj);
17431                 // debug statements here
17432         }
17433         // const struct LDKChannelMessageHandler *MessageHandler_get_chan_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
17434         export function MessageHandler_get_chan_handler(this_ptr: number): number {
17435                 if(!isWasmInitialized) {
17436                         throw new Error("initializeWasm() must be awaited first!");
17437                 }
17438                 const nativeResponseValue = wasm.MessageHandler_get_chan_handler(this_ptr);
17439                 return nativeResponseValue;
17440         }
17441         // void MessageHandler_set_chan_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKChannelMessageHandler val);
17442         export function MessageHandler_set_chan_handler(this_ptr: number, val: number): void {
17443                 if(!isWasmInitialized) {
17444                         throw new Error("initializeWasm() must be awaited first!");
17445                 }
17446                 const nativeResponseValue = wasm.MessageHandler_set_chan_handler(this_ptr, val);
17447                 // debug statements here
17448         }
17449         // const struct LDKRoutingMessageHandler *MessageHandler_get_route_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
17450         export function MessageHandler_get_route_handler(this_ptr: number): number {
17451                 if(!isWasmInitialized) {
17452                         throw new Error("initializeWasm() must be awaited first!");
17453                 }
17454                 const nativeResponseValue = wasm.MessageHandler_get_route_handler(this_ptr);
17455                 return nativeResponseValue;
17456         }
17457         // void MessageHandler_set_route_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKRoutingMessageHandler val);
17458         export function MessageHandler_set_route_handler(this_ptr: number, val: number): void {
17459                 if(!isWasmInitialized) {
17460                         throw new Error("initializeWasm() must be awaited first!");
17461                 }
17462                 const nativeResponseValue = wasm.MessageHandler_set_route_handler(this_ptr, val);
17463                 // debug statements here
17464         }
17465         // MUST_USE_RES struct LDKMessageHandler MessageHandler_new(struct LDKChannelMessageHandler chan_handler_arg, struct LDKRoutingMessageHandler route_handler_arg);
17466         export function MessageHandler_new(chan_handler_arg: number, route_handler_arg: number): number {
17467                 if(!isWasmInitialized) {
17468                         throw new Error("initializeWasm() must be awaited first!");
17469                 }
17470                 const nativeResponseValue = wasm.MessageHandler_new(chan_handler_arg, route_handler_arg);
17471                 return nativeResponseValue;
17472         }
17473         // uint64_t SocketDescriptor_clone_ptr(LDKSocketDescriptor *NONNULL_PTR arg);
17474         export function SocketDescriptor_clone_ptr(arg: number): number {
17475                 if(!isWasmInitialized) {
17476                         throw new Error("initializeWasm() must be awaited first!");
17477                 }
17478                 const nativeResponseValue = wasm.SocketDescriptor_clone_ptr(arg);
17479                 return nativeResponseValue;
17480         }
17481         // struct LDKSocketDescriptor SocketDescriptor_clone(const struct LDKSocketDescriptor *NONNULL_PTR orig);
17482         export function SocketDescriptor_clone(orig: number): number {
17483                 if(!isWasmInitialized) {
17484                         throw new Error("initializeWasm() must be awaited first!");
17485                 }
17486                 const nativeResponseValue = wasm.SocketDescriptor_clone(orig);
17487                 return nativeResponseValue;
17488         }
17489         // void SocketDescriptor_free(struct LDKSocketDescriptor this_ptr);
17490         export function SocketDescriptor_free(this_ptr: number): void {
17491                 if(!isWasmInitialized) {
17492                         throw new Error("initializeWasm() must be awaited first!");
17493                 }
17494                 const nativeResponseValue = wasm.SocketDescriptor_free(this_ptr);
17495                 // debug statements here
17496         }
17497         // void PeerHandleError_free(struct LDKPeerHandleError this_obj);
17498         export function PeerHandleError_free(this_obj: number): void {
17499                 if(!isWasmInitialized) {
17500                         throw new Error("initializeWasm() must be awaited first!");
17501                 }
17502                 const nativeResponseValue = wasm.PeerHandleError_free(this_obj);
17503                 // debug statements here
17504         }
17505         // bool PeerHandleError_get_no_connection_possible(const struct LDKPeerHandleError *NONNULL_PTR this_ptr);
17506         export function PeerHandleError_get_no_connection_possible(this_ptr: number): boolean {
17507                 if(!isWasmInitialized) {
17508                         throw new Error("initializeWasm() must be awaited first!");
17509                 }
17510                 const nativeResponseValue = wasm.PeerHandleError_get_no_connection_possible(this_ptr);
17511                 return nativeResponseValue;
17512         }
17513         // void PeerHandleError_set_no_connection_possible(struct LDKPeerHandleError *NONNULL_PTR this_ptr, bool val);
17514         export function PeerHandleError_set_no_connection_possible(this_ptr: number, val: boolean): void {
17515                 if(!isWasmInitialized) {
17516                         throw new Error("initializeWasm() must be awaited first!");
17517                 }
17518                 const nativeResponseValue = wasm.PeerHandleError_set_no_connection_possible(this_ptr, val);
17519                 // debug statements here
17520         }
17521         // MUST_USE_RES struct LDKPeerHandleError PeerHandleError_new(bool no_connection_possible_arg);
17522         export function PeerHandleError_new(no_connection_possible_arg: boolean): number {
17523                 if(!isWasmInitialized) {
17524                         throw new Error("initializeWasm() must be awaited first!");
17525                 }
17526                 const nativeResponseValue = wasm.PeerHandleError_new(no_connection_possible_arg);
17527                 return nativeResponseValue;
17528         }
17529         // uint64_t PeerHandleError_clone_ptr(LDKPeerHandleError *NONNULL_PTR arg);
17530         export function PeerHandleError_clone_ptr(arg: number): number {
17531                 if(!isWasmInitialized) {
17532                         throw new Error("initializeWasm() must be awaited first!");
17533                 }
17534                 const nativeResponseValue = wasm.PeerHandleError_clone_ptr(arg);
17535                 return nativeResponseValue;
17536         }
17537         // struct LDKPeerHandleError PeerHandleError_clone(const struct LDKPeerHandleError *NONNULL_PTR orig);
17538         export function PeerHandleError_clone(orig: number): number {
17539                 if(!isWasmInitialized) {
17540                         throw new Error("initializeWasm() must be awaited first!");
17541                 }
17542                 const nativeResponseValue = wasm.PeerHandleError_clone(orig);
17543                 return nativeResponseValue;
17544         }
17545         // void PeerManager_free(struct LDKPeerManager this_obj);
17546         export function PeerManager_free(this_obj: number): void {
17547                 if(!isWasmInitialized) {
17548                         throw new Error("initializeWasm() must be awaited first!");
17549                 }
17550                 const nativeResponseValue = wasm.PeerManager_free(this_obj);
17551                 // debug statements here
17552         }
17553         // 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, struct LDKCustomMessageHandler custom_message_handler);
17554         export function PeerManager_new(message_handler: number, our_node_secret: Uint8Array, ephemeral_random_data: Uint8Array, logger: number, custom_message_handler: number): number {
17555                 if(!isWasmInitialized) {
17556                         throw new Error("initializeWasm() must be awaited first!");
17557                 }
17558                 const nativeResponseValue = wasm.PeerManager_new(message_handler, encodeArray(our_node_secret), encodeArray(ephemeral_random_data), logger, custom_message_handler);
17559                 return nativeResponseValue;
17560         }
17561         // MUST_USE_RES struct LDKCVec_PublicKeyZ PeerManager_get_peer_node_ids(const struct LDKPeerManager *NONNULL_PTR this_arg);
17562         export function PeerManager_get_peer_node_ids(this_arg: number): Uint8Array[] {
17563                 if(!isWasmInitialized) {
17564                         throw new Error("initializeWasm() must be awaited first!");
17565                 }
17566                 const nativeResponseValue = wasm.PeerManager_get_peer_node_ids(this_arg);
17567                 return nativeResponseValue;
17568         }
17569         // 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);
17570         export function PeerManager_new_outbound_connection(this_arg: number, their_node_id: Uint8Array, descriptor: number): number {
17571                 if(!isWasmInitialized) {
17572                         throw new Error("initializeWasm() must be awaited first!");
17573                 }
17574                 const nativeResponseValue = wasm.PeerManager_new_outbound_connection(this_arg, encodeArray(their_node_id), descriptor);
17575                 return nativeResponseValue;
17576         }
17577         // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_new_inbound_connection(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor descriptor);
17578         export function PeerManager_new_inbound_connection(this_arg: number, descriptor: number): number {
17579                 if(!isWasmInitialized) {
17580                         throw new Error("initializeWasm() must be awaited first!");
17581                 }
17582                 const nativeResponseValue = wasm.PeerManager_new_inbound_connection(this_arg, descriptor);
17583                 return nativeResponseValue;
17584         }
17585         // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_write_buffer_space_avail(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor *NONNULL_PTR descriptor);
17586         export function PeerManager_write_buffer_space_avail(this_arg: number, descriptor: number): number {
17587                 if(!isWasmInitialized) {
17588                         throw new Error("initializeWasm() must be awaited first!");
17589                 }
17590                 const nativeResponseValue = wasm.PeerManager_write_buffer_space_avail(this_arg, descriptor);
17591                 return nativeResponseValue;
17592         }
17593         // 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);
17594         export function PeerManager_read_event(this_arg: number, peer_descriptor: number, data: Uint8Array): number {
17595                 if(!isWasmInitialized) {
17596                         throw new Error("initializeWasm() must be awaited first!");
17597                 }
17598                 const nativeResponseValue = wasm.PeerManager_read_event(this_arg, peer_descriptor, encodeArray(data));
17599                 return nativeResponseValue;
17600         }
17601         // void PeerManager_process_events(const struct LDKPeerManager *NONNULL_PTR this_arg);
17602         export function PeerManager_process_events(this_arg: number): void {
17603                 if(!isWasmInitialized) {
17604                         throw new Error("initializeWasm() must be awaited first!");
17605                 }
17606                 const nativeResponseValue = wasm.PeerManager_process_events(this_arg);
17607                 // debug statements here
17608         }
17609         // void PeerManager_socket_disconnected(const struct LDKPeerManager *NONNULL_PTR this_arg, const struct LDKSocketDescriptor *NONNULL_PTR descriptor);
17610         export function PeerManager_socket_disconnected(this_arg: number, descriptor: number): void {
17611                 if(!isWasmInitialized) {
17612                         throw new Error("initializeWasm() must be awaited first!");
17613                 }
17614                 const nativeResponseValue = wasm.PeerManager_socket_disconnected(this_arg, descriptor);
17615                 // debug statements here
17616         }
17617         // void PeerManager_disconnect_by_node_id(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKPublicKey node_id, bool no_connection_possible);
17618         export function PeerManager_disconnect_by_node_id(this_arg: number, node_id: Uint8Array, no_connection_possible: boolean): void {
17619                 if(!isWasmInitialized) {
17620                         throw new Error("initializeWasm() must be awaited first!");
17621                 }
17622                 const nativeResponseValue = wasm.PeerManager_disconnect_by_node_id(this_arg, encodeArray(node_id), no_connection_possible);
17623                 // debug statements here
17624         }
17625         // void PeerManager_disconnect_all_peers(const struct LDKPeerManager *NONNULL_PTR this_arg);
17626         export function PeerManager_disconnect_all_peers(this_arg: number): void {
17627                 if(!isWasmInitialized) {
17628                         throw new Error("initializeWasm() must be awaited first!");
17629                 }
17630                 const nativeResponseValue = wasm.PeerManager_disconnect_all_peers(this_arg);
17631                 // debug statements here
17632         }
17633         // void PeerManager_timer_tick_occurred(const struct LDKPeerManager *NONNULL_PTR this_arg);
17634         export function PeerManager_timer_tick_occurred(this_arg: number): void {
17635                 if(!isWasmInitialized) {
17636                         throw new Error("initializeWasm() must be awaited first!");
17637                 }
17638                 const nativeResponseValue = wasm.PeerManager_timer_tick_occurred(this_arg);
17639                 // debug statements here
17640         }
17641         // uint64_t htlc_success_tx_weight(bool opt_anchors);
17642         export function htlc_success_tx_weight(opt_anchors: boolean): number {
17643                 if(!isWasmInitialized) {
17644                         throw new Error("initializeWasm() must be awaited first!");
17645                 }
17646                 const nativeResponseValue = wasm.htlc_success_tx_weight(opt_anchors);
17647                 return nativeResponseValue;
17648         }
17649         // uint64_t htlc_timeout_tx_weight(bool opt_anchors);
17650         export function htlc_timeout_tx_weight(opt_anchors: boolean): number {
17651                 if(!isWasmInitialized) {
17652                         throw new Error("initializeWasm() must be awaited first!");
17653                 }
17654                 const nativeResponseValue = wasm.htlc_timeout_tx_weight(opt_anchors);
17655                 return nativeResponseValue;
17656         }
17657         // struct LDKThirtyTwoBytes build_commitment_secret(const uint8_t (*commitment_seed)[32], uint64_t idx);
17658         export function build_commitment_secret(commitment_seed: Uint8Array, idx: number): Uint8Array {
17659                 if(!isWasmInitialized) {
17660                         throw new Error("initializeWasm() must be awaited first!");
17661                 }
17662                 const nativeResponseValue = wasm.build_commitment_secret(encodeArray(commitment_seed), idx);
17663                 return decodeArray(nativeResponseValue);
17664         }
17665         // struct LDKTransaction build_closing_transaction(uint64_t to_holder_value_sat, uint64_t to_counterparty_value_sat, struct LDKCVec_u8Z to_holder_script, struct LDKCVec_u8Z to_counterparty_script, struct LDKOutPoint funding_outpoint);
17666         export function build_closing_transaction(to_holder_value_sat: number, to_counterparty_value_sat: number, to_holder_script: Uint8Array, to_counterparty_script: Uint8Array, funding_outpoint: number): Uint8Array {
17667                 if(!isWasmInitialized) {
17668                         throw new Error("initializeWasm() must be awaited first!");
17669                 }
17670                 const nativeResponseValue = wasm.build_closing_transaction(to_holder_value_sat, to_counterparty_value_sat, encodeArray(to_holder_script), encodeArray(to_counterparty_script), funding_outpoint);
17671                 return decodeArray(nativeResponseValue);
17672         }
17673         // struct LDKCResult_SecretKeyErrorZ derive_private_key(struct LDKPublicKey per_commitment_point, const uint8_t (*base_secret)[32]);
17674         export function derive_private_key(per_commitment_point: Uint8Array, base_secret: Uint8Array): number {
17675                 if(!isWasmInitialized) {
17676                         throw new Error("initializeWasm() must be awaited first!");
17677                 }
17678                 const nativeResponseValue = wasm.derive_private_key(encodeArray(per_commitment_point), encodeArray(base_secret));
17679                 return nativeResponseValue;
17680         }
17681         // struct LDKCResult_PublicKeyErrorZ derive_public_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey base_point);
17682         export function derive_public_key(per_commitment_point: Uint8Array, base_point: Uint8Array): number {
17683                 if(!isWasmInitialized) {
17684                         throw new Error("initializeWasm() must be awaited first!");
17685                 }
17686                 const nativeResponseValue = wasm.derive_public_key(encodeArray(per_commitment_point), encodeArray(base_point));
17687                 return nativeResponseValue;
17688         }
17689         // struct LDKCResult_SecretKeyErrorZ derive_private_revocation_key(const uint8_t (*per_commitment_secret)[32], const uint8_t (*countersignatory_revocation_base_secret)[32]);
17690         export function derive_private_revocation_key(per_commitment_secret: Uint8Array, countersignatory_revocation_base_secret: Uint8Array): number {
17691                 if(!isWasmInitialized) {
17692                         throw new Error("initializeWasm() must be awaited first!");
17693                 }
17694                 const nativeResponseValue = wasm.derive_private_revocation_key(encodeArray(per_commitment_secret), encodeArray(countersignatory_revocation_base_secret));
17695                 return nativeResponseValue;
17696         }
17697         // struct LDKCResult_PublicKeyErrorZ derive_public_revocation_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey countersignatory_revocation_base_point);
17698         export function derive_public_revocation_key(per_commitment_point: Uint8Array, countersignatory_revocation_base_point: Uint8Array): number {
17699                 if(!isWasmInitialized) {
17700                         throw new Error("initializeWasm() must be awaited first!");
17701                 }
17702                 const nativeResponseValue = wasm.derive_public_revocation_key(encodeArray(per_commitment_point), encodeArray(countersignatory_revocation_base_point));
17703                 return nativeResponseValue;
17704         }
17705         // void TxCreationKeys_free(struct LDKTxCreationKeys this_obj);
17706         export function TxCreationKeys_free(this_obj: number): void {
17707                 if(!isWasmInitialized) {
17708                         throw new Error("initializeWasm() must be awaited first!");
17709                 }
17710                 const nativeResponseValue = wasm.TxCreationKeys_free(this_obj);
17711                 // debug statements here
17712         }
17713         // struct LDKPublicKey TxCreationKeys_get_per_commitment_point(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
17714         export function TxCreationKeys_get_per_commitment_point(this_ptr: number): Uint8Array {
17715                 if(!isWasmInitialized) {
17716                         throw new Error("initializeWasm() must be awaited first!");
17717                 }
17718                 const nativeResponseValue = wasm.TxCreationKeys_get_per_commitment_point(this_ptr);
17719                 return decodeArray(nativeResponseValue);
17720         }
17721         // void TxCreationKeys_set_per_commitment_point(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
17722         export function TxCreationKeys_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
17723                 if(!isWasmInitialized) {
17724                         throw new Error("initializeWasm() must be awaited first!");
17725                 }
17726                 const nativeResponseValue = wasm.TxCreationKeys_set_per_commitment_point(this_ptr, encodeArray(val));
17727                 // debug statements here
17728         }
17729         // struct LDKPublicKey TxCreationKeys_get_revocation_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
17730         export function TxCreationKeys_get_revocation_key(this_ptr: number): Uint8Array {
17731                 if(!isWasmInitialized) {
17732                         throw new Error("initializeWasm() must be awaited first!");
17733                 }
17734                 const nativeResponseValue = wasm.TxCreationKeys_get_revocation_key(this_ptr);
17735                 return decodeArray(nativeResponseValue);
17736         }
17737         // void TxCreationKeys_set_revocation_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
17738         export function TxCreationKeys_set_revocation_key(this_ptr: number, val: Uint8Array): void {
17739                 if(!isWasmInitialized) {
17740                         throw new Error("initializeWasm() must be awaited first!");
17741                 }
17742                 const nativeResponseValue = wasm.TxCreationKeys_set_revocation_key(this_ptr, encodeArray(val));
17743                 // debug statements here
17744         }
17745         // struct LDKPublicKey TxCreationKeys_get_broadcaster_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
17746         export function TxCreationKeys_get_broadcaster_htlc_key(this_ptr: number): Uint8Array {
17747                 if(!isWasmInitialized) {
17748                         throw new Error("initializeWasm() must be awaited first!");
17749                 }
17750                 const nativeResponseValue = wasm.TxCreationKeys_get_broadcaster_htlc_key(this_ptr);
17751                 return decodeArray(nativeResponseValue);
17752         }
17753         // void TxCreationKeys_set_broadcaster_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
17754         export function TxCreationKeys_set_broadcaster_htlc_key(this_ptr: number, val: Uint8Array): void {
17755                 if(!isWasmInitialized) {
17756                         throw new Error("initializeWasm() must be awaited first!");
17757                 }
17758                 const nativeResponseValue = wasm.TxCreationKeys_set_broadcaster_htlc_key(this_ptr, encodeArray(val));
17759                 // debug statements here
17760         }
17761         // struct LDKPublicKey TxCreationKeys_get_countersignatory_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
17762         export function TxCreationKeys_get_countersignatory_htlc_key(this_ptr: number): Uint8Array {
17763                 if(!isWasmInitialized) {
17764                         throw new Error("initializeWasm() must be awaited first!");
17765                 }
17766                 const nativeResponseValue = wasm.TxCreationKeys_get_countersignatory_htlc_key(this_ptr);
17767                 return decodeArray(nativeResponseValue);
17768         }
17769         // void TxCreationKeys_set_countersignatory_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
17770         export function TxCreationKeys_set_countersignatory_htlc_key(this_ptr: number, val: Uint8Array): void {
17771                 if(!isWasmInitialized) {
17772                         throw new Error("initializeWasm() must be awaited first!");
17773                 }
17774                 const nativeResponseValue = wasm.TxCreationKeys_set_countersignatory_htlc_key(this_ptr, encodeArray(val));
17775                 // debug statements here
17776         }
17777         // struct LDKPublicKey TxCreationKeys_get_broadcaster_delayed_payment_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
17778         export function TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr: number): Uint8Array {
17779                 if(!isWasmInitialized) {
17780                         throw new Error("initializeWasm() must be awaited first!");
17781                 }
17782                 const nativeResponseValue = wasm.TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr);
17783                 return decodeArray(nativeResponseValue);
17784         }
17785         // void TxCreationKeys_set_broadcaster_delayed_payment_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
17786         export function TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr: number, val: Uint8Array): void {
17787                 if(!isWasmInitialized) {
17788                         throw new Error("initializeWasm() must be awaited first!");
17789                 }
17790                 const nativeResponseValue = wasm.TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr, encodeArray(val));
17791                 // debug statements here
17792         }
17793         // 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);
17794         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 {
17795                 if(!isWasmInitialized) {
17796                         throw new Error("initializeWasm() must be awaited first!");
17797                 }
17798                 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));
17799                 return nativeResponseValue;
17800         }
17801         // uint64_t TxCreationKeys_clone_ptr(LDKTxCreationKeys *NONNULL_PTR arg);
17802         export function TxCreationKeys_clone_ptr(arg: number): number {
17803                 if(!isWasmInitialized) {
17804                         throw new Error("initializeWasm() must be awaited first!");
17805                 }
17806                 const nativeResponseValue = wasm.TxCreationKeys_clone_ptr(arg);
17807                 return nativeResponseValue;
17808         }
17809         // struct LDKTxCreationKeys TxCreationKeys_clone(const struct LDKTxCreationKeys *NONNULL_PTR orig);
17810         export function TxCreationKeys_clone(orig: number): number {
17811                 if(!isWasmInitialized) {
17812                         throw new Error("initializeWasm() must be awaited first!");
17813                 }
17814                 const nativeResponseValue = wasm.TxCreationKeys_clone(orig);
17815                 return nativeResponseValue;
17816         }
17817         // struct LDKCVec_u8Z TxCreationKeys_write(const struct LDKTxCreationKeys *NONNULL_PTR obj);
17818         export function TxCreationKeys_write(obj: number): Uint8Array {
17819                 if(!isWasmInitialized) {
17820                         throw new Error("initializeWasm() must be awaited first!");
17821                 }
17822                 const nativeResponseValue = wasm.TxCreationKeys_write(obj);
17823                 return decodeArray(nativeResponseValue);
17824         }
17825         // struct LDKCResult_TxCreationKeysDecodeErrorZ TxCreationKeys_read(struct LDKu8slice ser);
17826         export function TxCreationKeys_read(ser: Uint8Array): number {
17827                 if(!isWasmInitialized) {
17828                         throw new Error("initializeWasm() must be awaited first!");
17829                 }
17830                 const nativeResponseValue = wasm.TxCreationKeys_read(encodeArray(ser));
17831                 return nativeResponseValue;
17832         }
17833         // void ChannelPublicKeys_free(struct LDKChannelPublicKeys this_obj);
17834         export function ChannelPublicKeys_free(this_obj: number): void {
17835                 if(!isWasmInitialized) {
17836                         throw new Error("initializeWasm() must be awaited first!");
17837                 }
17838                 const nativeResponseValue = wasm.ChannelPublicKeys_free(this_obj);
17839                 // debug statements here
17840         }
17841         // struct LDKPublicKey ChannelPublicKeys_get_funding_pubkey(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
17842         export function ChannelPublicKeys_get_funding_pubkey(this_ptr: number): Uint8Array {
17843                 if(!isWasmInitialized) {
17844                         throw new Error("initializeWasm() must be awaited first!");
17845                 }
17846                 const nativeResponseValue = wasm.ChannelPublicKeys_get_funding_pubkey(this_ptr);
17847                 return decodeArray(nativeResponseValue);
17848         }
17849         // void ChannelPublicKeys_set_funding_pubkey(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
17850         export function ChannelPublicKeys_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
17851                 if(!isWasmInitialized) {
17852                         throw new Error("initializeWasm() must be awaited first!");
17853                 }
17854                 const nativeResponseValue = wasm.ChannelPublicKeys_set_funding_pubkey(this_ptr, encodeArray(val));
17855                 // debug statements here
17856         }
17857         // struct LDKPublicKey ChannelPublicKeys_get_revocation_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
17858         export function ChannelPublicKeys_get_revocation_basepoint(this_ptr: number): Uint8Array {
17859                 if(!isWasmInitialized) {
17860                         throw new Error("initializeWasm() must be awaited first!");
17861                 }
17862                 const nativeResponseValue = wasm.ChannelPublicKeys_get_revocation_basepoint(this_ptr);
17863                 return decodeArray(nativeResponseValue);
17864         }
17865         // void ChannelPublicKeys_set_revocation_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
17866         export function ChannelPublicKeys_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
17867                 if(!isWasmInitialized) {
17868                         throw new Error("initializeWasm() must be awaited first!");
17869                 }
17870                 const nativeResponseValue = wasm.ChannelPublicKeys_set_revocation_basepoint(this_ptr, encodeArray(val));
17871                 // debug statements here
17872         }
17873         // struct LDKPublicKey ChannelPublicKeys_get_payment_point(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
17874         export function ChannelPublicKeys_get_payment_point(this_ptr: number): Uint8Array {
17875                 if(!isWasmInitialized) {
17876                         throw new Error("initializeWasm() must be awaited first!");
17877                 }
17878                 const nativeResponseValue = wasm.ChannelPublicKeys_get_payment_point(this_ptr);
17879                 return decodeArray(nativeResponseValue);
17880         }
17881         // void ChannelPublicKeys_set_payment_point(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
17882         export function ChannelPublicKeys_set_payment_point(this_ptr: number, val: Uint8Array): void {
17883                 if(!isWasmInitialized) {
17884                         throw new Error("initializeWasm() must be awaited first!");
17885                 }
17886                 const nativeResponseValue = wasm.ChannelPublicKeys_set_payment_point(this_ptr, encodeArray(val));
17887                 // debug statements here
17888         }
17889         // struct LDKPublicKey ChannelPublicKeys_get_delayed_payment_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
17890         export function ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
17891                 if(!isWasmInitialized) {
17892                         throw new Error("initializeWasm() must be awaited first!");
17893                 }
17894                 const nativeResponseValue = wasm.ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr);
17895                 return decodeArray(nativeResponseValue);
17896         }
17897         // void ChannelPublicKeys_set_delayed_payment_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
17898         export function ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
17899                 if(!isWasmInitialized) {
17900                         throw new Error("initializeWasm() must be awaited first!");
17901                 }
17902                 const nativeResponseValue = wasm.ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
17903                 // debug statements here
17904         }
17905         // struct LDKPublicKey ChannelPublicKeys_get_htlc_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
17906         export function ChannelPublicKeys_get_htlc_basepoint(this_ptr: number): Uint8Array {
17907                 if(!isWasmInitialized) {
17908                         throw new Error("initializeWasm() must be awaited first!");
17909                 }
17910                 const nativeResponseValue = wasm.ChannelPublicKeys_get_htlc_basepoint(this_ptr);
17911                 return decodeArray(nativeResponseValue);
17912         }
17913         // void ChannelPublicKeys_set_htlc_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
17914         export function ChannelPublicKeys_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
17915                 if(!isWasmInitialized) {
17916                         throw new Error("initializeWasm() must be awaited first!");
17917                 }
17918                 const nativeResponseValue = wasm.ChannelPublicKeys_set_htlc_basepoint(this_ptr, encodeArray(val));
17919                 // debug statements here
17920         }
17921         // 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);
17922         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 {
17923                 if(!isWasmInitialized) {
17924                         throw new Error("initializeWasm() must be awaited first!");
17925                 }
17926                 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));
17927                 return nativeResponseValue;
17928         }
17929         // uint64_t ChannelPublicKeys_clone_ptr(LDKChannelPublicKeys *NONNULL_PTR arg);
17930         export function ChannelPublicKeys_clone_ptr(arg: number): number {
17931                 if(!isWasmInitialized) {
17932                         throw new Error("initializeWasm() must be awaited first!");
17933                 }
17934                 const nativeResponseValue = wasm.ChannelPublicKeys_clone_ptr(arg);
17935                 return nativeResponseValue;
17936         }
17937         // struct LDKChannelPublicKeys ChannelPublicKeys_clone(const struct LDKChannelPublicKeys *NONNULL_PTR orig);
17938         export function ChannelPublicKeys_clone(orig: number): number {
17939                 if(!isWasmInitialized) {
17940                         throw new Error("initializeWasm() must be awaited first!");
17941                 }
17942                 const nativeResponseValue = wasm.ChannelPublicKeys_clone(orig);
17943                 return nativeResponseValue;
17944         }
17945         // struct LDKCVec_u8Z ChannelPublicKeys_write(const struct LDKChannelPublicKeys *NONNULL_PTR obj);
17946         export function ChannelPublicKeys_write(obj: number): Uint8Array {
17947                 if(!isWasmInitialized) {
17948                         throw new Error("initializeWasm() must be awaited first!");
17949                 }
17950                 const nativeResponseValue = wasm.ChannelPublicKeys_write(obj);
17951                 return decodeArray(nativeResponseValue);
17952         }
17953         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ ChannelPublicKeys_read(struct LDKu8slice ser);
17954         export function ChannelPublicKeys_read(ser: Uint8Array): number {
17955                 if(!isWasmInitialized) {
17956                         throw new Error("initializeWasm() must be awaited first!");
17957                 }
17958                 const nativeResponseValue = wasm.ChannelPublicKeys_read(encodeArray(ser));
17959                 return nativeResponseValue;
17960         }
17961         // MUST_USE_RES struct LDKCResult_TxCreationKeysErrorZ TxCreationKeys_derive_new(struct LDKPublicKey per_commitment_point, struct LDKPublicKey broadcaster_delayed_payment_base, struct LDKPublicKey broadcaster_htlc_base, struct LDKPublicKey countersignatory_revocation_base, struct LDKPublicKey countersignatory_htlc_base);
17962         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 {
17963                 if(!isWasmInitialized) {
17964                         throw new Error("initializeWasm() must be awaited first!");
17965                 }
17966                 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));
17967                 return nativeResponseValue;
17968         }
17969         // MUST_USE_RES struct LDKCResult_TxCreationKeysErrorZ TxCreationKeys_from_channel_static_keys(struct LDKPublicKey per_commitment_point, const struct LDKChannelPublicKeys *NONNULL_PTR broadcaster_keys, const struct LDKChannelPublicKeys *NONNULL_PTR countersignatory_keys);
17970         export function TxCreationKeys_from_channel_static_keys(per_commitment_point: Uint8Array, broadcaster_keys: number, countersignatory_keys: number): number {
17971                 if(!isWasmInitialized) {
17972                         throw new Error("initializeWasm() must be awaited first!");
17973                 }
17974                 const nativeResponseValue = wasm.TxCreationKeys_from_channel_static_keys(encodeArray(per_commitment_point), broadcaster_keys, countersignatory_keys);
17975                 return nativeResponseValue;
17976         }
17977         // struct LDKCVec_u8Z get_revokeable_redeemscript(struct LDKPublicKey revocation_key, uint16_t contest_delay, struct LDKPublicKey broadcaster_delayed_payment_key);
17978         export function get_revokeable_redeemscript(revocation_key: Uint8Array, contest_delay: number, broadcaster_delayed_payment_key: Uint8Array): Uint8Array {
17979                 if(!isWasmInitialized) {
17980                         throw new Error("initializeWasm() must be awaited first!");
17981                 }
17982                 const nativeResponseValue = wasm.get_revokeable_redeemscript(encodeArray(revocation_key), contest_delay, encodeArray(broadcaster_delayed_payment_key));
17983                 return decodeArray(nativeResponseValue);
17984         }
17985         // void HTLCOutputInCommitment_free(struct LDKHTLCOutputInCommitment this_obj);
17986         export function HTLCOutputInCommitment_free(this_obj: number): void {
17987                 if(!isWasmInitialized) {
17988                         throw new Error("initializeWasm() must be awaited first!");
17989                 }
17990                 const nativeResponseValue = wasm.HTLCOutputInCommitment_free(this_obj);
17991                 // debug statements here
17992         }
17993         // bool HTLCOutputInCommitment_get_offered(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
17994         export function HTLCOutputInCommitment_get_offered(this_ptr: number): boolean {
17995                 if(!isWasmInitialized) {
17996                         throw new Error("initializeWasm() must be awaited first!");
17997                 }
17998                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_offered(this_ptr);
17999                 return nativeResponseValue;
18000         }
18001         // void HTLCOutputInCommitment_set_offered(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, bool val);
18002         export function HTLCOutputInCommitment_set_offered(this_ptr: number, val: boolean): void {
18003                 if(!isWasmInitialized) {
18004                         throw new Error("initializeWasm() must be awaited first!");
18005                 }
18006                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_offered(this_ptr, val);
18007                 // debug statements here
18008         }
18009         // uint64_t HTLCOutputInCommitment_get_amount_msat(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
18010         export function HTLCOutputInCommitment_get_amount_msat(this_ptr: number): number {
18011                 if(!isWasmInitialized) {
18012                         throw new Error("initializeWasm() must be awaited first!");
18013                 }
18014                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_amount_msat(this_ptr);
18015                 return nativeResponseValue;
18016         }
18017         // void HTLCOutputInCommitment_set_amount_msat(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint64_t val);
18018         export function HTLCOutputInCommitment_set_amount_msat(this_ptr: number, val: number): void {
18019                 if(!isWasmInitialized) {
18020                         throw new Error("initializeWasm() must be awaited first!");
18021                 }
18022                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_amount_msat(this_ptr, val);
18023                 // debug statements here
18024         }
18025         // uint32_t HTLCOutputInCommitment_get_cltv_expiry(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
18026         export function HTLCOutputInCommitment_get_cltv_expiry(this_ptr: number): number {
18027                 if(!isWasmInitialized) {
18028                         throw new Error("initializeWasm() must be awaited first!");
18029                 }
18030                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_cltv_expiry(this_ptr);
18031                 return nativeResponseValue;
18032         }
18033         // void HTLCOutputInCommitment_set_cltv_expiry(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint32_t val);
18034         export function HTLCOutputInCommitment_set_cltv_expiry(this_ptr: number, val: number): void {
18035                 if(!isWasmInitialized) {
18036                         throw new Error("initializeWasm() must be awaited first!");
18037                 }
18038                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_cltv_expiry(this_ptr, val);
18039                 // debug statements here
18040         }
18041         // const uint8_t (*HTLCOutputInCommitment_get_payment_hash(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr))[32];
18042         export function HTLCOutputInCommitment_get_payment_hash(this_ptr: number): Uint8Array {
18043                 if(!isWasmInitialized) {
18044                         throw new Error("initializeWasm() must be awaited first!");
18045                 }
18046                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_payment_hash(this_ptr);
18047                 return decodeArray(nativeResponseValue);
18048         }
18049         // void HTLCOutputInCommitment_set_payment_hash(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
18050         export function HTLCOutputInCommitment_set_payment_hash(this_ptr: number, val: Uint8Array): void {
18051                 if(!isWasmInitialized) {
18052                         throw new Error("initializeWasm() must be awaited first!");
18053                 }
18054                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_payment_hash(this_ptr, encodeArray(val));
18055                 // debug statements here
18056         }
18057         // struct LDKCOption_u32Z HTLCOutputInCommitment_get_transaction_output_index(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
18058         export function HTLCOutputInCommitment_get_transaction_output_index(this_ptr: number): number {
18059                 if(!isWasmInitialized) {
18060                         throw new Error("initializeWasm() must be awaited first!");
18061                 }
18062                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_transaction_output_index(this_ptr);
18063                 return nativeResponseValue;
18064         }
18065         // void HTLCOutputInCommitment_set_transaction_output_index(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKCOption_u32Z val);
18066         export function HTLCOutputInCommitment_set_transaction_output_index(this_ptr: number, val: number): void {
18067                 if(!isWasmInitialized) {
18068                         throw new Error("initializeWasm() must be awaited first!");
18069                 }
18070                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_transaction_output_index(this_ptr, val);
18071                 // debug statements here
18072         }
18073         // MUST_USE_RES struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_new(bool offered_arg, uint64_t amount_msat_arg, uint32_t cltv_expiry_arg, struct LDKThirtyTwoBytes payment_hash_arg, struct LDKCOption_u32Z transaction_output_index_arg);
18074         export function HTLCOutputInCommitment_new(offered_arg: boolean, amount_msat_arg: number, cltv_expiry_arg: number, payment_hash_arg: Uint8Array, transaction_output_index_arg: number): number {
18075                 if(!isWasmInitialized) {
18076                         throw new Error("initializeWasm() must be awaited first!");
18077                 }
18078                 const nativeResponseValue = wasm.HTLCOutputInCommitment_new(offered_arg, amount_msat_arg, cltv_expiry_arg, encodeArray(payment_hash_arg), transaction_output_index_arg);
18079                 return nativeResponseValue;
18080         }
18081         // uint64_t HTLCOutputInCommitment_clone_ptr(LDKHTLCOutputInCommitment *NONNULL_PTR arg);
18082         export function HTLCOutputInCommitment_clone_ptr(arg: number): number {
18083                 if(!isWasmInitialized) {
18084                         throw new Error("initializeWasm() must be awaited first!");
18085                 }
18086                 const nativeResponseValue = wasm.HTLCOutputInCommitment_clone_ptr(arg);
18087                 return nativeResponseValue;
18088         }
18089         // struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_clone(const struct LDKHTLCOutputInCommitment *NONNULL_PTR orig);
18090         export function HTLCOutputInCommitment_clone(orig: number): number {
18091                 if(!isWasmInitialized) {
18092                         throw new Error("initializeWasm() must be awaited first!");
18093                 }
18094                 const nativeResponseValue = wasm.HTLCOutputInCommitment_clone(orig);
18095                 return nativeResponseValue;
18096         }
18097         // struct LDKCVec_u8Z HTLCOutputInCommitment_write(const struct LDKHTLCOutputInCommitment *NONNULL_PTR obj);
18098         export function HTLCOutputInCommitment_write(obj: number): Uint8Array {
18099                 if(!isWasmInitialized) {
18100                         throw new Error("initializeWasm() must be awaited first!");
18101                 }
18102                 const nativeResponseValue = wasm.HTLCOutputInCommitment_write(obj);
18103                 return decodeArray(nativeResponseValue);
18104         }
18105         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ HTLCOutputInCommitment_read(struct LDKu8slice ser);
18106         export function HTLCOutputInCommitment_read(ser: Uint8Array): number {
18107                 if(!isWasmInitialized) {
18108                         throw new Error("initializeWasm() must be awaited first!");
18109                 }
18110                 const nativeResponseValue = wasm.HTLCOutputInCommitment_read(encodeArray(ser));
18111                 return nativeResponseValue;
18112         }
18113         // struct LDKCVec_u8Z get_htlc_redeemscript(const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc, bool opt_anchors, const struct LDKTxCreationKeys *NONNULL_PTR keys);
18114         export function get_htlc_redeemscript(htlc: number, opt_anchors: boolean, keys: number): Uint8Array {
18115                 if(!isWasmInitialized) {
18116                         throw new Error("initializeWasm() must be awaited first!");
18117                 }
18118                 const nativeResponseValue = wasm.get_htlc_redeemscript(htlc, opt_anchors, keys);
18119                 return decodeArray(nativeResponseValue);
18120         }
18121         // struct LDKCVec_u8Z make_funding_redeemscript(struct LDKPublicKey broadcaster, struct LDKPublicKey countersignatory);
18122         export function make_funding_redeemscript(broadcaster: Uint8Array, countersignatory: Uint8Array): Uint8Array {
18123                 if(!isWasmInitialized) {
18124                         throw new Error("initializeWasm() must be awaited first!");
18125                 }
18126                 const nativeResponseValue = wasm.make_funding_redeemscript(encodeArray(broadcaster), encodeArray(countersignatory));
18127                 return decodeArray(nativeResponseValue);
18128         }
18129         // struct LDKTransaction build_htlc_transaction(const uint8_t (*commitment_txid)[32], uint32_t feerate_per_kw, uint16_t contest_delay, const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc, bool opt_anchors, struct LDKPublicKey broadcaster_delayed_payment_key, struct LDKPublicKey revocation_key);
18130         export function build_htlc_transaction(commitment_txid: Uint8Array, feerate_per_kw: number, contest_delay: number, htlc: number, opt_anchors: boolean, broadcaster_delayed_payment_key: Uint8Array, revocation_key: Uint8Array): Uint8Array {
18131                 if(!isWasmInitialized) {
18132                         throw new Error("initializeWasm() must be awaited first!");
18133                 }
18134                 const nativeResponseValue = wasm.build_htlc_transaction(encodeArray(commitment_txid), feerate_per_kw, contest_delay, htlc, opt_anchors, encodeArray(broadcaster_delayed_payment_key), encodeArray(revocation_key));
18135                 return decodeArray(nativeResponseValue);
18136         }
18137         // struct LDKCVec_u8Z get_anchor_redeemscript(struct LDKPublicKey funding_pubkey);
18138         export function get_anchor_redeemscript(funding_pubkey: Uint8Array): Uint8Array {
18139                 if(!isWasmInitialized) {
18140                         throw new Error("initializeWasm() must be awaited first!");
18141                 }
18142                 const nativeResponseValue = wasm.get_anchor_redeemscript(encodeArray(funding_pubkey));
18143                 return decodeArray(nativeResponseValue);
18144         }
18145         // void ChannelTransactionParameters_free(struct LDKChannelTransactionParameters this_obj);
18146         export function ChannelTransactionParameters_free(this_obj: number): void {
18147                 if(!isWasmInitialized) {
18148                         throw new Error("initializeWasm() must be awaited first!");
18149                 }
18150                 const nativeResponseValue = wasm.ChannelTransactionParameters_free(this_obj);
18151                 // debug statements here
18152         }
18153         // struct LDKChannelPublicKeys ChannelTransactionParameters_get_holder_pubkeys(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
18154         export function ChannelTransactionParameters_get_holder_pubkeys(this_ptr: number): number {
18155                 if(!isWasmInitialized) {
18156                         throw new Error("initializeWasm() must be awaited first!");
18157                 }
18158                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_holder_pubkeys(this_ptr);
18159                 return nativeResponseValue;
18160         }
18161         // void ChannelTransactionParameters_set_holder_pubkeys(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
18162         export function ChannelTransactionParameters_set_holder_pubkeys(this_ptr: number, val: number): void {
18163                 if(!isWasmInitialized) {
18164                         throw new Error("initializeWasm() must be awaited first!");
18165                 }
18166                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_holder_pubkeys(this_ptr, val);
18167                 // debug statements here
18168         }
18169         // uint16_t ChannelTransactionParameters_get_holder_selected_contest_delay(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
18170         export function ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr: number): number {
18171                 if(!isWasmInitialized) {
18172                         throw new Error("initializeWasm() must be awaited first!");
18173                 }
18174                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr);
18175                 return nativeResponseValue;
18176         }
18177         // void ChannelTransactionParameters_set_holder_selected_contest_delay(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
18178         export function ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr: number, val: number): void {
18179                 if(!isWasmInitialized) {
18180                         throw new Error("initializeWasm() must be awaited first!");
18181                 }
18182                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr, val);
18183                 // debug statements here
18184         }
18185         // bool ChannelTransactionParameters_get_is_outbound_from_holder(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
18186         export function ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr: number): boolean {
18187                 if(!isWasmInitialized) {
18188                         throw new Error("initializeWasm() must be awaited first!");
18189                 }
18190                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr);
18191                 return nativeResponseValue;
18192         }
18193         // void ChannelTransactionParameters_set_is_outbound_from_holder(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, bool val);
18194         export function ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr: number, val: boolean): void {
18195                 if(!isWasmInitialized) {
18196                         throw new Error("initializeWasm() must be awaited first!");
18197                 }
18198                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr, val);
18199                 // debug statements here
18200         }
18201         // struct LDKCounterpartyChannelTransactionParameters ChannelTransactionParameters_get_counterparty_parameters(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
18202         export function ChannelTransactionParameters_get_counterparty_parameters(this_ptr: number): number {
18203                 if(!isWasmInitialized) {
18204                         throw new Error("initializeWasm() must be awaited first!");
18205                 }
18206                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_counterparty_parameters(this_ptr);
18207                 return nativeResponseValue;
18208         }
18209         // void ChannelTransactionParameters_set_counterparty_parameters(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKCounterpartyChannelTransactionParameters val);
18210         export function ChannelTransactionParameters_set_counterparty_parameters(this_ptr: number, val: number): void {
18211                 if(!isWasmInitialized) {
18212                         throw new Error("initializeWasm() must be awaited first!");
18213                 }
18214                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_counterparty_parameters(this_ptr, val);
18215                 // debug statements here
18216         }
18217         // struct LDKOutPoint ChannelTransactionParameters_get_funding_outpoint(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
18218         export function ChannelTransactionParameters_get_funding_outpoint(this_ptr: number): number {
18219                 if(!isWasmInitialized) {
18220                         throw new Error("initializeWasm() must be awaited first!");
18221                 }
18222                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_funding_outpoint(this_ptr);
18223                 return nativeResponseValue;
18224         }
18225         // void ChannelTransactionParameters_set_funding_outpoint(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKOutPoint val);
18226         export function ChannelTransactionParameters_set_funding_outpoint(this_ptr: number, val: number): void {
18227                 if(!isWasmInitialized) {
18228                         throw new Error("initializeWasm() must be awaited first!");
18229                 }
18230                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_funding_outpoint(this_ptr, val);
18231                 // debug statements here
18232         }
18233         // enum LDKCOption_NoneZ ChannelTransactionParameters_get_opt_anchors(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
18234         export function ChannelTransactionParameters_get_opt_anchors(this_ptr: number): COption_NoneZ {
18235                 if(!isWasmInitialized) {
18236                         throw new Error("initializeWasm() must be awaited first!");
18237                 }
18238                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_opt_anchors(this_ptr);
18239                 return nativeResponseValue;
18240         }
18241         // void ChannelTransactionParameters_set_opt_anchors(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, enum LDKCOption_NoneZ val);
18242         export function ChannelTransactionParameters_set_opt_anchors(this_ptr: number, val: COption_NoneZ): void {
18243                 if(!isWasmInitialized) {
18244                         throw new Error("initializeWasm() must be awaited first!");
18245                 }
18246                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_opt_anchors(this_ptr, val);
18247                 // debug statements here
18248         }
18249         // 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, enum LDKCOption_NoneZ opt_anchors_arg);
18250         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, opt_anchors_arg: COption_NoneZ): number {
18251                 if(!isWasmInitialized) {
18252                         throw new Error("initializeWasm() must be awaited first!");
18253                 }
18254                 const nativeResponseValue = wasm.ChannelTransactionParameters_new(holder_pubkeys_arg, holder_selected_contest_delay_arg, is_outbound_from_holder_arg, counterparty_parameters_arg, funding_outpoint_arg, opt_anchors_arg);
18255                 return nativeResponseValue;
18256         }
18257         // uint64_t ChannelTransactionParameters_clone_ptr(LDKChannelTransactionParameters *NONNULL_PTR arg);
18258         export function ChannelTransactionParameters_clone_ptr(arg: number): number {
18259                 if(!isWasmInitialized) {
18260                         throw new Error("initializeWasm() must be awaited first!");
18261                 }
18262                 const nativeResponseValue = wasm.ChannelTransactionParameters_clone_ptr(arg);
18263                 return nativeResponseValue;
18264         }
18265         // struct LDKChannelTransactionParameters ChannelTransactionParameters_clone(const struct LDKChannelTransactionParameters *NONNULL_PTR orig);
18266         export function ChannelTransactionParameters_clone(orig: number): number {
18267                 if(!isWasmInitialized) {
18268                         throw new Error("initializeWasm() must be awaited first!");
18269                 }
18270                 const nativeResponseValue = wasm.ChannelTransactionParameters_clone(orig);
18271                 return nativeResponseValue;
18272         }
18273         // void CounterpartyChannelTransactionParameters_free(struct LDKCounterpartyChannelTransactionParameters this_obj);
18274         export function CounterpartyChannelTransactionParameters_free(this_obj: number): void {
18275                 if(!isWasmInitialized) {
18276                         throw new Error("initializeWasm() must be awaited first!");
18277                 }
18278                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_free(this_obj);
18279                 // debug statements here
18280         }
18281         // struct LDKChannelPublicKeys CounterpartyChannelTransactionParameters_get_pubkeys(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
18282         export function CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr: number): number {
18283                 if(!isWasmInitialized) {
18284                         throw new Error("initializeWasm() must be awaited first!");
18285                 }
18286                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr);
18287                 return nativeResponseValue;
18288         }
18289         // void CounterpartyChannelTransactionParameters_set_pubkeys(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
18290         export function CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr: number, val: number): void {
18291                 if(!isWasmInitialized) {
18292                         throw new Error("initializeWasm() must be awaited first!");
18293                 }
18294                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr, val);
18295                 // debug statements here
18296         }
18297         // uint16_t CounterpartyChannelTransactionParameters_get_selected_contest_delay(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
18298         export function CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr: number): number {
18299                 if(!isWasmInitialized) {
18300                         throw new Error("initializeWasm() must be awaited first!");
18301                 }
18302                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr);
18303                 return nativeResponseValue;
18304         }
18305         // void CounterpartyChannelTransactionParameters_set_selected_contest_delay(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
18306         export function CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr: number, val: number): void {
18307                 if(!isWasmInitialized) {
18308                         throw new Error("initializeWasm() must be awaited first!");
18309                 }
18310                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr, val);
18311                 // debug statements here
18312         }
18313         // MUST_USE_RES struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_new(struct LDKChannelPublicKeys pubkeys_arg, uint16_t selected_contest_delay_arg);
18314         export function CounterpartyChannelTransactionParameters_new(pubkeys_arg: number, selected_contest_delay_arg: number): number {
18315                 if(!isWasmInitialized) {
18316                         throw new Error("initializeWasm() must be awaited first!");
18317                 }
18318                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_new(pubkeys_arg, selected_contest_delay_arg);
18319                 return nativeResponseValue;
18320         }
18321         // uint64_t CounterpartyChannelTransactionParameters_clone_ptr(LDKCounterpartyChannelTransactionParameters *NONNULL_PTR arg);
18322         export function CounterpartyChannelTransactionParameters_clone_ptr(arg: number): number {
18323                 if(!isWasmInitialized) {
18324                         throw new Error("initializeWasm() must be awaited first!");
18325                 }
18326                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_clone_ptr(arg);
18327                 return nativeResponseValue;
18328         }
18329         // struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_clone(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR orig);
18330         export function CounterpartyChannelTransactionParameters_clone(orig: number): number {
18331                 if(!isWasmInitialized) {
18332                         throw new Error("initializeWasm() must be awaited first!");
18333                 }
18334                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_clone(orig);
18335                 return nativeResponseValue;
18336         }
18337         // MUST_USE_RES bool ChannelTransactionParameters_is_populated(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
18338         export function ChannelTransactionParameters_is_populated(this_arg: number): boolean {
18339                 if(!isWasmInitialized) {
18340                         throw new Error("initializeWasm() must be awaited first!");
18341                 }
18342                 const nativeResponseValue = wasm.ChannelTransactionParameters_is_populated(this_arg);
18343                 return nativeResponseValue;
18344         }
18345         // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_holder_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
18346         export function ChannelTransactionParameters_as_holder_broadcastable(this_arg: number): number {
18347                 if(!isWasmInitialized) {
18348                         throw new Error("initializeWasm() must be awaited first!");
18349                 }
18350                 const nativeResponseValue = wasm.ChannelTransactionParameters_as_holder_broadcastable(this_arg);
18351                 return nativeResponseValue;
18352         }
18353         // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_counterparty_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
18354         export function ChannelTransactionParameters_as_counterparty_broadcastable(this_arg: number): number {
18355                 if(!isWasmInitialized) {
18356                         throw new Error("initializeWasm() must be awaited first!");
18357                 }
18358                 const nativeResponseValue = wasm.ChannelTransactionParameters_as_counterparty_broadcastable(this_arg);
18359                 return nativeResponseValue;
18360         }
18361         // struct LDKCVec_u8Z CounterpartyChannelTransactionParameters_write(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR obj);
18362         export function CounterpartyChannelTransactionParameters_write(obj: number): Uint8Array {
18363                 if(!isWasmInitialized) {
18364                         throw new Error("initializeWasm() must be awaited first!");
18365                 }
18366                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_write(obj);
18367                 return decodeArray(nativeResponseValue);
18368         }
18369         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CounterpartyChannelTransactionParameters_read(struct LDKu8slice ser);
18370         export function CounterpartyChannelTransactionParameters_read(ser: Uint8Array): number {
18371                 if(!isWasmInitialized) {
18372                         throw new Error("initializeWasm() must be awaited first!");
18373                 }
18374                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_read(encodeArray(ser));
18375                 return nativeResponseValue;
18376         }
18377         // struct LDKCVec_u8Z ChannelTransactionParameters_write(const struct LDKChannelTransactionParameters *NONNULL_PTR obj);
18378         export function ChannelTransactionParameters_write(obj: number): Uint8Array {
18379                 if(!isWasmInitialized) {
18380                         throw new Error("initializeWasm() must be awaited first!");
18381                 }
18382                 const nativeResponseValue = wasm.ChannelTransactionParameters_write(obj);
18383                 return decodeArray(nativeResponseValue);
18384         }
18385         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ ChannelTransactionParameters_read(struct LDKu8slice ser);
18386         export function ChannelTransactionParameters_read(ser: Uint8Array): number {
18387                 if(!isWasmInitialized) {
18388                         throw new Error("initializeWasm() must be awaited first!");
18389                 }
18390                 const nativeResponseValue = wasm.ChannelTransactionParameters_read(encodeArray(ser));
18391                 return nativeResponseValue;
18392         }
18393         // void DirectedChannelTransactionParameters_free(struct LDKDirectedChannelTransactionParameters this_obj);
18394         export function DirectedChannelTransactionParameters_free(this_obj: number): void {
18395                 if(!isWasmInitialized) {
18396                         throw new Error("initializeWasm() must be awaited first!");
18397                 }
18398                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_free(this_obj);
18399                 // debug statements here
18400         }
18401         // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_broadcaster_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
18402         export function DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg: number): number {
18403                 if(!isWasmInitialized) {
18404                         throw new Error("initializeWasm() must be awaited first!");
18405                 }
18406                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg);
18407                 return nativeResponseValue;
18408         }
18409         // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_countersignatory_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
18410         export function DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg: number): number {
18411                 if(!isWasmInitialized) {
18412                         throw new Error("initializeWasm() must be awaited first!");
18413                 }
18414                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg);
18415                 return nativeResponseValue;
18416         }
18417         // MUST_USE_RES uint16_t DirectedChannelTransactionParameters_contest_delay(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
18418         export function DirectedChannelTransactionParameters_contest_delay(this_arg: number): number {
18419                 if(!isWasmInitialized) {
18420                         throw new Error("initializeWasm() must be awaited first!");
18421                 }
18422                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_contest_delay(this_arg);
18423                 return nativeResponseValue;
18424         }
18425         // MUST_USE_RES bool DirectedChannelTransactionParameters_is_outbound(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
18426         export function DirectedChannelTransactionParameters_is_outbound(this_arg: number): boolean {
18427                 if(!isWasmInitialized) {
18428                         throw new Error("initializeWasm() must be awaited first!");
18429                 }
18430                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_is_outbound(this_arg);
18431                 return nativeResponseValue;
18432         }
18433         // MUST_USE_RES struct LDKOutPoint DirectedChannelTransactionParameters_funding_outpoint(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
18434         export function DirectedChannelTransactionParameters_funding_outpoint(this_arg: number): number {
18435                 if(!isWasmInitialized) {
18436                         throw new Error("initializeWasm() must be awaited first!");
18437                 }
18438                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_funding_outpoint(this_arg);
18439                 return nativeResponseValue;
18440         }
18441         // MUST_USE_RES bool DirectedChannelTransactionParameters_opt_anchors(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
18442         export function DirectedChannelTransactionParameters_opt_anchors(this_arg: number): boolean {
18443                 if(!isWasmInitialized) {
18444                         throw new Error("initializeWasm() must be awaited first!");
18445                 }
18446                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_opt_anchors(this_arg);
18447                 return nativeResponseValue;
18448         }
18449         // void HolderCommitmentTransaction_free(struct LDKHolderCommitmentTransaction this_obj);
18450         export function HolderCommitmentTransaction_free(this_obj: number): void {
18451                 if(!isWasmInitialized) {
18452                         throw new Error("initializeWasm() must be awaited first!");
18453                 }
18454                 const nativeResponseValue = wasm.HolderCommitmentTransaction_free(this_obj);
18455                 // debug statements here
18456         }
18457         // struct LDKSignature HolderCommitmentTransaction_get_counterparty_sig(const struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr);
18458         export function HolderCommitmentTransaction_get_counterparty_sig(this_ptr: number): Uint8Array {
18459                 if(!isWasmInitialized) {
18460                         throw new Error("initializeWasm() must be awaited first!");
18461                 }
18462                 const nativeResponseValue = wasm.HolderCommitmentTransaction_get_counterparty_sig(this_ptr);
18463                 return decodeArray(nativeResponseValue);
18464         }
18465         // void HolderCommitmentTransaction_set_counterparty_sig(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKSignature val);
18466         export function HolderCommitmentTransaction_set_counterparty_sig(this_ptr: number, val: Uint8Array): void {
18467                 if(!isWasmInitialized) {
18468                         throw new Error("initializeWasm() must be awaited first!");
18469                 }
18470                 const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_sig(this_ptr, encodeArray(val));
18471                 // debug statements here
18472         }
18473         // void HolderCommitmentTransaction_set_counterparty_htlc_sigs(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
18474         export function HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr: number, val: Uint8Array[]): void {
18475                 if(!isWasmInitialized) {
18476                         throw new Error("initializeWasm() must be awaited first!");
18477                 }
18478                 const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr, val);
18479                 // debug statements here
18480         }
18481         // uint64_t HolderCommitmentTransaction_clone_ptr(LDKHolderCommitmentTransaction *NONNULL_PTR arg);
18482         export function HolderCommitmentTransaction_clone_ptr(arg: number): number {
18483                 if(!isWasmInitialized) {
18484                         throw new Error("initializeWasm() must be awaited first!");
18485                 }
18486                 const nativeResponseValue = wasm.HolderCommitmentTransaction_clone_ptr(arg);
18487                 return nativeResponseValue;
18488         }
18489         // struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_clone(const struct LDKHolderCommitmentTransaction *NONNULL_PTR orig);
18490         export function HolderCommitmentTransaction_clone(orig: number): number {
18491                 if(!isWasmInitialized) {
18492                         throw new Error("initializeWasm() must be awaited first!");
18493                 }
18494                 const nativeResponseValue = wasm.HolderCommitmentTransaction_clone(orig);
18495                 return nativeResponseValue;
18496         }
18497         // struct LDKCVec_u8Z HolderCommitmentTransaction_write(const struct LDKHolderCommitmentTransaction *NONNULL_PTR obj);
18498         export function HolderCommitmentTransaction_write(obj: number): Uint8Array {
18499                 if(!isWasmInitialized) {
18500                         throw new Error("initializeWasm() must be awaited first!");
18501                 }
18502                 const nativeResponseValue = wasm.HolderCommitmentTransaction_write(obj);
18503                 return decodeArray(nativeResponseValue);
18504         }
18505         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ HolderCommitmentTransaction_read(struct LDKu8slice ser);
18506         export function HolderCommitmentTransaction_read(ser: Uint8Array): number {
18507                 if(!isWasmInitialized) {
18508                         throw new Error("initializeWasm() must be awaited first!");
18509                 }
18510                 const nativeResponseValue = wasm.HolderCommitmentTransaction_read(encodeArray(ser));
18511                 return nativeResponseValue;
18512         }
18513         // 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);
18514         export function HolderCommitmentTransaction_new(commitment_tx: number, counterparty_sig: Uint8Array, counterparty_htlc_sigs: Uint8Array[], holder_funding_key: Uint8Array, counterparty_funding_key: Uint8Array): number {
18515                 if(!isWasmInitialized) {
18516                         throw new Error("initializeWasm() must be awaited first!");
18517                 }
18518                 const nativeResponseValue = wasm.HolderCommitmentTransaction_new(commitment_tx, encodeArray(counterparty_sig), counterparty_htlc_sigs, encodeArray(holder_funding_key), encodeArray(counterparty_funding_key));
18519                 return nativeResponseValue;
18520         }
18521         // void BuiltCommitmentTransaction_free(struct LDKBuiltCommitmentTransaction this_obj);
18522         export function BuiltCommitmentTransaction_free(this_obj: number): void {
18523                 if(!isWasmInitialized) {
18524                         throw new Error("initializeWasm() must be awaited first!");
18525                 }
18526                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_free(this_obj);
18527                 // debug statements here
18528         }
18529         // struct LDKTransaction BuiltCommitmentTransaction_get_transaction(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr);
18530         export function BuiltCommitmentTransaction_get_transaction(this_ptr: number): Uint8Array {
18531                 if(!isWasmInitialized) {
18532                         throw new Error("initializeWasm() must be awaited first!");
18533                 }
18534                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_transaction(this_ptr);
18535                 return decodeArray(nativeResponseValue);
18536         }
18537         // void BuiltCommitmentTransaction_set_transaction(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKTransaction val);
18538         export function BuiltCommitmentTransaction_set_transaction(this_ptr: number, val: Uint8Array): void {
18539                 if(!isWasmInitialized) {
18540                         throw new Error("initializeWasm() must be awaited first!");
18541                 }
18542                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_set_transaction(this_ptr, encodeArray(val));
18543                 // debug statements here
18544         }
18545         // const uint8_t (*BuiltCommitmentTransaction_get_txid(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr))[32];
18546         export function BuiltCommitmentTransaction_get_txid(this_ptr: number): Uint8Array {
18547                 if(!isWasmInitialized) {
18548                         throw new Error("initializeWasm() must be awaited first!");
18549                 }
18550                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_txid(this_ptr);
18551                 return decodeArray(nativeResponseValue);
18552         }
18553         // void BuiltCommitmentTransaction_set_txid(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
18554         export function BuiltCommitmentTransaction_set_txid(this_ptr: number, val: Uint8Array): void {
18555                 if(!isWasmInitialized) {
18556                         throw new Error("initializeWasm() must be awaited first!");
18557                 }
18558                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_set_txid(this_ptr, encodeArray(val));
18559                 // debug statements here
18560         }
18561         // MUST_USE_RES struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_new(struct LDKTransaction transaction_arg, struct LDKThirtyTwoBytes txid_arg);
18562         export function BuiltCommitmentTransaction_new(transaction_arg: Uint8Array, txid_arg: Uint8Array): number {
18563                 if(!isWasmInitialized) {
18564                         throw new Error("initializeWasm() must be awaited first!");
18565                 }
18566                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_new(encodeArray(transaction_arg), encodeArray(txid_arg));
18567                 return nativeResponseValue;
18568         }
18569         // uint64_t BuiltCommitmentTransaction_clone_ptr(LDKBuiltCommitmentTransaction *NONNULL_PTR arg);
18570         export function BuiltCommitmentTransaction_clone_ptr(arg: number): number {
18571                 if(!isWasmInitialized) {
18572                         throw new Error("initializeWasm() must be awaited first!");
18573                 }
18574                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_clone_ptr(arg);
18575                 return nativeResponseValue;
18576         }
18577         // struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_clone(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR orig);
18578         export function BuiltCommitmentTransaction_clone(orig: number): number {
18579                 if(!isWasmInitialized) {
18580                         throw new Error("initializeWasm() must be awaited first!");
18581                 }
18582                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_clone(orig);
18583                 return nativeResponseValue;
18584         }
18585         // struct LDKCVec_u8Z BuiltCommitmentTransaction_write(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR obj);
18586         export function BuiltCommitmentTransaction_write(obj: number): Uint8Array {
18587                 if(!isWasmInitialized) {
18588                         throw new Error("initializeWasm() must be awaited first!");
18589                 }
18590                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_write(obj);
18591                 return decodeArray(nativeResponseValue);
18592         }
18593         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ BuiltCommitmentTransaction_read(struct LDKu8slice ser);
18594         export function BuiltCommitmentTransaction_read(ser: Uint8Array): number {
18595                 if(!isWasmInitialized) {
18596                         throw new Error("initializeWasm() must be awaited first!");
18597                 }
18598                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_read(encodeArray(ser));
18599                 return nativeResponseValue;
18600         }
18601         // 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);
18602         export function BuiltCommitmentTransaction_get_sighash_all(this_arg: number, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
18603                 if(!isWasmInitialized) {
18604                         throw new Error("initializeWasm() must be awaited first!");
18605                 }
18606                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_sighash_all(this_arg, encodeArray(funding_redeemscript), channel_value_satoshis);
18607                 return decodeArray(nativeResponseValue);
18608         }
18609         // 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);
18610         export function BuiltCommitmentTransaction_sign(this_arg: number, funding_key: Uint8Array, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
18611                 if(!isWasmInitialized) {
18612                         throw new Error("initializeWasm() must be awaited first!");
18613                 }
18614                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_sign(this_arg, encodeArray(funding_key), encodeArray(funding_redeemscript), channel_value_satoshis);
18615                 return decodeArray(nativeResponseValue);
18616         }
18617         // void ClosingTransaction_free(struct LDKClosingTransaction this_obj);
18618         export function ClosingTransaction_free(this_obj: number): void {
18619                 if(!isWasmInitialized) {
18620                         throw new Error("initializeWasm() must be awaited first!");
18621                 }
18622                 const nativeResponseValue = wasm.ClosingTransaction_free(this_obj);
18623                 // debug statements here
18624         }
18625         // uint64_t ClosingTransaction_clone_ptr(LDKClosingTransaction *NONNULL_PTR arg);
18626         export function ClosingTransaction_clone_ptr(arg: number): number {
18627                 if(!isWasmInitialized) {
18628                         throw new Error("initializeWasm() must be awaited first!");
18629                 }
18630                 const nativeResponseValue = wasm.ClosingTransaction_clone_ptr(arg);
18631                 return nativeResponseValue;
18632         }
18633         // struct LDKClosingTransaction ClosingTransaction_clone(const struct LDKClosingTransaction *NONNULL_PTR orig);
18634         export function ClosingTransaction_clone(orig: number): number {
18635                 if(!isWasmInitialized) {
18636                         throw new Error("initializeWasm() must be awaited first!");
18637                 }
18638                 const nativeResponseValue = wasm.ClosingTransaction_clone(orig);
18639                 return nativeResponseValue;
18640         }
18641         // uint64_t ClosingTransaction_hash(const struct LDKClosingTransaction *NONNULL_PTR o);
18642         export function ClosingTransaction_hash(o: number): number {
18643                 if(!isWasmInitialized) {
18644                         throw new Error("initializeWasm() must be awaited first!");
18645                 }
18646                 const nativeResponseValue = wasm.ClosingTransaction_hash(o);
18647                 return nativeResponseValue;
18648         }
18649         // MUST_USE_RES struct LDKClosingTransaction ClosingTransaction_new(uint64_t to_holder_value_sat, uint64_t to_counterparty_value_sat, struct LDKCVec_u8Z to_holder_script, struct LDKCVec_u8Z to_counterparty_script, struct LDKOutPoint funding_outpoint);
18650         export function ClosingTransaction_new(to_holder_value_sat: number, to_counterparty_value_sat: number, to_holder_script: Uint8Array, to_counterparty_script: Uint8Array, funding_outpoint: number): number {
18651                 if(!isWasmInitialized) {
18652                         throw new Error("initializeWasm() must be awaited first!");
18653                 }
18654                 const nativeResponseValue = wasm.ClosingTransaction_new(to_holder_value_sat, to_counterparty_value_sat, encodeArray(to_holder_script), encodeArray(to_counterparty_script), funding_outpoint);
18655                 return nativeResponseValue;
18656         }
18657         // MUST_USE_RES struct LDKTrustedClosingTransaction ClosingTransaction_trust(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
18658         export function ClosingTransaction_trust(this_arg: number): number {
18659                 if(!isWasmInitialized) {
18660                         throw new Error("initializeWasm() must be awaited first!");
18661                 }
18662                 const nativeResponseValue = wasm.ClosingTransaction_trust(this_arg);
18663                 return nativeResponseValue;
18664         }
18665         // MUST_USE_RES struct LDKCResult_TrustedClosingTransactionNoneZ ClosingTransaction_verify(const struct LDKClosingTransaction *NONNULL_PTR this_arg, struct LDKOutPoint funding_outpoint);
18666         export function ClosingTransaction_verify(this_arg: number, funding_outpoint: number): number {
18667                 if(!isWasmInitialized) {
18668                         throw new Error("initializeWasm() must be awaited first!");
18669                 }
18670                 const nativeResponseValue = wasm.ClosingTransaction_verify(this_arg, funding_outpoint);
18671                 return nativeResponseValue;
18672         }
18673         // MUST_USE_RES uint64_t ClosingTransaction_to_holder_value_sat(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
18674         export function ClosingTransaction_to_holder_value_sat(this_arg: number): number {
18675                 if(!isWasmInitialized) {
18676                         throw new Error("initializeWasm() must be awaited first!");
18677                 }
18678                 const nativeResponseValue = wasm.ClosingTransaction_to_holder_value_sat(this_arg);
18679                 return nativeResponseValue;
18680         }
18681         // MUST_USE_RES uint64_t ClosingTransaction_to_counterparty_value_sat(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
18682         export function ClosingTransaction_to_counterparty_value_sat(this_arg: number): number {
18683                 if(!isWasmInitialized) {
18684                         throw new Error("initializeWasm() must be awaited first!");
18685                 }
18686                 const nativeResponseValue = wasm.ClosingTransaction_to_counterparty_value_sat(this_arg);
18687                 return nativeResponseValue;
18688         }
18689         // MUST_USE_RES struct LDKu8slice ClosingTransaction_to_holder_script(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
18690         export function ClosingTransaction_to_holder_script(this_arg: number): Uint8Array {
18691                 if(!isWasmInitialized) {
18692                         throw new Error("initializeWasm() must be awaited first!");
18693                 }
18694                 const nativeResponseValue = wasm.ClosingTransaction_to_holder_script(this_arg);
18695                 return decodeArray(nativeResponseValue);
18696         }
18697         // MUST_USE_RES struct LDKu8slice ClosingTransaction_to_counterparty_script(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
18698         export function ClosingTransaction_to_counterparty_script(this_arg: number): Uint8Array {
18699                 if(!isWasmInitialized) {
18700                         throw new Error("initializeWasm() must be awaited first!");
18701                 }
18702                 const nativeResponseValue = wasm.ClosingTransaction_to_counterparty_script(this_arg);
18703                 return decodeArray(nativeResponseValue);
18704         }
18705         // void TrustedClosingTransaction_free(struct LDKTrustedClosingTransaction this_obj);
18706         export function TrustedClosingTransaction_free(this_obj: number): void {
18707                 if(!isWasmInitialized) {
18708                         throw new Error("initializeWasm() must be awaited first!");
18709                 }
18710                 const nativeResponseValue = wasm.TrustedClosingTransaction_free(this_obj);
18711                 // debug statements here
18712         }
18713         // MUST_USE_RES struct LDKTransaction TrustedClosingTransaction_built_transaction(const struct LDKTrustedClosingTransaction *NONNULL_PTR this_arg);
18714         export function TrustedClosingTransaction_built_transaction(this_arg: number): Uint8Array {
18715                 if(!isWasmInitialized) {
18716                         throw new Error("initializeWasm() must be awaited first!");
18717                 }
18718                 const nativeResponseValue = wasm.TrustedClosingTransaction_built_transaction(this_arg);
18719                 return decodeArray(nativeResponseValue);
18720         }
18721         // MUST_USE_RES struct LDKThirtyTwoBytes TrustedClosingTransaction_get_sighash_all(const struct LDKTrustedClosingTransaction *NONNULL_PTR this_arg, struct LDKu8slice funding_redeemscript, uint64_t channel_value_satoshis);
18722         export function TrustedClosingTransaction_get_sighash_all(this_arg: number, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
18723                 if(!isWasmInitialized) {
18724                         throw new Error("initializeWasm() must be awaited first!");
18725                 }
18726                 const nativeResponseValue = wasm.TrustedClosingTransaction_get_sighash_all(this_arg, encodeArray(funding_redeemscript), channel_value_satoshis);
18727                 return decodeArray(nativeResponseValue);
18728         }
18729         // MUST_USE_RES struct LDKSignature TrustedClosingTransaction_sign(const struct LDKTrustedClosingTransaction *NONNULL_PTR this_arg, const uint8_t (*funding_key)[32], struct LDKu8slice funding_redeemscript, uint64_t channel_value_satoshis);
18730         export function TrustedClosingTransaction_sign(this_arg: number, funding_key: Uint8Array, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
18731                 if(!isWasmInitialized) {
18732                         throw new Error("initializeWasm() must be awaited first!");
18733                 }
18734                 const nativeResponseValue = wasm.TrustedClosingTransaction_sign(this_arg, encodeArray(funding_key), encodeArray(funding_redeemscript), channel_value_satoshis);
18735                 return decodeArray(nativeResponseValue);
18736         }
18737         // void CommitmentTransaction_free(struct LDKCommitmentTransaction this_obj);
18738         export function CommitmentTransaction_free(this_obj: number): void {
18739                 if(!isWasmInitialized) {
18740                         throw new Error("initializeWasm() must be awaited first!");
18741                 }
18742                 const nativeResponseValue = wasm.CommitmentTransaction_free(this_obj);
18743                 // debug statements here
18744         }
18745         // uint64_t CommitmentTransaction_clone_ptr(LDKCommitmentTransaction *NONNULL_PTR arg);
18746         export function CommitmentTransaction_clone_ptr(arg: number): number {
18747                 if(!isWasmInitialized) {
18748                         throw new Error("initializeWasm() must be awaited first!");
18749                 }
18750                 const nativeResponseValue = wasm.CommitmentTransaction_clone_ptr(arg);
18751                 return nativeResponseValue;
18752         }
18753         // struct LDKCommitmentTransaction CommitmentTransaction_clone(const struct LDKCommitmentTransaction *NONNULL_PTR orig);
18754         export function CommitmentTransaction_clone(orig: number): number {
18755                 if(!isWasmInitialized) {
18756                         throw new Error("initializeWasm() must be awaited first!");
18757                 }
18758                 const nativeResponseValue = wasm.CommitmentTransaction_clone(orig);
18759                 return nativeResponseValue;
18760         }
18761         // struct LDKCVec_u8Z CommitmentTransaction_write(const struct LDKCommitmentTransaction *NONNULL_PTR obj);
18762         export function CommitmentTransaction_write(obj: number): Uint8Array {
18763                 if(!isWasmInitialized) {
18764                         throw new Error("initializeWasm() must be awaited first!");
18765                 }
18766                 const nativeResponseValue = wasm.CommitmentTransaction_write(obj);
18767                 return decodeArray(nativeResponseValue);
18768         }
18769         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CommitmentTransaction_read(struct LDKu8slice ser);
18770         export function CommitmentTransaction_read(ser: Uint8Array): number {
18771                 if(!isWasmInitialized) {
18772                         throw new Error("initializeWasm() must be awaited first!");
18773                 }
18774                 const nativeResponseValue = wasm.CommitmentTransaction_read(encodeArray(ser));
18775                 return nativeResponseValue;
18776         }
18777         // MUST_USE_RES uint64_t CommitmentTransaction_commitment_number(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
18778         export function CommitmentTransaction_commitment_number(this_arg: number): number {
18779                 if(!isWasmInitialized) {
18780                         throw new Error("initializeWasm() must be awaited first!");
18781                 }
18782                 const nativeResponseValue = wasm.CommitmentTransaction_commitment_number(this_arg);
18783                 return nativeResponseValue;
18784         }
18785         // MUST_USE_RES uint64_t CommitmentTransaction_to_broadcaster_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
18786         export function CommitmentTransaction_to_broadcaster_value_sat(this_arg: number): number {
18787                 if(!isWasmInitialized) {
18788                         throw new Error("initializeWasm() must be awaited first!");
18789                 }
18790                 const nativeResponseValue = wasm.CommitmentTransaction_to_broadcaster_value_sat(this_arg);
18791                 return nativeResponseValue;
18792         }
18793         // MUST_USE_RES uint64_t CommitmentTransaction_to_countersignatory_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
18794         export function CommitmentTransaction_to_countersignatory_value_sat(this_arg: number): number {
18795                 if(!isWasmInitialized) {
18796                         throw new Error("initializeWasm() must be awaited first!");
18797                 }
18798                 const nativeResponseValue = wasm.CommitmentTransaction_to_countersignatory_value_sat(this_arg);
18799                 return nativeResponseValue;
18800         }
18801         // MUST_USE_RES uint32_t CommitmentTransaction_feerate_per_kw(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
18802         export function CommitmentTransaction_feerate_per_kw(this_arg: number): number {
18803                 if(!isWasmInitialized) {
18804                         throw new Error("initializeWasm() must be awaited first!");
18805                 }
18806                 const nativeResponseValue = wasm.CommitmentTransaction_feerate_per_kw(this_arg);
18807                 return nativeResponseValue;
18808         }
18809         // MUST_USE_RES struct LDKTrustedCommitmentTransaction CommitmentTransaction_trust(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
18810         export function CommitmentTransaction_trust(this_arg: number): number {
18811                 if(!isWasmInitialized) {
18812                         throw new Error("initializeWasm() must be awaited first!");
18813                 }
18814                 const nativeResponseValue = wasm.CommitmentTransaction_trust(this_arg);
18815                 return nativeResponseValue;
18816         }
18817         // 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);
18818         export function CommitmentTransaction_verify(this_arg: number, channel_parameters: number, broadcaster_keys: number, countersignatory_keys: number): number {
18819                 if(!isWasmInitialized) {
18820                         throw new Error("initializeWasm() must be awaited first!");
18821                 }
18822                 const nativeResponseValue = wasm.CommitmentTransaction_verify(this_arg, channel_parameters, broadcaster_keys, countersignatory_keys);
18823                 return nativeResponseValue;
18824         }
18825         // void TrustedCommitmentTransaction_free(struct LDKTrustedCommitmentTransaction this_obj);
18826         export function TrustedCommitmentTransaction_free(this_obj: number): void {
18827                 if(!isWasmInitialized) {
18828                         throw new Error("initializeWasm() must be awaited first!");
18829                 }
18830                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_free(this_obj);
18831                 // debug statements here
18832         }
18833         // MUST_USE_RES struct LDKThirtyTwoBytes TrustedCommitmentTransaction_txid(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
18834         export function TrustedCommitmentTransaction_txid(this_arg: number): Uint8Array {
18835                 if(!isWasmInitialized) {
18836                         throw new Error("initializeWasm() must be awaited first!");
18837                 }
18838                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_txid(this_arg);
18839                 return decodeArray(nativeResponseValue);
18840         }
18841         // MUST_USE_RES struct LDKBuiltCommitmentTransaction TrustedCommitmentTransaction_built_transaction(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
18842         export function TrustedCommitmentTransaction_built_transaction(this_arg: number): number {
18843                 if(!isWasmInitialized) {
18844                         throw new Error("initializeWasm() must be awaited first!");
18845                 }
18846                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_built_transaction(this_arg);
18847                 return nativeResponseValue;
18848         }
18849         // MUST_USE_RES struct LDKTxCreationKeys TrustedCommitmentTransaction_keys(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
18850         export function TrustedCommitmentTransaction_keys(this_arg: number): number {
18851                 if(!isWasmInitialized) {
18852                         throw new Error("initializeWasm() must be awaited first!");
18853                 }
18854                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_keys(this_arg);
18855                 return nativeResponseValue;
18856         }
18857         // MUST_USE_RES bool TrustedCommitmentTransaction_opt_anchors(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
18858         export function TrustedCommitmentTransaction_opt_anchors(this_arg: number): boolean {
18859                 if(!isWasmInitialized) {
18860                         throw new Error("initializeWasm() must be awaited first!");
18861                 }
18862                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_opt_anchors(this_arg);
18863                 return nativeResponseValue;
18864         }
18865         // 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);
18866         export function TrustedCommitmentTransaction_get_htlc_sigs(this_arg: number, htlc_base_key: Uint8Array, channel_parameters: number): number {
18867                 if(!isWasmInitialized) {
18868                         throw new Error("initializeWasm() must be awaited first!");
18869                 }
18870                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_get_htlc_sigs(this_arg, encodeArray(htlc_base_key), channel_parameters);
18871                 return nativeResponseValue;
18872         }
18873         // uint64_t get_commitment_transaction_number_obscure_factor(struct LDKPublicKey broadcaster_payment_basepoint, struct LDKPublicKey countersignatory_payment_basepoint, bool outbound_from_broadcaster);
18874         export function get_commitment_transaction_number_obscure_factor(broadcaster_payment_basepoint: Uint8Array, countersignatory_payment_basepoint: Uint8Array, outbound_from_broadcaster: boolean): number {
18875                 if(!isWasmInitialized) {
18876                         throw new Error("initializeWasm() must be awaited first!");
18877                 }
18878                 const nativeResponseValue = wasm.get_commitment_transaction_number_obscure_factor(encodeArray(broadcaster_payment_basepoint), encodeArray(countersignatory_payment_basepoint), outbound_from_broadcaster);
18879                 return nativeResponseValue;
18880         }
18881         // bool InitFeatures_eq(const struct LDKInitFeatures *NONNULL_PTR a, const struct LDKInitFeatures *NONNULL_PTR b);
18882         export function InitFeatures_eq(a: number, b: number): boolean {
18883                 if(!isWasmInitialized) {
18884                         throw new Error("initializeWasm() must be awaited first!");
18885                 }
18886                 const nativeResponseValue = wasm.InitFeatures_eq(a, b);
18887                 return nativeResponseValue;
18888         }
18889         // bool NodeFeatures_eq(const struct LDKNodeFeatures *NONNULL_PTR a, const struct LDKNodeFeatures *NONNULL_PTR b);
18890         export function NodeFeatures_eq(a: number, b: number): boolean {
18891                 if(!isWasmInitialized) {
18892                         throw new Error("initializeWasm() must be awaited first!");
18893                 }
18894                 const nativeResponseValue = wasm.NodeFeatures_eq(a, b);
18895                 return nativeResponseValue;
18896         }
18897         // bool ChannelFeatures_eq(const struct LDKChannelFeatures *NONNULL_PTR a, const struct LDKChannelFeatures *NONNULL_PTR b);
18898         export function ChannelFeatures_eq(a: number, b: number): boolean {
18899                 if(!isWasmInitialized) {
18900                         throw new Error("initializeWasm() must be awaited first!");
18901                 }
18902                 const nativeResponseValue = wasm.ChannelFeatures_eq(a, b);
18903                 return nativeResponseValue;
18904         }
18905         // bool InvoiceFeatures_eq(const struct LDKInvoiceFeatures *NONNULL_PTR a, const struct LDKInvoiceFeatures *NONNULL_PTR b);
18906         export function InvoiceFeatures_eq(a: number, b: number): boolean {
18907                 if(!isWasmInitialized) {
18908                         throw new Error("initializeWasm() must be awaited first!");
18909                 }
18910                 const nativeResponseValue = wasm.InvoiceFeatures_eq(a, b);
18911                 return nativeResponseValue;
18912         }
18913         // bool ChannelTypeFeatures_eq(const struct LDKChannelTypeFeatures *NONNULL_PTR a, const struct LDKChannelTypeFeatures *NONNULL_PTR b);
18914         export function ChannelTypeFeatures_eq(a: number, b: number): boolean {
18915                 if(!isWasmInitialized) {
18916                         throw new Error("initializeWasm() must be awaited first!");
18917                 }
18918                 const nativeResponseValue = wasm.ChannelTypeFeatures_eq(a, b);
18919                 return nativeResponseValue;
18920         }
18921         // uint64_t InitFeatures_clone_ptr(LDKInitFeatures *NONNULL_PTR arg);
18922         export function InitFeatures_clone_ptr(arg: number): number {
18923                 if(!isWasmInitialized) {
18924                         throw new Error("initializeWasm() must be awaited first!");
18925                 }
18926                 const nativeResponseValue = wasm.InitFeatures_clone_ptr(arg);
18927                 return nativeResponseValue;
18928         }
18929         // struct LDKInitFeatures InitFeatures_clone(const struct LDKInitFeatures *NONNULL_PTR orig);
18930         export function InitFeatures_clone(orig: number): number {
18931                 if(!isWasmInitialized) {
18932                         throw new Error("initializeWasm() must be awaited first!");
18933                 }
18934                 const nativeResponseValue = wasm.InitFeatures_clone(orig);
18935                 return nativeResponseValue;
18936         }
18937         // uint64_t NodeFeatures_clone_ptr(LDKNodeFeatures *NONNULL_PTR arg);
18938         export function NodeFeatures_clone_ptr(arg: number): number {
18939                 if(!isWasmInitialized) {
18940                         throw new Error("initializeWasm() must be awaited first!");
18941                 }
18942                 const nativeResponseValue = wasm.NodeFeatures_clone_ptr(arg);
18943                 return nativeResponseValue;
18944         }
18945         // struct LDKNodeFeatures NodeFeatures_clone(const struct LDKNodeFeatures *NONNULL_PTR orig);
18946         export function NodeFeatures_clone(orig: number): number {
18947                 if(!isWasmInitialized) {
18948                         throw new Error("initializeWasm() must be awaited first!");
18949                 }
18950                 const nativeResponseValue = wasm.NodeFeatures_clone(orig);
18951                 return nativeResponseValue;
18952         }
18953         // uint64_t ChannelFeatures_clone_ptr(LDKChannelFeatures *NONNULL_PTR arg);
18954         export function ChannelFeatures_clone_ptr(arg: number): number {
18955                 if(!isWasmInitialized) {
18956                         throw new Error("initializeWasm() must be awaited first!");
18957                 }
18958                 const nativeResponseValue = wasm.ChannelFeatures_clone_ptr(arg);
18959                 return nativeResponseValue;
18960         }
18961         // struct LDKChannelFeatures ChannelFeatures_clone(const struct LDKChannelFeatures *NONNULL_PTR orig);
18962         export function ChannelFeatures_clone(orig: number): number {
18963                 if(!isWasmInitialized) {
18964                         throw new Error("initializeWasm() must be awaited first!");
18965                 }
18966                 const nativeResponseValue = wasm.ChannelFeatures_clone(orig);
18967                 return nativeResponseValue;
18968         }
18969         // uint64_t InvoiceFeatures_clone_ptr(LDKInvoiceFeatures *NONNULL_PTR arg);
18970         export function InvoiceFeatures_clone_ptr(arg: number): number {
18971                 if(!isWasmInitialized) {
18972                         throw new Error("initializeWasm() must be awaited first!");
18973                 }
18974                 const nativeResponseValue = wasm.InvoiceFeatures_clone_ptr(arg);
18975                 return nativeResponseValue;
18976         }
18977         // struct LDKInvoiceFeatures InvoiceFeatures_clone(const struct LDKInvoiceFeatures *NONNULL_PTR orig);
18978         export function InvoiceFeatures_clone(orig: number): number {
18979                 if(!isWasmInitialized) {
18980                         throw new Error("initializeWasm() must be awaited first!");
18981                 }
18982                 const nativeResponseValue = wasm.InvoiceFeatures_clone(orig);
18983                 return nativeResponseValue;
18984         }
18985         // uint64_t ChannelTypeFeatures_clone_ptr(LDKChannelTypeFeatures *NONNULL_PTR arg);
18986         export function ChannelTypeFeatures_clone_ptr(arg: number): number {
18987                 if(!isWasmInitialized) {
18988                         throw new Error("initializeWasm() must be awaited first!");
18989                 }
18990                 const nativeResponseValue = wasm.ChannelTypeFeatures_clone_ptr(arg);
18991                 return nativeResponseValue;
18992         }
18993         // struct LDKChannelTypeFeatures ChannelTypeFeatures_clone(const struct LDKChannelTypeFeatures *NONNULL_PTR orig);
18994         export function ChannelTypeFeatures_clone(orig: number): number {
18995                 if(!isWasmInitialized) {
18996                         throw new Error("initializeWasm() must be awaited first!");
18997                 }
18998                 const nativeResponseValue = wasm.ChannelTypeFeatures_clone(orig);
18999                 return nativeResponseValue;
19000         }
19001         // void InitFeatures_free(struct LDKInitFeatures this_obj);
19002         export function InitFeatures_free(this_obj: number): void {
19003                 if(!isWasmInitialized) {
19004                         throw new Error("initializeWasm() must be awaited first!");
19005                 }
19006                 const nativeResponseValue = wasm.InitFeatures_free(this_obj);
19007                 // debug statements here
19008         }
19009         // void NodeFeatures_free(struct LDKNodeFeatures this_obj);
19010         export function NodeFeatures_free(this_obj: number): void {
19011                 if(!isWasmInitialized) {
19012                         throw new Error("initializeWasm() must be awaited first!");
19013                 }
19014                 const nativeResponseValue = wasm.NodeFeatures_free(this_obj);
19015                 // debug statements here
19016         }
19017         // void ChannelFeatures_free(struct LDKChannelFeatures this_obj);
19018         export function ChannelFeatures_free(this_obj: number): void {
19019                 if(!isWasmInitialized) {
19020                         throw new Error("initializeWasm() must be awaited first!");
19021                 }
19022                 const nativeResponseValue = wasm.ChannelFeatures_free(this_obj);
19023                 // debug statements here
19024         }
19025         // void InvoiceFeatures_free(struct LDKInvoiceFeatures this_obj);
19026         export function InvoiceFeatures_free(this_obj: number): void {
19027                 if(!isWasmInitialized) {
19028                         throw new Error("initializeWasm() must be awaited first!");
19029                 }
19030                 const nativeResponseValue = wasm.InvoiceFeatures_free(this_obj);
19031                 // debug statements here
19032         }
19033         // void ChannelTypeFeatures_free(struct LDKChannelTypeFeatures this_obj);
19034         export function ChannelTypeFeatures_free(this_obj: number): void {
19035                 if(!isWasmInitialized) {
19036                         throw new Error("initializeWasm() must be awaited first!");
19037                 }
19038                 const nativeResponseValue = wasm.ChannelTypeFeatures_free(this_obj);
19039                 // debug statements here
19040         }
19041         // MUST_USE_RES struct LDKInitFeatures InitFeatures_empty(void);
19042         export function InitFeatures_empty(): number {
19043                 if(!isWasmInitialized) {
19044                         throw new Error("initializeWasm() must be awaited first!");
19045                 }
19046                 const nativeResponseValue = wasm.InitFeatures_empty();
19047                 return nativeResponseValue;
19048         }
19049         // MUST_USE_RES struct LDKInitFeatures InitFeatures_known(void);
19050         export function InitFeatures_known(): number {
19051                 if(!isWasmInitialized) {
19052                         throw new Error("initializeWasm() must be awaited first!");
19053                 }
19054                 const nativeResponseValue = wasm.InitFeatures_known();
19055                 return nativeResponseValue;
19056         }
19057         // MUST_USE_RES bool InitFeatures_requires_unknown_bits(const struct LDKInitFeatures *NONNULL_PTR this_arg);
19058         export function InitFeatures_requires_unknown_bits(this_arg: number): boolean {
19059                 if(!isWasmInitialized) {
19060                         throw new Error("initializeWasm() must be awaited first!");
19061                 }
19062                 const nativeResponseValue = wasm.InitFeatures_requires_unknown_bits(this_arg);
19063                 return nativeResponseValue;
19064         }
19065         // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_empty(void);
19066         export function NodeFeatures_empty(): number {
19067                 if(!isWasmInitialized) {
19068                         throw new Error("initializeWasm() must be awaited first!");
19069                 }
19070                 const nativeResponseValue = wasm.NodeFeatures_empty();
19071                 return nativeResponseValue;
19072         }
19073         // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_known(void);
19074         export function NodeFeatures_known(): number {
19075                 if(!isWasmInitialized) {
19076                         throw new Error("initializeWasm() must be awaited first!");
19077                 }
19078                 const nativeResponseValue = wasm.NodeFeatures_known();
19079                 return nativeResponseValue;
19080         }
19081         // MUST_USE_RES bool NodeFeatures_requires_unknown_bits(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
19082         export function NodeFeatures_requires_unknown_bits(this_arg: number): boolean {
19083                 if(!isWasmInitialized) {
19084                         throw new Error("initializeWasm() must be awaited first!");
19085                 }
19086                 const nativeResponseValue = wasm.NodeFeatures_requires_unknown_bits(this_arg);
19087                 return nativeResponseValue;
19088         }
19089         // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_empty(void);
19090         export function ChannelFeatures_empty(): number {
19091                 if(!isWasmInitialized) {
19092                         throw new Error("initializeWasm() must be awaited first!");
19093                 }
19094                 const nativeResponseValue = wasm.ChannelFeatures_empty();
19095                 return nativeResponseValue;
19096         }
19097         // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_known(void);
19098         export function ChannelFeatures_known(): number {
19099                 if(!isWasmInitialized) {
19100                         throw new Error("initializeWasm() must be awaited first!");
19101                 }
19102                 const nativeResponseValue = wasm.ChannelFeatures_known();
19103                 return nativeResponseValue;
19104         }
19105         // MUST_USE_RES bool ChannelFeatures_requires_unknown_bits(const struct LDKChannelFeatures *NONNULL_PTR this_arg);
19106         export function ChannelFeatures_requires_unknown_bits(this_arg: number): boolean {
19107                 if(!isWasmInitialized) {
19108                         throw new Error("initializeWasm() must be awaited first!");
19109                 }
19110                 const nativeResponseValue = wasm.ChannelFeatures_requires_unknown_bits(this_arg);
19111                 return nativeResponseValue;
19112         }
19113         // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_empty(void);
19114         export function InvoiceFeatures_empty(): number {
19115                 if(!isWasmInitialized) {
19116                         throw new Error("initializeWasm() must be awaited first!");
19117                 }
19118                 const nativeResponseValue = wasm.InvoiceFeatures_empty();
19119                 return nativeResponseValue;
19120         }
19121         // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_known(void);
19122         export function InvoiceFeatures_known(): number {
19123                 if(!isWasmInitialized) {
19124                         throw new Error("initializeWasm() must be awaited first!");
19125                 }
19126                 const nativeResponseValue = wasm.InvoiceFeatures_known();
19127                 return nativeResponseValue;
19128         }
19129         // MUST_USE_RES bool InvoiceFeatures_requires_unknown_bits(const struct LDKInvoiceFeatures *NONNULL_PTR this_arg);
19130         export function InvoiceFeatures_requires_unknown_bits(this_arg: number): boolean {
19131                 if(!isWasmInitialized) {
19132                         throw new Error("initializeWasm() must be awaited first!");
19133                 }
19134                 const nativeResponseValue = wasm.InvoiceFeatures_requires_unknown_bits(this_arg);
19135                 return nativeResponseValue;
19136         }
19137         // MUST_USE_RES struct LDKChannelTypeFeatures ChannelTypeFeatures_empty(void);
19138         export function ChannelTypeFeatures_empty(): number {
19139                 if(!isWasmInitialized) {
19140                         throw new Error("initializeWasm() must be awaited first!");
19141                 }
19142                 const nativeResponseValue = wasm.ChannelTypeFeatures_empty();
19143                 return nativeResponseValue;
19144         }
19145         // MUST_USE_RES struct LDKChannelTypeFeatures ChannelTypeFeatures_known(void);
19146         export function ChannelTypeFeatures_known(): number {
19147                 if(!isWasmInitialized) {
19148                         throw new Error("initializeWasm() must be awaited first!");
19149                 }
19150                 const nativeResponseValue = wasm.ChannelTypeFeatures_known();
19151                 return nativeResponseValue;
19152         }
19153         // MUST_USE_RES bool ChannelTypeFeatures_requires_unknown_bits(const struct LDKChannelTypeFeatures *NONNULL_PTR this_arg);
19154         export function ChannelTypeFeatures_requires_unknown_bits(this_arg: number): boolean {
19155                 if(!isWasmInitialized) {
19156                         throw new Error("initializeWasm() must be awaited first!");
19157                 }
19158                 const nativeResponseValue = wasm.ChannelTypeFeatures_requires_unknown_bits(this_arg);
19159                 return nativeResponseValue;
19160         }
19161         // struct LDKCVec_u8Z InitFeatures_write(const struct LDKInitFeatures *NONNULL_PTR obj);
19162         export function InitFeatures_write(obj: number): Uint8Array {
19163                 if(!isWasmInitialized) {
19164                         throw new Error("initializeWasm() must be awaited first!");
19165                 }
19166                 const nativeResponseValue = wasm.InitFeatures_write(obj);
19167                 return decodeArray(nativeResponseValue);
19168         }
19169         // struct LDKCResult_InitFeaturesDecodeErrorZ InitFeatures_read(struct LDKu8slice ser);
19170         export function InitFeatures_read(ser: Uint8Array): number {
19171                 if(!isWasmInitialized) {
19172                         throw new Error("initializeWasm() must be awaited first!");
19173                 }
19174                 const nativeResponseValue = wasm.InitFeatures_read(encodeArray(ser));
19175                 return nativeResponseValue;
19176         }
19177         // struct LDKCVec_u8Z ChannelFeatures_write(const struct LDKChannelFeatures *NONNULL_PTR obj);
19178         export function ChannelFeatures_write(obj: number): Uint8Array {
19179                 if(!isWasmInitialized) {
19180                         throw new Error("initializeWasm() must be awaited first!");
19181                 }
19182                 const nativeResponseValue = wasm.ChannelFeatures_write(obj);
19183                 return decodeArray(nativeResponseValue);
19184         }
19185         // struct LDKCResult_ChannelFeaturesDecodeErrorZ ChannelFeatures_read(struct LDKu8slice ser);
19186         export function ChannelFeatures_read(ser: Uint8Array): number {
19187                 if(!isWasmInitialized) {
19188                         throw new Error("initializeWasm() must be awaited first!");
19189                 }
19190                 const nativeResponseValue = wasm.ChannelFeatures_read(encodeArray(ser));
19191                 return nativeResponseValue;
19192         }
19193         // struct LDKCVec_u8Z NodeFeatures_write(const struct LDKNodeFeatures *NONNULL_PTR obj);
19194         export function NodeFeatures_write(obj: number): Uint8Array {
19195                 if(!isWasmInitialized) {
19196                         throw new Error("initializeWasm() must be awaited first!");
19197                 }
19198                 const nativeResponseValue = wasm.NodeFeatures_write(obj);
19199                 return decodeArray(nativeResponseValue);
19200         }
19201         // struct LDKCResult_NodeFeaturesDecodeErrorZ NodeFeatures_read(struct LDKu8slice ser);
19202         export function NodeFeatures_read(ser: Uint8Array): number {
19203                 if(!isWasmInitialized) {
19204                         throw new Error("initializeWasm() must be awaited first!");
19205                 }
19206                 const nativeResponseValue = wasm.NodeFeatures_read(encodeArray(ser));
19207                 return nativeResponseValue;
19208         }
19209         // struct LDKCVec_u8Z InvoiceFeatures_write(const struct LDKInvoiceFeatures *NONNULL_PTR obj);
19210         export function InvoiceFeatures_write(obj: number): Uint8Array {
19211                 if(!isWasmInitialized) {
19212                         throw new Error("initializeWasm() must be awaited first!");
19213                 }
19214                 const nativeResponseValue = wasm.InvoiceFeatures_write(obj);
19215                 return decodeArray(nativeResponseValue);
19216         }
19217         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ InvoiceFeatures_read(struct LDKu8slice ser);
19218         export function InvoiceFeatures_read(ser: Uint8Array): number {
19219                 if(!isWasmInitialized) {
19220                         throw new Error("initializeWasm() must be awaited first!");
19221                 }
19222                 const nativeResponseValue = wasm.InvoiceFeatures_read(encodeArray(ser));
19223                 return nativeResponseValue;
19224         }
19225         // struct LDKCVec_u8Z ChannelTypeFeatures_write(const struct LDKChannelTypeFeatures *NONNULL_PTR obj);
19226         export function ChannelTypeFeatures_write(obj: number): Uint8Array {
19227                 if(!isWasmInitialized) {
19228                         throw new Error("initializeWasm() must be awaited first!");
19229                 }
19230                 const nativeResponseValue = wasm.ChannelTypeFeatures_write(obj);
19231                 return decodeArray(nativeResponseValue);
19232         }
19233         // struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ ChannelTypeFeatures_read(struct LDKu8slice ser);
19234         export function ChannelTypeFeatures_read(ser: Uint8Array): number {
19235                 if(!isWasmInitialized) {
19236                         throw new Error("initializeWasm() must be awaited first!");
19237                 }
19238                 const nativeResponseValue = wasm.ChannelTypeFeatures_read(encodeArray(ser));
19239                 return nativeResponseValue;
19240         }
19241         // void ShutdownScript_free(struct LDKShutdownScript this_obj);
19242         export function ShutdownScript_free(this_obj: number): void {
19243                 if(!isWasmInitialized) {
19244                         throw new Error("initializeWasm() must be awaited first!");
19245                 }
19246                 const nativeResponseValue = wasm.ShutdownScript_free(this_obj);
19247                 // debug statements here
19248         }
19249         // uint64_t ShutdownScript_clone_ptr(LDKShutdownScript *NONNULL_PTR arg);
19250         export function ShutdownScript_clone_ptr(arg: number): number {
19251                 if(!isWasmInitialized) {
19252                         throw new Error("initializeWasm() must be awaited first!");
19253                 }
19254                 const nativeResponseValue = wasm.ShutdownScript_clone_ptr(arg);
19255                 return nativeResponseValue;
19256         }
19257         // struct LDKShutdownScript ShutdownScript_clone(const struct LDKShutdownScript *NONNULL_PTR orig);
19258         export function ShutdownScript_clone(orig: number): number {
19259                 if(!isWasmInitialized) {
19260                         throw new Error("initializeWasm() must be awaited first!");
19261                 }
19262                 const nativeResponseValue = wasm.ShutdownScript_clone(orig);
19263                 return nativeResponseValue;
19264         }
19265         // void InvalidShutdownScript_free(struct LDKInvalidShutdownScript this_obj);
19266         export function InvalidShutdownScript_free(this_obj: number): void {
19267                 if(!isWasmInitialized) {
19268                         throw new Error("initializeWasm() must be awaited first!");
19269                 }
19270                 const nativeResponseValue = wasm.InvalidShutdownScript_free(this_obj);
19271                 // debug statements here
19272         }
19273         // struct LDKu8slice InvalidShutdownScript_get_script(const struct LDKInvalidShutdownScript *NONNULL_PTR this_ptr);
19274         export function InvalidShutdownScript_get_script(this_ptr: number): Uint8Array {
19275                 if(!isWasmInitialized) {
19276                         throw new Error("initializeWasm() must be awaited first!");
19277                 }
19278                 const nativeResponseValue = wasm.InvalidShutdownScript_get_script(this_ptr);
19279                 return decodeArray(nativeResponseValue);
19280         }
19281         // void InvalidShutdownScript_set_script(struct LDKInvalidShutdownScript *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
19282         export function InvalidShutdownScript_set_script(this_ptr: number, val: Uint8Array): void {
19283                 if(!isWasmInitialized) {
19284                         throw new Error("initializeWasm() must be awaited first!");
19285                 }
19286                 const nativeResponseValue = wasm.InvalidShutdownScript_set_script(this_ptr, encodeArray(val));
19287                 // debug statements here
19288         }
19289         // MUST_USE_RES struct LDKInvalidShutdownScript InvalidShutdownScript_new(struct LDKCVec_u8Z script_arg);
19290         export function InvalidShutdownScript_new(script_arg: Uint8Array): number {
19291                 if(!isWasmInitialized) {
19292                         throw new Error("initializeWasm() must be awaited first!");
19293                 }
19294                 const nativeResponseValue = wasm.InvalidShutdownScript_new(encodeArray(script_arg));
19295                 return nativeResponseValue;
19296         }
19297         // uint64_t InvalidShutdownScript_clone_ptr(LDKInvalidShutdownScript *NONNULL_PTR arg);
19298         export function InvalidShutdownScript_clone_ptr(arg: number): number {
19299                 if(!isWasmInitialized) {
19300                         throw new Error("initializeWasm() must be awaited first!");
19301                 }
19302                 const nativeResponseValue = wasm.InvalidShutdownScript_clone_ptr(arg);
19303                 return nativeResponseValue;
19304         }
19305         // struct LDKInvalidShutdownScript InvalidShutdownScript_clone(const struct LDKInvalidShutdownScript *NONNULL_PTR orig);
19306         export function InvalidShutdownScript_clone(orig: number): number {
19307                 if(!isWasmInitialized) {
19308                         throw new Error("initializeWasm() must be awaited first!");
19309                 }
19310                 const nativeResponseValue = wasm.InvalidShutdownScript_clone(orig);
19311                 return nativeResponseValue;
19312         }
19313         // struct LDKCVec_u8Z ShutdownScript_write(const struct LDKShutdownScript *NONNULL_PTR obj);
19314         export function ShutdownScript_write(obj: number): Uint8Array {
19315                 if(!isWasmInitialized) {
19316                         throw new Error("initializeWasm() must be awaited first!");
19317                 }
19318                 const nativeResponseValue = wasm.ShutdownScript_write(obj);
19319                 return decodeArray(nativeResponseValue);
19320         }
19321         // struct LDKCResult_ShutdownScriptDecodeErrorZ ShutdownScript_read(struct LDKu8slice ser);
19322         export function ShutdownScript_read(ser: Uint8Array): number {
19323                 if(!isWasmInitialized) {
19324                         throw new Error("initializeWasm() must be awaited first!");
19325                 }
19326                 const nativeResponseValue = wasm.ShutdownScript_read(encodeArray(ser));
19327                 return nativeResponseValue;
19328         }
19329         // MUST_USE_RES struct LDKShutdownScript ShutdownScript_new_p2wpkh(const uint8_t (*pubkey_hash)[20]);
19330         export function ShutdownScript_new_p2wpkh(pubkey_hash: Uint8Array): number {
19331                 if(!isWasmInitialized) {
19332                         throw new Error("initializeWasm() must be awaited first!");
19333                 }
19334                 const nativeResponseValue = wasm.ShutdownScript_new_p2wpkh(encodeArray(pubkey_hash));
19335                 return nativeResponseValue;
19336         }
19337         // MUST_USE_RES struct LDKShutdownScript ShutdownScript_new_p2wsh(const uint8_t (*script_hash)[32]);
19338         export function ShutdownScript_new_p2wsh(script_hash: Uint8Array): number {
19339                 if(!isWasmInitialized) {
19340                         throw new Error("initializeWasm() must be awaited first!");
19341                 }
19342                 const nativeResponseValue = wasm.ShutdownScript_new_p2wsh(encodeArray(script_hash));
19343                 return nativeResponseValue;
19344         }
19345         // MUST_USE_RES struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ ShutdownScript_new_witness_program(uint8_t version, struct LDKu8slice program);
19346         export function ShutdownScript_new_witness_program(version: number, program: Uint8Array): number {
19347                 if(!isWasmInitialized) {
19348                         throw new Error("initializeWasm() must be awaited first!");
19349                 }
19350                 const nativeResponseValue = wasm.ShutdownScript_new_witness_program(version, encodeArray(program));
19351                 return nativeResponseValue;
19352         }
19353         // MUST_USE_RES struct LDKCVec_u8Z ShutdownScript_into_inner(struct LDKShutdownScript this_arg);
19354         export function ShutdownScript_into_inner(this_arg: number): Uint8Array {
19355                 if(!isWasmInitialized) {
19356                         throw new Error("initializeWasm() must be awaited first!");
19357                 }
19358                 const nativeResponseValue = wasm.ShutdownScript_into_inner(this_arg);
19359                 return decodeArray(nativeResponseValue);
19360         }
19361         // MUST_USE_RES struct LDKPublicKey ShutdownScript_as_legacy_pubkey(const struct LDKShutdownScript *NONNULL_PTR this_arg);
19362         export function ShutdownScript_as_legacy_pubkey(this_arg: number): Uint8Array {
19363                 if(!isWasmInitialized) {
19364                         throw new Error("initializeWasm() must be awaited first!");
19365                 }
19366                 const nativeResponseValue = wasm.ShutdownScript_as_legacy_pubkey(this_arg);
19367                 return decodeArray(nativeResponseValue);
19368         }
19369         // MUST_USE_RES bool ShutdownScript_is_compatible(const struct LDKShutdownScript *NONNULL_PTR this_arg, const struct LDKInitFeatures *NONNULL_PTR features);
19370         export function ShutdownScript_is_compatible(this_arg: number, features: number): boolean {
19371                 if(!isWasmInitialized) {
19372                         throw new Error("initializeWasm() must be awaited first!");
19373                 }
19374                 const nativeResponseValue = wasm.ShutdownScript_is_compatible(this_arg, features);
19375                 return nativeResponseValue;
19376         }
19377         // void CustomMessageReader_free(struct LDKCustomMessageReader this_ptr);
19378         export function CustomMessageReader_free(this_ptr: number): void {
19379                 if(!isWasmInitialized) {
19380                         throw new Error("initializeWasm() must be awaited first!");
19381                 }
19382                 const nativeResponseValue = wasm.CustomMessageReader_free(this_ptr);
19383                 // debug statements here
19384         }
19385         // uint64_t Type_clone_ptr(LDKType *NONNULL_PTR arg);
19386         export function Type_clone_ptr(arg: number): number {
19387                 if(!isWasmInitialized) {
19388                         throw new Error("initializeWasm() must be awaited first!");
19389                 }
19390                 const nativeResponseValue = wasm.Type_clone_ptr(arg);
19391                 return nativeResponseValue;
19392         }
19393         // struct LDKType Type_clone(const struct LDKType *NONNULL_PTR orig);
19394         export function Type_clone(orig: number): number {
19395                 if(!isWasmInitialized) {
19396                         throw new Error("initializeWasm() must be awaited first!");
19397                 }
19398                 const nativeResponseValue = wasm.Type_clone(orig);
19399                 return nativeResponseValue;
19400         }
19401         // void Type_free(struct LDKType this_ptr);
19402         export function Type_free(this_ptr: number): void {
19403                 if(!isWasmInitialized) {
19404                         throw new Error("initializeWasm() must be awaited first!");
19405                 }
19406                 const nativeResponseValue = wasm.Type_free(this_ptr);
19407                 // debug statements here
19408         }
19409         // void NodeId_free(struct LDKNodeId this_obj);
19410         export function NodeId_free(this_obj: number): void {
19411                 if(!isWasmInitialized) {
19412                         throw new Error("initializeWasm() must be awaited first!");
19413                 }
19414                 const nativeResponseValue = wasm.NodeId_free(this_obj);
19415                 // debug statements here
19416         }
19417         // uint64_t NodeId_clone_ptr(LDKNodeId *NONNULL_PTR arg);
19418         export function NodeId_clone_ptr(arg: number): number {
19419                 if(!isWasmInitialized) {
19420                         throw new Error("initializeWasm() must be awaited first!");
19421                 }
19422                 const nativeResponseValue = wasm.NodeId_clone_ptr(arg);
19423                 return nativeResponseValue;
19424         }
19425         // struct LDKNodeId NodeId_clone(const struct LDKNodeId *NONNULL_PTR orig);
19426         export function NodeId_clone(orig: number): number {
19427                 if(!isWasmInitialized) {
19428                         throw new Error("initializeWasm() must be awaited first!");
19429                 }
19430                 const nativeResponseValue = wasm.NodeId_clone(orig);
19431                 return nativeResponseValue;
19432         }
19433         // MUST_USE_RES struct LDKNodeId NodeId_from_pubkey(struct LDKPublicKey pubkey);
19434         export function NodeId_from_pubkey(pubkey: Uint8Array): number {
19435                 if(!isWasmInitialized) {
19436                         throw new Error("initializeWasm() must be awaited first!");
19437                 }
19438                 const nativeResponseValue = wasm.NodeId_from_pubkey(encodeArray(pubkey));
19439                 return nativeResponseValue;
19440         }
19441         // MUST_USE_RES struct LDKu8slice NodeId_as_slice(const struct LDKNodeId *NONNULL_PTR this_arg);
19442         export function NodeId_as_slice(this_arg: number): Uint8Array {
19443                 if(!isWasmInitialized) {
19444                         throw new Error("initializeWasm() must be awaited first!");
19445                 }
19446                 const nativeResponseValue = wasm.NodeId_as_slice(this_arg);
19447                 return decodeArray(nativeResponseValue);
19448         }
19449         // uint64_t NodeId_hash(const struct LDKNodeId *NONNULL_PTR o);
19450         export function NodeId_hash(o: number): number {
19451                 if(!isWasmInitialized) {
19452                         throw new Error("initializeWasm() must be awaited first!");
19453                 }
19454                 const nativeResponseValue = wasm.NodeId_hash(o);
19455                 return nativeResponseValue;
19456         }
19457         // struct LDKCVec_u8Z NodeId_write(const struct LDKNodeId *NONNULL_PTR obj);
19458         export function NodeId_write(obj: number): Uint8Array {
19459                 if(!isWasmInitialized) {
19460                         throw new Error("initializeWasm() must be awaited first!");
19461                 }
19462                 const nativeResponseValue = wasm.NodeId_write(obj);
19463                 return decodeArray(nativeResponseValue);
19464         }
19465         // struct LDKCResult_NodeIdDecodeErrorZ NodeId_read(struct LDKu8slice ser);
19466         export function NodeId_read(ser: Uint8Array): number {
19467                 if(!isWasmInitialized) {
19468                         throw new Error("initializeWasm() must be awaited first!");
19469                 }
19470                 const nativeResponseValue = wasm.NodeId_read(encodeArray(ser));
19471                 return nativeResponseValue;
19472         }
19473         // void NetworkGraph_free(struct LDKNetworkGraph this_obj);
19474         export function NetworkGraph_free(this_obj: number): void {
19475                 if(!isWasmInitialized) {
19476                         throw new Error("initializeWasm() must be awaited first!");
19477                 }
19478                 const nativeResponseValue = wasm.NetworkGraph_free(this_obj);
19479                 // debug statements here
19480         }
19481         // uint64_t NetworkGraph_clone_ptr(LDKNetworkGraph *NONNULL_PTR arg);
19482         export function NetworkGraph_clone_ptr(arg: number): number {
19483                 if(!isWasmInitialized) {
19484                         throw new Error("initializeWasm() must be awaited first!");
19485                 }
19486                 const nativeResponseValue = wasm.NetworkGraph_clone_ptr(arg);
19487                 return nativeResponseValue;
19488         }
19489         // struct LDKNetworkGraph NetworkGraph_clone(const struct LDKNetworkGraph *NONNULL_PTR orig);
19490         export function NetworkGraph_clone(orig: number): number {
19491                 if(!isWasmInitialized) {
19492                         throw new Error("initializeWasm() must be awaited first!");
19493                 }
19494                 const nativeResponseValue = wasm.NetworkGraph_clone(orig);
19495                 return nativeResponseValue;
19496         }
19497         // void ReadOnlyNetworkGraph_free(struct LDKReadOnlyNetworkGraph this_obj);
19498         export function ReadOnlyNetworkGraph_free(this_obj: number): void {
19499                 if(!isWasmInitialized) {
19500                         throw new Error("initializeWasm() must be awaited first!");
19501                 }
19502                 const nativeResponseValue = wasm.ReadOnlyNetworkGraph_free(this_obj);
19503                 // debug statements here
19504         }
19505         // void NetworkUpdate_free(struct LDKNetworkUpdate this_ptr);
19506         export function NetworkUpdate_free(this_ptr: number): void {
19507                 if(!isWasmInitialized) {
19508                         throw new Error("initializeWasm() must be awaited first!");
19509                 }
19510                 const nativeResponseValue = wasm.NetworkUpdate_free(this_ptr);
19511                 // debug statements here
19512         }
19513         // uint64_t NetworkUpdate_clone_ptr(LDKNetworkUpdate *NONNULL_PTR arg);
19514         export function NetworkUpdate_clone_ptr(arg: number): number {
19515                 if(!isWasmInitialized) {
19516                         throw new Error("initializeWasm() must be awaited first!");
19517                 }
19518                 const nativeResponseValue = wasm.NetworkUpdate_clone_ptr(arg);
19519                 return nativeResponseValue;
19520         }
19521         // struct LDKNetworkUpdate NetworkUpdate_clone(const struct LDKNetworkUpdate *NONNULL_PTR orig);
19522         export function NetworkUpdate_clone(orig: number): number {
19523                 if(!isWasmInitialized) {
19524                         throw new Error("initializeWasm() must be awaited first!");
19525                 }
19526                 const nativeResponseValue = wasm.NetworkUpdate_clone(orig);
19527                 return nativeResponseValue;
19528         }
19529         // struct LDKNetworkUpdate NetworkUpdate_channel_update_message(struct LDKChannelUpdate msg);
19530         export function NetworkUpdate_channel_update_message(msg: number): number {
19531                 if(!isWasmInitialized) {
19532                         throw new Error("initializeWasm() must be awaited first!");
19533                 }
19534                 const nativeResponseValue = wasm.NetworkUpdate_channel_update_message(msg);
19535                 return nativeResponseValue;
19536         }
19537         // struct LDKNetworkUpdate NetworkUpdate_channel_closed(uint64_t short_channel_id, bool is_permanent);
19538         export function NetworkUpdate_channel_closed(short_channel_id: number, is_permanent: boolean): number {
19539                 if(!isWasmInitialized) {
19540                         throw new Error("initializeWasm() must be awaited first!");
19541                 }
19542                 const nativeResponseValue = wasm.NetworkUpdate_channel_closed(short_channel_id, is_permanent);
19543                 return nativeResponseValue;
19544         }
19545         // struct LDKNetworkUpdate NetworkUpdate_node_failure(struct LDKPublicKey node_id, bool is_permanent);
19546         export function NetworkUpdate_node_failure(node_id: Uint8Array, is_permanent: boolean): number {
19547                 if(!isWasmInitialized) {
19548                         throw new Error("initializeWasm() must be awaited first!");
19549                 }
19550                 const nativeResponseValue = wasm.NetworkUpdate_node_failure(encodeArray(node_id), is_permanent);
19551                 return nativeResponseValue;
19552         }
19553         // struct LDKCVec_u8Z NetworkUpdate_write(const struct LDKNetworkUpdate *NONNULL_PTR obj);
19554         export function NetworkUpdate_write(obj: number): Uint8Array {
19555                 if(!isWasmInitialized) {
19556                         throw new Error("initializeWasm() must be awaited first!");
19557                 }
19558                 const nativeResponseValue = wasm.NetworkUpdate_write(obj);
19559                 return decodeArray(nativeResponseValue);
19560         }
19561         // struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ NetworkUpdate_read(struct LDKu8slice ser);
19562         export function NetworkUpdate_read(ser: Uint8Array): number {
19563                 if(!isWasmInitialized) {
19564                         throw new Error("initializeWasm() must be awaited first!");
19565                 }
19566                 const nativeResponseValue = wasm.NetworkUpdate_read(encodeArray(ser));
19567                 return nativeResponseValue;
19568         }
19569         // struct LDKEventHandler NetGraphMsgHandler_as_EventHandler(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
19570         export function NetGraphMsgHandler_as_EventHandler(this_arg: number): number {
19571                 if(!isWasmInitialized) {
19572                         throw new Error("initializeWasm() must be awaited first!");
19573                 }
19574                 const nativeResponseValue = wasm.NetGraphMsgHandler_as_EventHandler(this_arg);
19575                 return nativeResponseValue;
19576         }
19577         // void NetGraphMsgHandler_free(struct LDKNetGraphMsgHandler this_obj);
19578         export function NetGraphMsgHandler_free(this_obj: number): void {
19579                 if(!isWasmInitialized) {
19580                         throw new Error("initializeWasm() must be awaited first!");
19581                 }
19582                 const nativeResponseValue = wasm.NetGraphMsgHandler_free(this_obj);
19583                 // debug statements here
19584         }
19585         // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_new(const struct LDKNetworkGraph *NONNULL_PTR network_graph, struct LDKCOption_AccessZ chain_access, struct LDKLogger logger);
19586         export function NetGraphMsgHandler_new(network_graph: number, chain_access: number, logger: number): number {
19587                 if(!isWasmInitialized) {
19588                         throw new Error("initializeWasm() must be awaited first!");
19589                 }
19590                 const nativeResponseValue = wasm.NetGraphMsgHandler_new(network_graph, chain_access, logger);
19591                 return nativeResponseValue;
19592         }
19593         // void NetGraphMsgHandler_add_chain_access(struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg, struct LDKCOption_AccessZ chain_access);
19594         export function NetGraphMsgHandler_add_chain_access(this_arg: number, chain_access: number): void {
19595                 if(!isWasmInitialized) {
19596                         throw new Error("initializeWasm() must be awaited first!");
19597                 }
19598                 const nativeResponseValue = wasm.NetGraphMsgHandler_add_chain_access(this_arg, chain_access);
19599                 // debug statements here
19600         }
19601         // struct LDKRoutingMessageHandler NetGraphMsgHandler_as_RoutingMessageHandler(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
19602         export function NetGraphMsgHandler_as_RoutingMessageHandler(this_arg: number): number {
19603                 if(!isWasmInitialized) {
19604                         throw new Error("initializeWasm() must be awaited first!");
19605                 }
19606                 const nativeResponseValue = wasm.NetGraphMsgHandler_as_RoutingMessageHandler(this_arg);
19607                 return nativeResponseValue;
19608         }
19609         // struct LDKMessageSendEventsProvider NetGraphMsgHandler_as_MessageSendEventsProvider(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
19610         export function NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg: number): number {
19611                 if(!isWasmInitialized) {
19612                         throw new Error("initializeWasm() must be awaited first!");
19613                 }
19614                 const nativeResponseValue = wasm.NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg);
19615                 return nativeResponseValue;
19616         }
19617         // void DirectionalChannelInfo_free(struct LDKDirectionalChannelInfo this_obj);
19618         export function DirectionalChannelInfo_free(this_obj: number): void {
19619                 if(!isWasmInitialized) {
19620                         throw new Error("initializeWasm() must be awaited first!");
19621                 }
19622                 const nativeResponseValue = wasm.DirectionalChannelInfo_free(this_obj);
19623                 // debug statements here
19624         }
19625         // uint32_t DirectionalChannelInfo_get_last_update(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
19626         export function DirectionalChannelInfo_get_last_update(this_ptr: number): number {
19627                 if(!isWasmInitialized) {
19628                         throw new Error("initializeWasm() must be awaited first!");
19629                 }
19630                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_last_update(this_ptr);
19631                 return nativeResponseValue;
19632         }
19633         // void DirectionalChannelInfo_set_last_update(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint32_t val);
19634         export function DirectionalChannelInfo_set_last_update(this_ptr: number, val: number): void {
19635                 if(!isWasmInitialized) {
19636                         throw new Error("initializeWasm() must be awaited first!");
19637                 }
19638                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update(this_ptr, val);
19639                 // debug statements here
19640         }
19641         // bool DirectionalChannelInfo_get_enabled(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
19642         export function DirectionalChannelInfo_get_enabled(this_ptr: number): boolean {
19643                 if(!isWasmInitialized) {
19644                         throw new Error("initializeWasm() must be awaited first!");
19645                 }
19646                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_enabled(this_ptr);
19647                 return nativeResponseValue;
19648         }
19649         // void DirectionalChannelInfo_set_enabled(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, bool val);
19650         export function DirectionalChannelInfo_set_enabled(this_ptr: number, val: boolean): void {
19651                 if(!isWasmInitialized) {
19652                         throw new Error("initializeWasm() must be awaited first!");
19653                 }
19654                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_enabled(this_ptr, val);
19655                 // debug statements here
19656         }
19657         // uint16_t DirectionalChannelInfo_get_cltv_expiry_delta(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
19658         export function DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr: number): number {
19659                 if(!isWasmInitialized) {
19660                         throw new Error("initializeWasm() must be awaited first!");
19661                 }
19662                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr);
19663                 return nativeResponseValue;
19664         }
19665         // void DirectionalChannelInfo_set_cltv_expiry_delta(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint16_t val);
19666         export function DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr: number, val: number): void {
19667                 if(!isWasmInitialized) {
19668                         throw new Error("initializeWasm() must be awaited first!");
19669                 }
19670                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr, val);
19671                 // debug statements here
19672         }
19673         // uint64_t DirectionalChannelInfo_get_htlc_minimum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
19674         export function DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr: number): number {
19675                 if(!isWasmInitialized) {
19676                         throw new Error("initializeWasm() must be awaited first!");
19677                 }
19678                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr);
19679                 return nativeResponseValue;
19680         }
19681         // void DirectionalChannelInfo_set_htlc_minimum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint64_t val);
19682         export function DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr: number, val: number): void {
19683                 if(!isWasmInitialized) {
19684                         throw new Error("initializeWasm() must be awaited first!");
19685                 }
19686                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr, val);
19687                 // debug statements here
19688         }
19689         // struct LDKCOption_u64Z DirectionalChannelInfo_get_htlc_maximum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
19690         export function DirectionalChannelInfo_get_htlc_maximum_msat(this_ptr: number): number {
19691                 if(!isWasmInitialized) {
19692                         throw new Error("initializeWasm() must be awaited first!");
19693                 }
19694                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_htlc_maximum_msat(this_ptr);
19695                 return nativeResponseValue;
19696         }
19697         // void DirectionalChannelInfo_set_htlc_maximum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
19698         export function DirectionalChannelInfo_set_htlc_maximum_msat(this_ptr: number, val: number): void {
19699                 if(!isWasmInitialized) {
19700                         throw new Error("initializeWasm() must be awaited first!");
19701                 }
19702                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_htlc_maximum_msat(this_ptr, val);
19703                 // debug statements here
19704         }
19705         // struct LDKRoutingFees DirectionalChannelInfo_get_fees(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
19706         export function DirectionalChannelInfo_get_fees(this_ptr: number): number {
19707                 if(!isWasmInitialized) {
19708                         throw new Error("initializeWasm() must be awaited first!");
19709                 }
19710                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_fees(this_ptr);
19711                 return nativeResponseValue;
19712         }
19713         // void DirectionalChannelInfo_set_fees(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
19714         export function DirectionalChannelInfo_set_fees(this_ptr: number, val: number): void {
19715                 if(!isWasmInitialized) {
19716                         throw new Error("initializeWasm() must be awaited first!");
19717                 }
19718                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_fees(this_ptr, val);
19719                 // debug statements here
19720         }
19721         // struct LDKChannelUpdate DirectionalChannelInfo_get_last_update_message(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
19722         export function DirectionalChannelInfo_get_last_update_message(this_ptr: number): number {
19723                 if(!isWasmInitialized) {
19724                         throw new Error("initializeWasm() must be awaited first!");
19725                 }
19726                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_last_update_message(this_ptr);
19727                 return nativeResponseValue;
19728         }
19729         // void DirectionalChannelInfo_set_last_update_message(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelUpdate val);
19730         export function DirectionalChannelInfo_set_last_update_message(this_ptr: number, val: number): void {
19731                 if(!isWasmInitialized) {
19732                         throw new Error("initializeWasm() must be awaited first!");
19733                 }
19734                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update_message(this_ptr, val);
19735                 // debug statements here
19736         }
19737         // MUST_USE_RES struct LDKDirectionalChannelInfo DirectionalChannelInfo_new(uint32_t last_update_arg, bool enabled_arg, uint16_t cltv_expiry_delta_arg, uint64_t htlc_minimum_msat_arg, struct LDKCOption_u64Z htlc_maximum_msat_arg, struct LDKRoutingFees fees_arg, struct LDKChannelUpdate last_update_message_arg);
19738         export function DirectionalChannelInfo_new(last_update_arg: number, enabled_arg: boolean, cltv_expiry_delta_arg: number, htlc_minimum_msat_arg: number, htlc_maximum_msat_arg: number, fees_arg: number, last_update_message_arg: number): number {
19739                 if(!isWasmInitialized) {
19740                         throw new Error("initializeWasm() must be awaited first!");
19741                 }
19742                 const nativeResponseValue = wasm.DirectionalChannelInfo_new(last_update_arg, enabled_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg, fees_arg, last_update_message_arg);
19743                 return nativeResponseValue;
19744         }
19745         // uint64_t DirectionalChannelInfo_clone_ptr(LDKDirectionalChannelInfo *NONNULL_PTR arg);
19746         export function DirectionalChannelInfo_clone_ptr(arg: number): number {
19747                 if(!isWasmInitialized) {
19748                         throw new Error("initializeWasm() must be awaited first!");
19749                 }
19750                 const nativeResponseValue = wasm.DirectionalChannelInfo_clone_ptr(arg);
19751                 return nativeResponseValue;
19752         }
19753         // struct LDKDirectionalChannelInfo DirectionalChannelInfo_clone(const struct LDKDirectionalChannelInfo *NONNULL_PTR orig);
19754         export function DirectionalChannelInfo_clone(orig: number): number {
19755                 if(!isWasmInitialized) {
19756                         throw new Error("initializeWasm() must be awaited first!");
19757                 }
19758                 const nativeResponseValue = wasm.DirectionalChannelInfo_clone(orig);
19759                 return nativeResponseValue;
19760         }
19761         // struct LDKCVec_u8Z DirectionalChannelInfo_write(const struct LDKDirectionalChannelInfo *NONNULL_PTR obj);
19762         export function DirectionalChannelInfo_write(obj: number): Uint8Array {
19763                 if(!isWasmInitialized) {
19764                         throw new Error("initializeWasm() must be awaited first!");
19765                 }
19766                 const nativeResponseValue = wasm.DirectionalChannelInfo_write(obj);
19767                 return decodeArray(nativeResponseValue);
19768         }
19769         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ DirectionalChannelInfo_read(struct LDKu8slice ser);
19770         export function DirectionalChannelInfo_read(ser: Uint8Array): number {
19771                 if(!isWasmInitialized) {
19772                         throw new Error("initializeWasm() must be awaited first!");
19773                 }
19774                 const nativeResponseValue = wasm.DirectionalChannelInfo_read(encodeArray(ser));
19775                 return nativeResponseValue;
19776         }
19777         // void ChannelInfo_free(struct LDKChannelInfo this_obj);
19778         export function ChannelInfo_free(this_obj: number): void {
19779                 if(!isWasmInitialized) {
19780                         throw new Error("initializeWasm() must be awaited first!");
19781                 }
19782                 const nativeResponseValue = wasm.ChannelInfo_free(this_obj);
19783                 // debug statements here
19784         }
19785         // struct LDKChannelFeatures ChannelInfo_get_features(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
19786         export function ChannelInfo_get_features(this_ptr: number): number {
19787                 if(!isWasmInitialized) {
19788                         throw new Error("initializeWasm() must be awaited first!");
19789                 }
19790                 const nativeResponseValue = wasm.ChannelInfo_get_features(this_ptr);
19791                 return nativeResponseValue;
19792         }
19793         // void ChannelInfo_set_features(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
19794         export function ChannelInfo_set_features(this_ptr: number, val: number): void {
19795                 if(!isWasmInitialized) {
19796                         throw new Error("initializeWasm() must be awaited first!");
19797                 }
19798                 const nativeResponseValue = wasm.ChannelInfo_set_features(this_ptr, val);
19799                 // debug statements here
19800         }
19801         // struct LDKNodeId ChannelInfo_get_node_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
19802         export function ChannelInfo_get_node_one(this_ptr: number): number {
19803                 if(!isWasmInitialized) {
19804                         throw new Error("initializeWasm() must be awaited first!");
19805                 }
19806                 const nativeResponseValue = wasm.ChannelInfo_get_node_one(this_ptr);
19807                 return nativeResponseValue;
19808         }
19809         // void ChannelInfo_set_node_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKNodeId val);
19810         export function ChannelInfo_set_node_one(this_ptr: number, val: number): void {
19811                 if(!isWasmInitialized) {
19812                         throw new Error("initializeWasm() must be awaited first!");
19813                 }
19814                 const nativeResponseValue = wasm.ChannelInfo_set_node_one(this_ptr, val);
19815                 // debug statements here
19816         }
19817         // struct LDKDirectionalChannelInfo ChannelInfo_get_one_to_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
19818         export function ChannelInfo_get_one_to_two(this_ptr: number): number {
19819                 if(!isWasmInitialized) {
19820                         throw new Error("initializeWasm() must be awaited first!");
19821                 }
19822                 const nativeResponseValue = wasm.ChannelInfo_get_one_to_two(this_ptr);
19823                 return nativeResponseValue;
19824         }
19825         // void ChannelInfo_set_one_to_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
19826         export function ChannelInfo_set_one_to_two(this_ptr: number, val: number): void {
19827                 if(!isWasmInitialized) {
19828                         throw new Error("initializeWasm() must be awaited first!");
19829                 }
19830                 const nativeResponseValue = wasm.ChannelInfo_set_one_to_two(this_ptr, val);
19831                 // debug statements here
19832         }
19833         // struct LDKNodeId ChannelInfo_get_node_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
19834         export function ChannelInfo_get_node_two(this_ptr: number): number {
19835                 if(!isWasmInitialized) {
19836                         throw new Error("initializeWasm() must be awaited first!");
19837                 }
19838                 const nativeResponseValue = wasm.ChannelInfo_get_node_two(this_ptr);
19839                 return nativeResponseValue;
19840         }
19841         // void ChannelInfo_set_node_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKNodeId val);
19842         export function ChannelInfo_set_node_two(this_ptr: number, val: number): void {
19843                 if(!isWasmInitialized) {
19844                         throw new Error("initializeWasm() must be awaited first!");
19845                 }
19846                 const nativeResponseValue = wasm.ChannelInfo_set_node_two(this_ptr, val);
19847                 // debug statements here
19848         }
19849         // struct LDKDirectionalChannelInfo ChannelInfo_get_two_to_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
19850         export function ChannelInfo_get_two_to_one(this_ptr: number): number {
19851                 if(!isWasmInitialized) {
19852                         throw new Error("initializeWasm() must be awaited first!");
19853                 }
19854                 const nativeResponseValue = wasm.ChannelInfo_get_two_to_one(this_ptr);
19855                 return nativeResponseValue;
19856         }
19857         // void ChannelInfo_set_two_to_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
19858         export function ChannelInfo_set_two_to_one(this_ptr: number, val: number): void {
19859                 if(!isWasmInitialized) {
19860                         throw new Error("initializeWasm() must be awaited first!");
19861                 }
19862                 const nativeResponseValue = wasm.ChannelInfo_set_two_to_one(this_ptr, val);
19863                 // debug statements here
19864         }
19865         // struct LDKCOption_u64Z ChannelInfo_get_capacity_sats(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
19866         export function ChannelInfo_get_capacity_sats(this_ptr: number): number {
19867                 if(!isWasmInitialized) {
19868                         throw new Error("initializeWasm() must be awaited first!");
19869                 }
19870                 const nativeResponseValue = wasm.ChannelInfo_get_capacity_sats(this_ptr);
19871                 return nativeResponseValue;
19872         }
19873         // void ChannelInfo_set_capacity_sats(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
19874         export function ChannelInfo_set_capacity_sats(this_ptr: number, val: number): void {
19875                 if(!isWasmInitialized) {
19876                         throw new Error("initializeWasm() must be awaited first!");
19877                 }
19878                 const nativeResponseValue = wasm.ChannelInfo_set_capacity_sats(this_ptr, val);
19879                 // debug statements here
19880         }
19881         // struct LDKChannelAnnouncement ChannelInfo_get_announcement_message(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
19882         export function ChannelInfo_get_announcement_message(this_ptr: number): number {
19883                 if(!isWasmInitialized) {
19884                         throw new Error("initializeWasm() must be awaited first!");
19885                 }
19886                 const nativeResponseValue = wasm.ChannelInfo_get_announcement_message(this_ptr);
19887                 return nativeResponseValue;
19888         }
19889         // void ChannelInfo_set_announcement_message(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelAnnouncement val);
19890         export function ChannelInfo_set_announcement_message(this_ptr: number, val: number): void {
19891                 if(!isWasmInitialized) {
19892                         throw new Error("initializeWasm() must be awaited first!");
19893                 }
19894                 const nativeResponseValue = wasm.ChannelInfo_set_announcement_message(this_ptr, val);
19895                 // debug statements here
19896         }
19897         // uint64_t ChannelInfo_clone_ptr(LDKChannelInfo *NONNULL_PTR arg);
19898         export function ChannelInfo_clone_ptr(arg: number): number {
19899                 if(!isWasmInitialized) {
19900                         throw new Error("initializeWasm() must be awaited first!");
19901                 }
19902                 const nativeResponseValue = wasm.ChannelInfo_clone_ptr(arg);
19903                 return nativeResponseValue;
19904         }
19905         // struct LDKChannelInfo ChannelInfo_clone(const struct LDKChannelInfo *NONNULL_PTR orig);
19906         export function ChannelInfo_clone(orig: number): number {
19907                 if(!isWasmInitialized) {
19908                         throw new Error("initializeWasm() must be awaited first!");
19909                 }
19910                 const nativeResponseValue = wasm.ChannelInfo_clone(orig);
19911                 return nativeResponseValue;
19912         }
19913         // struct LDKCVec_u8Z ChannelInfo_write(const struct LDKChannelInfo *NONNULL_PTR obj);
19914         export function ChannelInfo_write(obj: number): Uint8Array {
19915                 if(!isWasmInitialized) {
19916                         throw new Error("initializeWasm() must be awaited first!");
19917                 }
19918                 const nativeResponseValue = wasm.ChannelInfo_write(obj);
19919                 return decodeArray(nativeResponseValue);
19920         }
19921         // struct LDKCResult_ChannelInfoDecodeErrorZ ChannelInfo_read(struct LDKu8slice ser);
19922         export function ChannelInfo_read(ser: Uint8Array): number {
19923                 if(!isWasmInitialized) {
19924                         throw new Error("initializeWasm() must be awaited first!");
19925                 }
19926                 const nativeResponseValue = wasm.ChannelInfo_read(encodeArray(ser));
19927                 return nativeResponseValue;
19928         }
19929         // void RoutingFees_free(struct LDKRoutingFees this_obj);
19930         export function RoutingFees_free(this_obj: number): void {
19931                 if(!isWasmInitialized) {
19932                         throw new Error("initializeWasm() must be awaited first!");
19933                 }
19934                 const nativeResponseValue = wasm.RoutingFees_free(this_obj);
19935                 // debug statements here
19936         }
19937         // uint32_t RoutingFees_get_base_msat(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
19938         export function RoutingFees_get_base_msat(this_ptr: number): number {
19939                 if(!isWasmInitialized) {
19940                         throw new Error("initializeWasm() must be awaited first!");
19941                 }
19942                 const nativeResponseValue = wasm.RoutingFees_get_base_msat(this_ptr);
19943                 return nativeResponseValue;
19944         }
19945         // void RoutingFees_set_base_msat(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
19946         export function RoutingFees_set_base_msat(this_ptr: number, val: number): void {
19947                 if(!isWasmInitialized) {
19948                         throw new Error("initializeWasm() must be awaited first!");
19949                 }
19950                 const nativeResponseValue = wasm.RoutingFees_set_base_msat(this_ptr, val);
19951                 // debug statements here
19952         }
19953         // uint32_t RoutingFees_get_proportional_millionths(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
19954         export function RoutingFees_get_proportional_millionths(this_ptr: number): number {
19955                 if(!isWasmInitialized) {
19956                         throw new Error("initializeWasm() must be awaited first!");
19957                 }
19958                 const nativeResponseValue = wasm.RoutingFees_get_proportional_millionths(this_ptr);
19959                 return nativeResponseValue;
19960         }
19961         // void RoutingFees_set_proportional_millionths(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
19962         export function RoutingFees_set_proportional_millionths(this_ptr: number, val: number): void {
19963                 if(!isWasmInitialized) {
19964                         throw new Error("initializeWasm() must be awaited first!");
19965                 }
19966                 const nativeResponseValue = wasm.RoutingFees_set_proportional_millionths(this_ptr, val);
19967                 // debug statements here
19968         }
19969         // MUST_USE_RES struct LDKRoutingFees RoutingFees_new(uint32_t base_msat_arg, uint32_t proportional_millionths_arg);
19970         export function RoutingFees_new(base_msat_arg: number, proportional_millionths_arg: number): number {
19971                 if(!isWasmInitialized) {
19972                         throw new Error("initializeWasm() must be awaited first!");
19973                 }
19974                 const nativeResponseValue = wasm.RoutingFees_new(base_msat_arg, proportional_millionths_arg);
19975                 return nativeResponseValue;
19976         }
19977         // bool RoutingFees_eq(const struct LDKRoutingFees *NONNULL_PTR a, const struct LDKRoutingFees *NONNULL_PTR b);
19978         export function RoutingFees_eq(a: number, b: number): boolean {
19979                 if(!isWasmInitialized) {
19980                         throw new Error("initializeWasm() must be awaited first!");
19981                 }
19982                 const nativeResponseValue = wasm.RoutingFees_eq(a, b);
19983                 return nativeResponseValue;
19984         }
19985         // uint64_t RoutingFees_clone_ptr(LDKRoutingFees *NONNULL_PTR arg);
19986         export function RoutingFees_clone_ptr(arg: number): number {
19987                 if(!isWasmInitialized) {
19988                         throw new Error("initializeWasm() must be awaited first!");
19989                 }
19990                 const nativeResponseValue = wasm.RoutingFees_clone_ptr(arg);
19991                 return nativeResponseValue;
19992         }
19993         // struct LDKRoutingFees RoutingFees_clone(const struct LDKRoutingFees *NONNULL_PTR orig);
19994         export function RoutingFees_clone(orig: number): number {
19995                 if(!isWasmInitialized) {
19996                         throw new Error("initializeWasm() must be awaited first!");
19997                 }
19998                 const nativeResponseValue = wasm.RoutingFees_clone(orig);
19999                 return nativeResponseValue;
20000         }
20001         // uint64_t RoutingFees_hash(const struct LDKRoutingFees *NONNULL_PTR o);
20002         export function RoutingFees_hash(o: number): number {
20003                 if(!isWasmInitialized) {
20004                         throw new Error("initializeWasm() must be awaited first!");
20005                 }
20006                 const nativeResponseValue = wasm.RoutingFees_hash(o);
20007                 return nativeResponseValue;
20008         }
20009         // struct LDKCVec_u8Z RoutingFees_write(const struct LDKRoutingFees *NONNULL_PTR obj);
20010         export function RoutingFees_write(obj: number): Uint8Array {
20011                 if(!isWasmInitialized) {
20012                         throw new Error("initializeWasm() must be awaited first!");
20013                 }
20014                 const nativeResponseValue = wasm.RoutingFees_write(obj);
20015                 return decodeArray(nativeResponseValue);
20016         }
20017         // struct LDKCResult_RoutingFeesDecodeErrorZ RoutingFees_read(struct LDKu8slice ser);
20018         export function RoutingFees_read(ser: Uint8Array): number {
20019                 if(!isWasmInitialized) {
20020                         throw new Error("initializeWasm() must be awaited first!");
20021                 }
20022                 const nativeResponseValue = wasm.RoutingFees_read(encodeArray(ser));
20023                 return nativeResponseValue;
20024         }
20025         // void NodeAnnouncementInfo_free(struct LDKNodeAnnouncementInfo this_obj);
20026         export function NodeAnnouncementInfo_free(this_obj: number): void {
20027                 if(!isWasmInitialized) {
20028                         throw new Error("initializeWasm() must be awaited first!");
20029                 }
20030                 const nativeResponseValue = wasm.NodeAnnouncementInfo_free(this_obj);
20031                 // debug statements here
20032         }
20033         // struct LDKNodeFeatures NodeAnnouncementInfo_get_features(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
20034         export function NodeAnnouncementInfo_get_features(this_ptr: number): number {
20035                 if(!isWasmInitialized) {
20036                         throw new Error("initializeWasm() must be awaited first!");
20037                 }
20038                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_features(this_ptr);
20039                 return nativeResponseValue;
20040         }
20041         // void NodeAnnouncementInfo_set_features(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
20042         export function NodeAnnouncementInfo_set_features(this_ptr: number, val: number): void {
20043                 if(!isWasmInitialized) {
20044                         throw new Error("initializeWasm() must be awaited first!");
20045                 }
20046                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_features(this_ptr, val);
20047                 // debug statements here
20048         }
20049         // uint32_t NodeAnnouncementInfo_get_last_update(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
20050         export function NodeAnnouncementInfo_get_last_update(this_ptr: number): number {
20051                 if(!isWasmInitialized) {
20052                         throw new Error("initializeWasm() must be awaited first!");
20053                 }
20054                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_last_update(this_ptr);
20055                 return nativeResponseValue;
20056         }
20057         // void NodeAnnouncementInfo_set_last_update(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, uint32_t val);
20058         export function NodeAnnouncementInfo_set_last_update(this_ptr: number, val: number): void {
20059                 if(!isWasmInitialized) {
20060                         throw new Error("initializeWasm() must be awaited first!");
20061                 }
20062                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_last_update(this_ptr, val);
20063                 // debug statements here
20064         }
20065         // const uint8_t (*NodeAnnouncementInfo_get_rgb(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[3];
20066         export function NodeAnnouncementInfo_get_rgb(this_ptr: number): Uint8Array {
20067                 if(!isWasmInitialized) {
20068                         throw new Error("initializeWasm() must be awaited first!");
20069                 }
20070                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_rgb(this_ptr);
20071                 return decodeArray(nativeResponseValue);
20072         }
20073         // void NodeAnnouncementInfo_set_rgb(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
20074         export function NodeAnnouncementInfo_set_rgb(this_ptr: number, val: Uint8Array): void {
20075                 if(!isWasmInitialized) {
20076                         throw new Error("initializeWasm() must be awaited first!");
20077                 }
20078                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_rgb(this_ptr, encodeArray(val));
20079                 // debug statements here
20080         }
20081         // const uint8_t (*NodeAnnouncementInfo_get_alias(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[32];
20082         export function NodeAnnouncementInfo_get_alias(this_ptr: number): Uint8Array {
20083                 if(!isWasmInitialized) {
20084                         throw new Error("initializeWasm() must be awaited first!");
20085                 }
20086                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_alias(this_ptr);
20087                 return decodeArray(nativeResponseValue);
20088         }
20089         // void NodeAnnouncementInfo_set_alias(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
20090         export function NodeAnnouncementInfo_set_alias(this_ptr: number, val: Uint8Array): void {
20091                 if(!isWasmInitialized) {
20092                         throw new Error("initializeWasm() must be awaited first!");
20093                 }
20094                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_alias(this_ptr, encodeArray(val));
20095                 // debug statements here
20096         }
20097         // void NodeAnnouncementInfo_set_addresses(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
20098         export function NodeAnnouncementInfo_set_addresses(this_ptr: number, val: number[]): void {
20099                 if(!isWasmInitialized) {
20100                         throw new Error("initializeWasm() must be awaited first!");
20101                 }
20102                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_addresses(this_ptr, val);
20103                 // debug statements here
20104         }
20105         // struct LDKNodeAnnouncement NodeAnnouncementInfo_get_announcement_message(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
20106         export function NodeAnnouncementInfo_get_announcement_message(this_ptr: number): number {
20107                 if(!isWasmInitialized) {
20108                         throw new Error("initializeWasm() must be awaited first!");
20109                 }
20110                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_announcement_message(this_ptr);
20111                 return nativeResponseValue;
20112         }
20113         // void NodeAnnouncementInfo_set_announcement_message(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncement val);
20114         export function NodeAnnouncementInfo_set_announcement_message(this_ptr: number, val: number): void {
20115                 if(!isWasmInitialized) {
20116                         throw new Error("initializeWasm() must be awaited first!");
20117                 }
20118                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_announcement_message(this_ptr, val);
20119                 // debug statements here
20120         }
20121         // 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);
20122         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 {
20123                 if(!isWasmInitialized) {
20124                         throw new Error("initializeWasm() must be awaited first!");
20125                 }
20126                 const nativeResponseValue = wasm.NodeAnnouncementInfo_new(features_arg, last_update_arg, encodeArray(rgb_arg), encodeArray(alias_arg), addresses_arg, announcement_message_arg);
20127                 return nativeResponseValue;
20128         }
20129         // uint64_t NodeAnnouncementInfo_clone_ptr(LDKNodeAnnouncementInfo *NONNULL_PTR arg);
20130         export function NodeAnnouncementInfo_clone_ptr(arg: number): number {
20131                 if(!isWasmInitialized) {
20132                         throw new Error("initializeWasm() must be awaited first!");
20133                 }
20134                 const nativeResponseValue = wasm.NodeAnnouncementInfo_clone_ptr(arg);
20135                 return nativeResponseValue;
20136         }
20137         // struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_clone(const struct LDKNodeAnnouncementInfo *NONNULL_PTR orig);
20138         export function NodeAnnouncementInfo_clone(orig: number): number {
20139                 if(!isWasmInitialized) {
20140                         throw new Error("initializeWasm() must be awaited first!");
20141                 }
20142                 const nativeResponseValue = wasm.NodeAnnouncementInfo_clone(orig);
20143                 return nativeResponseValue;
20144         }
20145         // struct LDKCVec_u8Z NodeAnnouncementInfo_write(const struct LDKNodeAnnouncementInfo *NONNULL_PTR obj);
20146         export function NodeAnnouncementInfo_write(obj: number): Uint8Array {
20147                 if(!isWasmInitialized) {
20148                         throw new Error("initializeWasm() must be awaited first!");
20149                 }
20150                 const nativeResponseValue = wasm.NodeAnnouncementInfo_write(obj);
20151                 return decodeArray(nativeResponseValue);
20152         }
20153         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ NodeAnnouncementInfo_read(struct LDKu8slice ser);
20154         export function NodeAnnouncementInfo_read(ser: Uint8Array): number {
20155                 if(!isWasmInitialized) {
20156                         throw new Error("initializeWasm() must be awaited first!");
20157                 }
20158                 const nativeResponseValue = wasm.NodeAnnouncementInfo_read(encodeArray(ser));
20159                 return nativeResponseValue;
20160         }
20161         // void NodeInfo_free(struct LDKNodeInfo this_obj);
20162         export function NodeInfo_free(this_obj: number): void {
20163                 if(!isWasmInitialized) {
20164                         throw new Error("initializeWasm() must be awaited first!");
20165                 }
20166                 const nativeResponseValue = wasm.NodeInfo_free(this_obj);
20167                 // debug statements here
20168         }
20169         // void NodeInfo_set_channels(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
20170         export function NodeInfo_set_channels(this_ptr: number, val: number[]): void {
20171                 if(!isWasmInitialized) {
20172                         throw new Error("initializeWasm() must be awaited first!");
20173                 }
20174                 const nativeResponseValue = wasm.NodeInfo_set_channels(this_ptr, val);
20175                 // debug statements here
20176         }
20177         // struct LDKRoutingFees NodeInfo_get_lowest_inbound_channel_fees(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
20178         export function NodeInfo_get_lowest_inbound_channel_fees(this_ptr: number): number {
20179                 if(!isWasmInitialized) {
20180                         throw new Error("initializeWasm() must be awaited first!");
20181                 }
20182                 const nativeResponseValue = wasm.NodeInfo_get_lowest_inbound_channel_fees(this_ptr);
20183                 return nativeResponseValue;
20184         }
20185         // void NodeInfo_set_lowest_inbound_channel_fees(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
20186         export function NodeInfo_set_lowest_inbound_channel_fees(this_ptr: number, val: number): void {
20187                 if(!isWasmInitialized) {
20188                         throw new Error("initializeWasm() must be awaited first!");
20189                 }
20190                 const nativeResponseValue = wasm.NodeInfo_set_lowest_inbound_channel_fees(this_ptr, val);
20191                 // debug statements here
20192         }
20193         // struct LDKNodeAnnouncementInfo NodeInfo_get_announcement_info(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
20194         export function NodeInfo_get_announcement_info(this_ptr: number): number {
20195                 if(!isWasmInitialized) {
20196                         throw new Error("initializeWasm() must be awaited first!");
20197                 }
20198                 const nativeResponseValue = wasm.NodeInfo_get_announcement_info(this_ptr);
20199                 return nativeResponseValue;
20200         }
20201         // void NodeInfo_set_announcement_info(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncementInfo val);
20202         export function NodeInfo_set_announcement_info(this_ptr: number, val: number): void {
20203                 if(!isWasmInitialized) {
20204                         throw new Error("initializeWasm() must be awaited first!");
20205                 }
20206                 const nativeResponseValue = wasm.NodeInfo_set_announcement_info(this_ptr, val);
20207                 // debug statements here
20208         }
20209         // MUST_USE_RES struct LDKNodeInfo NodeInfo_new(struct LDKCVec_u64Z channels_arg, struct LDKRoutingFees lowest_inbound_channel_fees_arg, struct LDKNodeAnnouncementInfo announcement_info_arg);
20210         export function NodeInfo_new(channels_arg: number[], lowest_inbound_channel_fees_arg: number, announcement_info_arg: number): number {
20211                 if(!isWasmInitialized) {
20212                         throw new Error("initializeWasm() must be awaited first!");
20213                 }
20214                 const nativeResponseValue = wasm.NodeInfo_new(channels_arg, lowest_inbound_channel_fees_arg, announcement_info_arg);
20215                 return nativeResponseValue;
20216         }
20217         // uint64_t NodeInfo_clone_ptr(LDKNodeInfo *NONNULL_PTR arg);
20218         export function NodeInfo_clone_ptr(arg: number): number {
20219                 if(!isWasmInitialized) {
20220                         throw new Error("initializeWasm() must be awaited first!");
20221                 }
20222                 const nativeResponseValue = wasm.NodeInfo_clone_ptr(arg);
20223                 return nativeResponseValue;
20224         }
20225         // struct LDKNodeInfo NodeInfo_clone(const struct LDKNodeInfo *NONNULL_PTR orig);
20226         export function NodeInfo_clone(orig: number): number {
20227                 if(!isWasmInitialized) {
20228                         throw new Error("initializeWasm() must be awaited first!");
20229                 }
20230                 const nativeResponseValue = wasm.NodeInfo_clone(orig);
20231                 return nativeResponseValue;
20232         }
20233         // struct LDKCVec_u8Z NodeInfo_write(const struct LDKNodeInfo *NONNULL_PTR obj);
20234         export function NodeInfo_write(obj: number): Uint8Array {
20235                 if(!isWasmInitialized) {
20236                         throw new Error("initializeWasm() must be awaited first!");
20237                 }
20238                 const nativeResponseValue = wasm.NodeInfo_write(obj);
20239                 return decodeArray(nativeResponseValue);
20240         }
20241         // struct LDKCResult_NodeInfoDecodeErrorZ NodeInfo_read(struct LDKu8slice ser);
20242         export function NodeInfo_read(ser: Uint8Array): number {
20243                 if(!isWasmInitialized) {
20244                         throw new Error("initializeWasm() must be awaited first!");
20245                 }
20246                 const nativeResponseValue = wasm.NodeInfo_read(encodeArray(ser));
20247                 return nativeResponseValue;
20248         }
20249         // struct LDKCVec_u8Z NetworkGraph_write(const struct LDKNetworkGraph *NONNULL_PTR obj);
20250         export function NetworkGraph_write(obj: number): Uint8Array {
20251                 if(!isWasmInitialized) {
20252                         throw new Error("initializeWasm() must be awaited first!");
20253                 }
20254                 const nativeResponseValue = wasm.NetworkGraph_write(obj);
20255                 return decodeArray(nativeResponseValue);
20256         }
20257         // struct LDKCResult_NetworkGraphDecodeErrorZ NetworkGraph_read(struct LDKu8slice ser);
20258         export function NetworkGraph_read(ser: Uint8Array): number {
20259                 if(!isWasmInitialized) {
20260                         throw new Error("initializeWasm() must be awaited first!");
20261                 }
20262                 const nativeResponseValue = wasm.NetworkGraph_read(encodeArray(ser));
20263                 return nativeResponseValue;
20264         }
20265         // MUST_USE_RES struct LDKNetworkGraph NetworkGraph_new(struct LDKThirtyTwoBytes genesis_hash);
20266         export function NetworkGraph_new(genesis_hash: Uint8Array): number {
20267                 if(!isWasmInitialized) {
20268                         throw new Error("initializeWasm() must be awaited first!");
20269                 }
20270                 const nativeResponseValue = wasm.NetworkGraph_new(encodeArray(genesis_hash));
20271                 return nativeResponseValue;
20272         }
20273         // MUST_USE_RES struct LDKReadOnlyNetworkGraph NetworkGraph_read_only(const struct LDKNetworkGraph *NONNULL_PTR this_arg);
20274         export function NetworkGraph_read_only(this_arg: number): number {
20275                 if(!isWasmInitialized) {
20276                         throw new Error("initializeWasm() must be awaited first!");
20277                 }
20278                 const nativeResponseValue = wasm.NetworkGraph_read_only(this_arg);
20279                 return nativeResponseValue;
20280         }
20281         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg);
20282         export function NetworkGraph_update_node_from_announcement(this_arg: number, msg: number): number {
20283                 if(!isWasmInitialized) {
20284                         throw new Error("initializeWasm() must be awaited first!");
20285                 }
20286                 const nativeResponseValue = wasm.NetworkGraph_update_node_from_announcement(this_arg, msg);
20287                 return nativeResponseValue;
20288         }
20289         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_unsigned_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR msg);
20290         export function NetworkGraph_update_node_from_unsigned_announcement(this_arg: number, msg: number): number {
20291                 if(!isWasmInitialized) {
20292                         throw new Error("initializeWasm() must be awaited first!");
20293                 }
20294                 const nativeResponseValue = wasm.NetworkGraph_update_node_from_unsigned_announcement(this_arg, msg);
20295                 return nativeResponseValue;
20296         }
20297         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_from_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg, struct LDKCOption_AccessZ chain_access);
20298         export function NetworkGraph_update_channel_from_announcement(this_arg: number, msg: number, chain_access: number): number {
20299                 if(!isWasmInitialized) {
20300                         throw new Error("initializeWasm() must be awaited first!");
20301                 }
20302                 const nativeResponseValue = wasm.NetworkGraph_update_channel_from_announcement(this_arg, msg, chain_access);
20303                 return nativeResponseValue;
20304         }
20305         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_from_unsigned_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg, struct LDKCOption_AccessZ chain_access);
20306         export function NetworkGraph_update_channel_from_unsigned_announcement(this_arg: number, msg: number, chain_access: number): number {
20307                 if(!isWasmInitialized) {
20308                         throw new Error("initializeWasm() must be awaited first!");
20309                 }
20310                 const nativeResponseValue = wasm.NetworkGraph_update_channel_from_unsigned_announcement(this_arg, msg, chain_access);
20311                 return nativeResponseValue;
20312         }
20313         // void NetworkGraph_close_channel_from_update(const struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t short_channel_id, bool is_permanent);
20314         export function NetworkGraph_close_channel_from_update(this_arg: number, short_channel_id: number, is_permanent: boolean): void {
20315                 if(!isWasmInitialized) {
20316                         throw new Error("initializeWasm() must be awaited first!");
20317                 }
20318                 const nativeResponseValue = wasm.NetworkGraph_close_channel_from_update(this_arg, short_channel_id, is_permanent);
20319                 // debug statements here
20320         }
20321         // void NetworkGraph_fail_node(const struct LDKNetworkGraph *NONNULL_PTR this_arg, struct LDKPublicKey _node_id, bool is_permanent);
20322         export function NetworkGraph_fail_node(this_arg: number, _node_id: Uint8Array, is_permanent: boolean): void {
20323                 if(!isWasmInitialized) {
20324                         throw new Error("initializeWasm() must be awaited first!");
20325                 }
20326                 const nativeResponseValue = wasm.NetworkGraph_fail_node(this_arg, encodeArray(_node_id), is_permanent);
20327                 // debug statements here
20328         }
20329         // void NetworkGraph_remove_stale_channels_with_time(const struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t current_time_unix);
20330         export function NetworkGraph_remove_stale_channels_with_time(this_arg: number, current_time_unix: number): void {
20331                 if(!isWasmInitialized) {
20332                         throw new Error("initializeWasm() must be awaited first!");
20333                 }
20334                 const nativeResponseValue = wasm.NetworkGraph_remove_stale_channels_with_time(this_arg, current_time_unix);
20335                 // debug statements here
20336         }
20337         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg);
20338         export function NetworkGraph_update_channel(this_arg: number, msg: number): number {
20339                 if(!isWasmInitialized) {
20340                         throw new Error("initializeWasm() must be awaited first!");
20341                 }
20342                 const nativeResponseValue = wasm.NetworkGraph_update_channel(this_arg, msg);
20343                 return nativeResponseValue;
20344         }
20345         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_unsigned(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelUpdate *NONNULL_PTR msg);
20346         export function NetworkGraph_update_channel_unsigned(this_arg: number, msg: number): number {
20347                 if(!isWasmInitialized) {
20348                         throw new Error("initializeWasm() must be awaited first!");
20349                 }
20350                 const nativeResponseValue = wasm.NetworkGraph_update_channel_unsigned(this_arg, msg);
20351                 return nativeResponseValue;
20352         }
20353         // MUST_USE_RES struct LDKCOption_CVec_NetAddressZZ ReadOnlyNetworkGraph_get_addresses(const struct LDKReadOnlyNetworkGraph *NONNULL_PTR this_arg, struct LDKPublicKey pubkey);
20354         export function ReadOnlyNetworkGraph_get_addresses(this_arg: number, pubkey: Uint8Array): number {
20355                 if(!isWasmInitialized) {
20356                         throw new Error("initializeWasm() must be awaited first!");
20357                 }
20358                 const nativeResponseValue = wasm.ReadOnlyNetworkGraph_get_addresses(this_arg, encodeArray(pubkey));
20359                 return nativeResponseValue;
20360         }
20361         // void RouteHop_free(struct LDKRouteHop this_obj);
20362         export function RouteHop_free(this_obj: number): void {
20363                 if(!isWasmInitialized) {
20364                         throw new Error("initializeWasm() must be awaited first!");
20365                 }
20366                 const nativeResponseValue = wasm.RouteHop_free(this_obj);
20367                 // debug statements here
20368         }
20369         // struct LDKPublicKey RouteHop_get_pubkey(const struct LDKRouteHop *NONNULL_PTR this_ptr);
20370         export function RouteHop_get_pubkey(this_ptr: number): Uint8Array {
20371                 if(!isWasmInitialized) {
20372                         throw new Error("initializeWasm() must be awaited first!");
20373                 }
20374                 const nativeResponseValue = wasm.RouteHop_get_pubkey(this_ptr);
20375                 return decodeArray(nativeResponseValue);
20376         }
20377         // void RouteHop_set_pubkey(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
20378         export function RouteHop_set_pubkey(this_ptr: number, val: Uint8Array): void {
20379                 if(!isWasmInitialized) {
20380                         throw new Error("initializeWasm() must be awaited first!");
20381                 }
20382                 const nativeResponseValue = wasm.RouteHop_set_pubkey(this_ptr, encodeArray(val));
20383                 // debug statements here
20384         }
20385         // struct LDKNodeFeatures RouteHop_get_node_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
20386         export function RouteHop_get_node_features(this_ptr: number): number {
20387                 if(!isWasmInitialized) {
20388                         throw new Error("initializeWasm() must be awaited first!");
20389                 }
20390                 const nativeResponseValue = wasm.RouteHop_get_node_features(this_ptr);
20391                 return nativeResponseValue;
20392         }
20393         // void RouteHop_set_node_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
20394         export function RouteHop_set_node_features(this_ptr: number, val: number): void {
20395                 if(!isWasmInitialized) {
20396                         throw new Error("initializeWasm() must be awaited first!");
20397                 }
20398                 const nativeResponseValue = wasm.RouteHop_set_node_features(this_ptr, val);
20399                 // debug statements here
20400         }
20401         // uint64_t RouteHop_get_short_channel_id(const struct LDKRouteHop *NONNULL_PTR this_ptr);
20402         export function RouteHop_get_short_channel_id(this_ptr: number): number {
20403                 if(!isWasmInitialized) {
20404                         throw new Error("initializeWasm() must be awaited first!");
20405                 }
20406                 const nativeResponseValue = wasm.RouteHop_get_short_channel_id(this_ptr);
20407                 return nativeResponseValue;
20408         }
20409         // void RouteHop_set_short_channel_id(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
20410         export function RouteHop_set_short_channel_id(this_ptr: number, val: number): void {
20411                 if(!isWasmInitialized) {
20412                         throw new Error("initializeWasm() must be awaited first!");
20413                 }
20414                 const nativeResponseValue = wasm.RouteHop_set_short_channel_id(this_ptr, val);
20415                 // debug statements here
20416         }
20417         // struct LDKChannelFeatures RouteHop_get_channel_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
20418         export function RouteHop_get_channel_features(this_ptr: number): number {
20419                 if(!isWasmInitialized) {
20420                         throw new Error("initializeWasm() must be awaited first!");
20421                 }
20422                 const nativeResponseValue = wasm.RouteHop_get_channel_features(this_ptr);
20423                 return nativeResponseValue;
20424         }
20425         // void RouteHop_set_channel_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
20426         export function RouteHop_set_channel_features(this_ptr: number, val: number): void {
20427                 if(!isWasmInitialized) {
20428                         throw new Error("initializeWasm() must be awaited first!");
20429                 }
20430                 const nativeResponseValue = wasm.RouteHop_set_channel_features(this_ptr, val);
20431                 // debug statements here
20432         }
20433         // uint64_t RouteHop_get_fee_msat(const struct LDKRouteHop *NONNULL_PTR this_ptr);
20434         export function RouteHop_get_fee_msat(this_ptr: number): number {
20435                 if(!isWasmInitialized) {
20436                         throw new Error("initializeWasm() must be awaited first!");
20437                 }
20438                 const nativeResponseValue = wasm.RouteHop_get_fee_msat(this_ptr);
20439                 return nativeResponseValue;
20440         }
20441         // void RouteHop_set_fee_msat(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
20442         export function RouteHop_set_fee_msat(this_ptr: number, val: number): void {
20443                 if(!isWasmInitialized) {
20444                         throw new Error("initializeWasm() must be awaited first!");
20445                 }
20446                 const nativeResponseValue = wasm.RouteHop_set_fee_msat(this_ptr, val);
20447                 // debug statements here
20448         }
20449         // uint32_t RouteHop_get_cltv_expiry_delta(const struct LDKRouteHop *NONNULL_PTR this_ptr);
20450         export function RouteHop_get_cltv_expiry_delta(this_ptr: number): number {
20451                 if(!isWasmInitialized) {
20452                         throw new Error("initializeWasm() must be awaited first!");
20453                 }
20454                 const nativeResponseValue = wasm.RouteHop_get_cltv_expiry_delta(this_ptr);
20455                 return nativeResponseValue;
20456         }
20457         // void RouteHop_set_cltv_expiry_delta(struct LDKRouteHop *NONNULL_PTR this_ptr, uint32_t val);
20458         export function RouteHop_set_cltv_expiry_delta(this_ptr: number, val: number): void {
20459                 if(!isWasmInitialized) {
20460                         throw new Error("initializeWasm() must be awaited first!");
20461                 }
20462                 const nativeResponseValue = wasm.RouteHop_set_cltv_expiry_delta(this_ptr, val);
20463                 // debug statements here
20464         }
20465         // 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);
20466         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 {
20467                 if(!isWasmInitialized) {
20468                         throw new Error("initializeWasm() must be awaited first!");
20469                 }
20470                 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);
20471                 return nativeResponseValue;
20472         }
20473         // uint64_t RouteHop_clone_ptr(LDKRouteHop *NONNULL_PTR arg);
20474         export function RouteHop_clone_ptr(arg: number): number {
20475                 if(!isWasmInitialized) {
20476                         throw new Error("initializeWasm() must be awaited first!");
20477                 }
20478                 const nativeResponseValue = wasm.RouteHop_clone_ptr(arg);
20479                 return nativeResponseValue;
20480         }
20481         // struct LDKRouteHop RouteHop_clone(const struct LDKRouteHop *NONNULL_PTR orig);
20482         export function RouteHop_clone(orig: number): number {
20483                 if(!isWasmInitialized) {
20484                         throw new Error("initializeWasm() must be awaited first!");
20485                 }
20486                 const nativeResponseValue = wasm.RouteHop_clone(orig);
20487                 return nativeResponseValue;
20488         }
20489         // uint64_t RouteHop_hash(const struct LDKRouteHop *NONNULL_PTR o);
20490         export function RouteHop_hash(o: number): number {
20491                 if(!isWasmInitialized) {
20492                         throw new Error("initializeWasm() must be awaited first!");
20493                 }
20494                 const nativeResponseValue = wasm.RouteHop_hash(o);
20495                 return nativeResponseValue;
20496         }
20497         // bool RouteHop_eq(const struct LDKRouteHop *NONNULL_PTR a, const struct LDKRouteHop *NONNULL_PTR b);
20498         export function RouteHop_eq(a: number, b: number): boolean {
20499                 if(!isWasmInitialized) {
20500                         throw new Error("initializeWasm() must be awaited first!");
20501                 }
20502                 const nativeResponseValue = wasm.RouteHop_eq(a, b);
20503                 return nativeResponseValue;
20504         }
20505         // struct LDKCVec_u8Z RouteHop_write(const struct LDKRouteHop *NONNULL_PTR obj);
20506         export function RouteHop_write(obj: number): Uint8Array {
20507                 if(!isWasmInitialized) {
20508                         throw new Error("initializeWasm() must be awaited first!");
20509                 }
20510                 const nativeResponseValue = wasm.RouteHop_write(obj);
20511                 return decodeArray(nativeResponseValue);
20512         }
20513         // struct LDKCResult_RouteHopDecodeErrorZ RouteHop_read(struct LDKu8slice ser);
20514         export function RouteHop_read(ser: Uint8Array): number {
20515                 if(!isWasmInitialized) {
20516                         throw new Error("initializeWasm() must be awaited first!");
20517                 }
20518                 const nativeResponseValue = wasm.RouteHop_read(encodeArray(ser));
20519                 return nativeResponseValue;
20520         }
20521         // void Route_free(struct LDKRoute this_obj);
20522         export function Route_free(this_obj: number): void {
20523                 if(!isWasmInitialized) {
20524                         throw new Error("initializeWasm() must be awaited first!");
20525                 }
20526                 const nativeResponseValue = wasm.Route_free(this_obj);
20527                 // debug statements here
20528         }
20529         // struct LDKCVec_CVec_RouteHopZZ Route_get_paths(const struct LDKRoute *NONNULL_PTR this_ptr);
20530         export function Route_get_paths(this_ptr: number): number[][] {
20531                 if(!isWasmInitialized) {
20532                         throw new Error("initializeWasm() must be awaited first!");
20533                 }
20534                 const nativeResponseValue = wasm.Route_get_paths(this_ptr);
20535                 return nativeResponseValue;
20536         }
20537         // void Route_set_paths(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKCVec_CVec_RouteHopZZ val);
20538         export function Route_set_paths(this_ptr: number, val: number[][]): void {
20539                 if(!isWasmInitialized) {
20540                         throw new Error("initializeWasm() must be awaited first!");
20541                 }
20542                 const nativeResponseValue = wasm.Route_set_paths(this_ptr, val);
20543                 // debug statements here
20544         }
20545         // struct LDKPayee Route_get_payee(const struct LDKRoute *NONNULL_PTR this_ptr);
20546         export function Route_get_payee(this_ptr: number): number {
20547                 if(!isWasmInitialized) {
20548                         throw new Error("initializeWasm() must be awaited first!");
20549                 }
20550                 const nativeResponseValue = wasm.Route_get_payee(this_ptr);
20551                 return nativeResponseValue;
20552         }
20553         // void Route_set_payee(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKPayee val);
20554         export function Route_set_payee(this_ptr: number, val: number): void {
20555                 if(!isWasmInitialized) {
20556                         throw new Error("initializeWasm() must be awaited first!");
20557                 }
20558                 const nativeResponseValue = wasm.Route_set_payee(this_ptr, val);
20559                 // debug statements here
20560         }
20561         // MUST_USE_RES struct LDKRoute Route_new(struct LDKCVec_CVec_RouteHopZZ paths_arg, struct LDKPayee payee_arg);
20562         export function Route_new(paths_arg: number[][], payee_arg: number): number {
20563                 if(!isWasmInitialized) {
20564                         throw new Error("initializeWasm() must be awaited first!");
20565                 }
20566                 const nativeResponseValue = wasm.Route_new(paths_arg, payee_arg);
20567                 return nativeResponseValue;
20568         }
20569         // uint64_t Route_clone_ptr(LDKRoute *NONNULL_PTR arg);
20570         export function Route_clone_ptr(arg: number): number {
20571                 if(!isWasmInitialized) {
20572                         throw new Error("initializeWasm() must be awaited first!");
20573                 }
20574                 const nativeResponseValue = wasm.Route_clone_ptr(arg);
20575                 return nativeResponseValue;
20576         }
20577         // struct LDKRoute Route_clone(const struct LDKRoute *NONNULL_PTR orig);
20578         export function Route_clone(orig: number): number {
20579                 if(!isWasmInitialized) {
20580                         throw new Error("initializeWasm() must be awaited first!");
20581                 }
20582                 const nativeResponseValue = wasm.Route_clone(orig);
20583                 return nativeResponseValue;
20584         }
20585         // uint64_t Route_hash(const struct LDKRoute *NONNULL_PTR o);
20586         export function Route_hash(o: number): number {
20587                 if(!isWasmInitialized) {
20588                         throw new Error("initializeWasm() must be awaited first!");
20589                 }
20590                 const nativeResponseValue = wasm.Route_hash(o);
20591                 return nativeResponseValue;
20592         }
20593         // bool Route_eq(const struct LDKRoute *NONNULL_PTR a, const struct LDKRoute *NONNULL_PTR b);
20594         export function Route_eq(a: number, b: number): boolean {
20595                 if(!isWasmInitialized) {
20596                         throw new Error("initializeWasm() must be awaited first!");
20597                 }
20598                 const nativeResponseValue = wasm.Route_eq(a, b);
20599                 return nativeResponseValue;
20600         }
20601         // MUST_USE_RES uint64_t Route_get_total_fees(const struct LDKRoute *NONNULL_PTR this_arg);
20602         export function Route_get_total_fees(this_arg: number): number {
20603                 if(!isWasmInitialized) {
20604                         throw new Error("initializeWasm() must be awaited first!");
20605                 }
20606                 const nativeResponseValue = wasm.Route_get_total_fees(this_arg);
20607                 return nativeResponseValue;
20608         }
20609         // MUST_USE_RES uint64_t Route_get_total_amount(const struct LDKRoute *NONNULL_PTR this_arg);
20610         export function Route_get_total_amount(this_arg: number): number {
20611                 if(!isWasmInitialized) {
20612                         throw new Error("initializeWasm() must be awaited first!");
20613                 }
20614                 const nativeResponseValue = wasm.Route_get_total_amount(this_arg);
20615                 return nativeResponseValue;
20616         }
20617         // struct LDKCVec_u8Z Route_write(const struct LDKRoute *NONNULL_PTR obj);
20618         export function Route_write(obj: number): Uint8Array {
20619                 if(!isWasmInitialized) {
20620                         throw new Error("initializeWasm() must be awaited first!");
20621                 }
20622                 const nativeResponseValue = wasm.Route_write(obj);
20623                 return decodeArray(nativeResponseValue);
20624         }
20625         // struct LDKCResult_RouteDecodeErrorZ Route_read(struct LDKu8slice ser);
20626         export function Route_read(ser: Uint8Array): number {
20627                 if(!isWasmInitialized) {
20628                         throw new Error("initializeWasm() must be awaited first!");
20629                 }
20630                 const nativeResponseValue = wasm.Route_read(encodeArray(ser));
20631                 return nativeResponseValue;
20632         }
20633         // void RouteParameters_free(struct LDKRouteParameters this_obj);
20634         export function RouteParameters_free(this_obj: number): void {
20635                 if(!isWasmInitialized) {
20636                         throw new Error("initializeWasm() must be awaited first!");
20637                 }
20638                 const nativeResponseValue = wasm.RouteParameters_free(this_obj);
20639                 // debug statements here
20640         }
20641         // struct LDKPayee RouteParameters_get_payee(const struct LDKRouteParameters *NONNULL_PTR this_ptr);
20642         export function RouteParameters_get_payee(this_ptr: number): number {
20643                 if(!isWasmInitialized) {
20644                         throw new Error("initializeWasm() must be awaited first!");
20645                 }
20646                 const nativeResponseValue = wasm.RouteParameters_get_payee(this_ptr);
20647                 return nativeResponseValue;
20648         }
20649         // void RouteParameters_set_payee(struct LDKRouteParameters *NONNULL_PTR this_ptr, struct LDKPayee val);
20650         export function RouteParameters_set_payee(this_ptr: number, val: number): void {
20651                 if(!isWasmInitialized) {
20652                         throw new Error("initializeWasm() must be awaited first!");
20653                 }
20654                 const nativeResponseValue = wasm.RouteParameters_set_payee(this_ptr, val);
20655                 // debug statements here
20656         }
20657         // uint64_t RouteParameters_get_final_value_msat(const struct LDKRouteParameters *NONNULL_PTR this_ptr);
20658         export function RouteParameters_get_final_value_msat(this_ptr: number): number {
20659                 if(!isWasmInitialized) {
20660                         throw new Error("initializeWasm() must be awaited first!");
20661                 }
20662                 const nativeResponseValue = wasm.RouteParameters_get_final_value_msat(this_ptr);
20663                 return nativeResponseValue;
20664         }
20665         // void RouteParameters_set_final_value_msat(struct LDKRouteParameters *NONNULL_PTR this_ptr, uint64_t val);
20666         export function RouteParameters_set_final_value_msat(this_ptr: number, val: number): void {
20667                 if(!isWasmInitialized) {
20668                         throw new Error("initializeWasm() must be awaited first!");
20669                 }
20670                 const nativeResponseValue = wasm.RouteParameters_set_final_value_msat(this_ptr, val);
20671                 // debug statements here
20672         }
20673         // uint32_t RouteParameters_get_final_cltv_expiry_delta(const struct LDKRouteParameters *NONNULL_PTR this_ptr);
20674         export function RouteParameters_get_final_cltv_expiry_delta(this_ptr: number): number {
20675                 if(!isWasmInitialized) {
20676                         throw new Error("initializeWasm() must be awaited first!");
20677                 }
20678                 const nativeResponseValue = wasm.RouteParameters_get_final_cltv_expiry_delta(this_ptr);
20679                 return nativeResponseValue;
20680         }
20681         // void RouteParameters_set_final_cltv_expiry_delta(struct LDKRouteParameters *NONNULL_PTR this_ptr, uint32_t val);
20682         export function RouteParameters_set_final_cltv_expiry_delta(this_ptr: number, val: number): void {
20683                 if(!isWasmInitialized) {
20684                         throw new Error("initializeWasm() must be awaited first!");
20685                 }
20686                 const nativeResponseValue = wasm.RouteParameters_set_final_cltv_expiry_delta(this_ptr, val);
20687                 // debug statements here
20688         }
20689         // MUST_USE_RES struct LDKRouteParameters RouteParameters_new(struct LDKPayee payee_arg, uint64_t final_value_msat_arg, uint32_t final_cltv_expiry_delta_arg);
20690         export function RouteParameters_new(payee_arg: number, final_value_msat_arg: number, final_cltv_expiry_delta_arg: number): number {
20691                 if(!isWasmInitialized) {
20692                         throw new Error("initializeWasm() must be awaited first!");
20693                 }
20694                 const nativeResponseValue = wasm.RouteParameters_new(payee_arg, final_value_msat_arg, final_cltv_expiry_delta_arg);
20695                 return nativeResponseValue;
20696         }
20697         // uint64_t RouteParameters_clone_ptr(LDKRouteParameters *NONNULL_PTR arg);
20698         export function RouteParameters_clone_ptr(arg: number): number {
20699                 if(!isWasmInitialized) {
20700                         throw new Error("initializeWasm() must be awaited first!");
20701                 }
20702                 const nativeResponseValue = wasm.RouteParameters_clone_ptr(arg);
20703                 return nativeResponseValue;
20704         }
20705         // struct LDKRouteParameters RouteParameters_clone(const struct LDKRouteParameters *NONNULL_PTR orig);
20706         export function RouteParameters_clone(orig: number): number {
20707                 if(!isWasmInitialized) {
20708                         throw new Error("initializeWasm() must be awaited first!");
20709                 }
20710                 const nativeResponseValue = wasm.RouteParameters_clone(orig);
20711                 return nativeResponseValue;
20712         }
20713         // struct LDKCVec_u8Z RouteParameters_write(const struct LDKRouteParameters *NONNULL_PTR obj);
20714         export function RouteParameters_write(obj: number): Uint8Array {
20715                 if(!isWasmInitialized) {
20716                         throw new Error("initializeWasm() must be awaited first!");
20717                 }
20718                 const nativeResponseValue = wasm.RouteParameters_write(obj);
20719                 return decodeArray(nativeResponseValue);
20720         }
20721         // struct LDKCResult_RouteParametersDecodeErrorZ RouteParameters_read(struct LDKu8slice ser);
20722         export function RouteParameters_read(ser: Uint8Array): number {
20723                 if(!isWasmInitialized) {
20724                         throw new Error("initializeWasm() must be awaited first!");
20725                 }
20726                 const nativeResponseValue = wasm.RouteParameters_read(encodeArray(ser));
20727                 return nativeResponseValue;
20728         }
20729         // void Payee_free(struct LDKPayee this_obj);
20730         export function Payee_free(this_obj: number): void {
20731                 if(!isWasmInitialized) {
20732                         throw new Error("initializeWasm() must be awaited first!");
20733                 }
20734                 const nativeResponseValue = wasm.Payee_free(this_obj);
20735                 // debug statements here
20736         }
20737         // struct LDKPublicKey Payee_get_pubkey(const struct LDKPayee *NONNULL_PTR this_ptr);
20738         export function Payee_get_pubkey(this_ptr: number): Uint8Array {
20739                 if(!isWasmInitialized) {
20740                         throw new Error("initializeWasm() must be awaited first!");
20741                 }
20742                 const nativeResponseValue = wasm.Payee_get_pubkey(this_ptr);
20743                 return decodeArray(nativeResponseValue);
20744         }
20745         // void Payee_set_pubkey(struct LDKPayee *NONNULL_PTR this_ptr, struct LDKPublicKey val);
20746         export function Payee_set_pubkey(this_ptr: number, val: Uint8Array): void {
20747                 if(!isWasmInitialized) {
20748                         throw new Error("initializeWasm() must be awaited first!");
20749                 }
20750                 const nativeResponseValue = wasm.Payee_set_pubkey(this_ptr, encodeArray(val));
20751                 // debug statements here
20752         }
20753         // struct LDKInvoiceFeatures Payee_get_features(const struct LDKPayee *NONNULL_PTR this_ptr);
20754         export function Payee_get_features(this_ptr: number): number {
20755                 if(!isWasmInitialized) {
20756                         throw new Error("initializeWasm() must be awaited first!");
20757                 }
20758                 const nativeResponseValue = wasm.Payee_get_features(this_ptr);
20759                 return nativeResponseValue;
20760         }
20761         // void Payee_set_features(struct LDKPayee *NONNULL_PTR this_ptr, struct LDKInvoiceFeatures val);
20762         export function Payee_set_features(this_ptr: number, val: number): void {
20763                 if(!isWasmInitialized) {
20764                         throw new Error("initializeWasm() must be awaited first!");
20765                 }
20766                 const nativeResponseValue = wasm.Payee_set_features(this_ptr, val);
20767                 // debug statements here
20768         }
20769         // struct LDKCVec_RouteHintZ Payee_get_route_hints(const struct LDKPayee *NONNULL_PTR this_ptr);
20770         export function Payee_get_route_hints(this_ptr: number): number[] {
20771                 if(!isWasmInitialized) {
20772                         throw new Error("initializeWasm() must be awaited first!");
20773                 }
20774                 const nativeResponseValue = wasm.Payee_get_route_hints(this_ptr);
20775                 return nativeResponseValue;
20776         }
20777         // void Payee_set_route_hints(struct LDKPayee *NONNULL_PTR this_ptr, struct LDKCVec_RouteHintZ val);
20778         export function Payee_set_route_hints(this_ptr: number, val: number[]): void {
20779                 if(!isWasmInitialized) {
20780                         throw new Error("initializeWasm() must be awaited first!");
20781                 }
20782                 const nativeResponseValue = wasm.Payee_set_route_hints(this_ptr, val);
20783                 // debug statements here
20784         }
20785         // struct LDKCOption_u64Z Payee_get_expiry_time(const struct LDKPayee *NONNULL_PTR this_ptr);
20786         export function Payee_get_expiry_time(this_ptr: number): number {
20787                 if(!isWasmInitialized) {
20788                         throw new Error("initializeWasm() must be awaited first!");
20789                 }
20790                 const nativeResponseValue = wasm.Payee_get_expiry_time(this_ptr);
20791                 return nativeResponseValue;
20792         }
20793         // void Payee_set_expiry_time(struct LDKPayee *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
20794         export function Payee_set_expiry_time(this_ptr: number, val: number): void {
20795                 if(!isWasmInitialized) {
20796                         throw new Error("initializeWasm() must be awaited first!");
20797                 }
20798                 const nativeResponseValue = wasm.Payee_set_expiry_time(this_ptr, val);
20799                 // debug statements here
20800         }
20801         // MUST_USE_RES struct LDKPayee Payee_new(struct LDKPublicKey pubkey_arg, struct LDKInvoiceFeatures features_arg, struct LDKCVec_RouteHintZ route_hints_arg, struct LDKCOption_u64Z expiry_time_arg);
20802         export function Payee_new(pubkey_arg: Uint8Array, features_arg: number, route_hints_arg: number[], expiry_time_arg: number): number {
20803                 if(!isWasmInitialized) {
20804                         throw new Error("initializeWasm() must be awaited first!");
20805                 }
20806                 const nativeResponseValue = wasm.Payee_new(encodeArray(pubkey_arg), features_arg, route_hints_arg, expiry_time_arg);
20807                 return nativeResponseValue;
20808         }
20809         // uint64_t Payee_clone_ptr(LDKPayee *NONNULL_PTR arg);
20810         export function Payee_clone_ptr(arg: number): number {
20811                 if(!isWasmInitialized) {
20812                         throw new Error("initializeWasm() must be awaited first!");
20813                 }
20814                 const nativeResponseValue = wasm.Payee_clone_ptr(arg);
20815                 return nativeResponseValue;
20816         }
20817         // struct LDKPayee Payee_clone(const struct LDKPayee *NONNULL_PTR orig);
20818         export function Payee_clone(orig: number): number {
20819                 if(!isWasmInitialized) {
20820                         throw new Error("initializeWasm() must be awaited first!");
20821                 }
20822                 const nativeResponseValue = wasm.Payee_clone(orig);
20823                 return nativeResponseValue;
20824         }
20825         // uint64_t Payee_hash(const struct LDKPayee *NONNULL_PTR o);
20826         export function Payee_hash(o: number): number {
20827                 if(!isWasmInitialized) {
20828                         throw new Error("initializeWasm() must be awaited first!");
20829                 }
20830                 const nativeResponseValue = wasm.Payee_hash(o);
20831                 return nativeResponseValue;
20832         }
20833         // bool Payee_eq(const struct LDKPayee *NONNULL_PTR a, const struct LDKPayee *NONNULL_PTR b);
20834         export function Payee_eq(a: number, b: number): boolean {
20835                 if(!isWasmInitialized) {
20836                         throw new Error("initializeWasm() must be awaited first!");
20837                 }
20838                 const nativeResponseValue = wasm.Payee_eq(a, b);
20839                 return nativeResponseValue;
20840         }
20841         // struct LDKCVec_u8Z Payee_write(const struct LDKPayee *NONNULL_PTR obj);
20842         export function Payee_write(obj: number): Uint8Array {
20843                 if(!isWasmInitialized) {
20844                         throw new Error("initializeWasm() must be awaited first!");
20845                 }
20846                 const nativeResponseValue = wasm.Payee_write(obj);
20847                 return decodeArray(nativeResponseValue);
20848         }
20849         // struct LDKCResult_PayeeDecodeErrorZ Payee_read(struct LDKu8slice ser);
20850         export function Payee_read(ser: Uint8Array): number {
20851                 if(!isWasmInitialized) {
20852                         throw new Error("initializeWasm() must be awaited first!");
20853                 }
20854                 const nativeResponseValue = wasm.Payee_read(encodeArray(ser));
20855                 return nativeResponseValue;
20856         }
20857         // MUST_USE_RES struct LDKPayee Payee_from_node_id(struct LDKPublicKey pubkey);
20858         export function Payee_from_node_id(pubkey: Uint8Array): number {
20859                 if(!isWasmInitialized) {
20860                         throw new Error("initializeWasm() must be awaited first!");
20861                 }
20862                 const nativeResponseValue = wasm.Payee_from_node_id(encodeArray(pubkey));
20863                 return nativeResponseValue;
20864         }
20865         // MUST_USE_RES struct LDKPayee Payee_for_keysend(struct LDKPublicKey pubkey);
20866         export function Payee_for_keysend(pubkey: Uint8Array): number {
20867                 if(!isWasmInitialized) {
20868                         throw new Error("initializeWasm() must be awaited first!");
20869                 }
20870                 const nativeResponseValue = wasm.Payee_for_keysend(encodeArray(pubkey));
20871                 return nativeResponseValue;
20872         }
20873         // void RouteHint_free(struct LDKRouteHint this_obj);
20874         export function RouteHint_free(this_obj: number): void {
20875                 if(!isWasmInitialized) {
20876                         throw new Error("initializeWasm() must be awaited first!");
20877                 }
20878                 const nativeResponseValue = wasm.RouteHint_free(this_obj);
20879                 // debug statements here
20880         }
20881         // struct LDKCVec_RouteHintHopZ RouteHint_get_a(const struct LDKRouteHint *NONNULL_PTR this_ptr);
20882         export function RouteHint_get_a(this_ptr: number): number[] {
20883                 if(!isWasmInitialized) {
20884                         throw new Error("initializeWasm() must be awaited first!");
20885                 }
20886                 const nativeResponseValue = wasm.RouteHint_get_a(this_ptr);
20887                 return nativeResponseValue;
20888         }
20889         // void RouteHint_set_a(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKCVec_RouteHintHopZ val);
20890         export function RouteHint_set_a(this_ptr: number, val: number[]): void {
20891                 if(!isWasmInitialized) {
20892                         throw new Error("initializeWasm() must be awaited first!");
20893                 }
20894                 const nativeResponseValue = wasm.RouteHint_set_a(this_ptr, val);
20895                 // debug statements here
20896         }
20897         // MUST_USE_RES struct LDKRouteHint RouteHint_new(struct LDKCVec_RouteHintHopZ a_arg);
20898         export function RouteHint_new(a_arg: number[]): number {
20899                 if(!isWasmInitialized) {
20900                         throw new Error("initializeWasm() must be awaited first!");
20901                 }
20902                 const nativeResponseValue = wasm.RouteHint_new(a_arg);
20903                 return nativeResponseValue;
20904         }
20905         // uint64_t RouteHint_clone_ptr(LDKRouteHint *NONNULL_PTR arg);
20906         export function RouteHint_clone_ptr(arg: number): number {
20907                 if(!isWasmInitialized) {
20908                         throw new Error("initializeWasm() must be awaited first!");
20909                 }
20910                 const nativeResponseValue = wasm.RouteHint_clone_ptr(arg);
20911                 return nativeResponseValue;
20912         }
20913         // struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
20914         export function RouteHint_clone(orig: number): number {
20915                 if(!isWasmInitialized) {
20916                         throw new Error("initializeWasm() must be awaited first!");
20917                 }
20918                 const nativeResponseValue = wasm.RouteHint_clone(orig);
20919                 return nativeResponseValue;
20920         }
20921         // uint64_t RouteHint_hash(const struct LDKRouteHint *NONNULL_PTR o);
20922         export function RouteHint_hash(o: number): number {
20923                 if(!isWasmInitialized) {
20924                         throw new Error("initializeWasm() must be awaited first!");
20925                 }
20926                 const nativeResponseValue = wasm.RouteHint_hash(o);
20927                 return nativeResponseValue;
20928         }
20929         // bool RouteHint_eq(const struct LDKRouteHint *NONNULL_PTR a, const struct LDKRouteHint *NONNULL_PTR b);
20930         export function RouteHint_eq(a: number, b: number): boolean {
20931                 if(!isWasmInitialized) {
20932                         throw new Error("initializeWasm() must be awaited first!");
20933                 }
20934                 const nativeResponseValue = wasm.RouteHint_eq(a, b);
20935                 return nativeResponseValue;
20936         }
20937         // struct LDKCVec_u8Z RouteHint_write(const struct LDKRouteHint *NONNULL_PTR obj);
20938         export function RouteHint_write(obj: number): Uint8Array {
20939                 if(!isWasmInitialized) {
20940                         throw new Error("initializeWasm() must be awaited first!");
20941                 }
20942                 const nativeResponseValue = wasm.RouteHint_write(obj);
20943                 return decodeArray(nativeResponseValue);
20944         }
20945         // struct LDKCResult_RouteHintDecodeErrorZ RouteHint_read(struct LDKu8slice ser);
20946         export function RouteHint_read(ser: Uint8Array): number {
20947                 if(!isWasmInitialized) {
20948                         throw new Error("initializeWasm() must be awaited first!");
20949                 }
20950                 const nativeResponseValue = wasm.RouteHint_read(encodeArray(ser));
20951                 return nativeResponseValue;
20952         }
20953         // void RouteHintHop_free(struct LDKRouteHintHop this_obj);
20954         export function RouteHintHop_free(this_obj: number): void {
20955                 if(!isWasmInitialized) {
20956                         throw new Error("initializeWasm() must be awaited first!");
20957                 }
20958                 const nativeResponseValue = wasm.RouteHintHop_free(this_obj);
20959                 // debug statements here
20960         }
20961         // struct LDKPublicKey RouteHintHop_get_src_node_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
20962         export function RouteHintHop_get_src_node_id(this_ptr: number): Uint8Array {
20963                 if(!isWasmInitialized) {
20964                         throw new Error("initializeWasm() must be awaited first!");
20965                 }
20966                 const nativeResponseValue = wasm.RouteHintHop_get_src_node_id(this_ptr);
20967                 return decodeArray(nativeResponseValue);
20968         }
20969         // void RouteHintHop_set_src_node_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
20970         export function RouteHintHop_set_src_node_id(this_ptr: number, val: Uint8Array): void {
20971                 if(!isWasmInitialized) {
20972                         throw new Error("initializeWasm() must be awaited first!");
20973                 }
20974                 const nativeResponseValue = wasm.RouteHintHop_set_src_node_id(this_ptr, encodeArray(val));
20975                 // debug statements here
20976         }
20977         // uint64_t RouteHintHop_get_short_channel_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
20978         export function RouteHintHop_get_short_channel_id(this_ptr: number): number {
20979                 if(!isWasmInitialized) {
20980                         throw new Error("initializeWasm() must be awaited first!");
20981                 }
20982                 const nativeResponseValue = wasm.RouteHintHop_get_short_channel_id(this_ptr);
20983                 return nativeResponseValue;
20984         }
20985         // void RouteHintHop_set_short_channel_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint64_t val);
20986         export function RouteHintHop_set_short_channel_id(this_ptr: number, val: number): void {
20987                 if(!isWasmInitialized) {
20988                         throw new Error("initializeWasm() must be awaited first!");
20989                 }
20990                 const nativeResponseValue = wasm.RouteHintHop_set_short_channel_id(this_ptr, val);
20991                 // debug statements here
20992         }
20993         // struct LDKRoutingFees RouteHintHop_get_fees(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
20994         export function RouteHintHop_get_fees(this_ptr: number): number {
20995                 if(!isWasmInitialized) {
20996                         throw new Error("initializeWasm() must be awaited first!");
20997                 }
20998                 const nativeResponseValue = wasm.RouteHintHop_get_fees(this_ptr);
20999                 return nativeResponseValue;
21000         }
21001         // void RouteHintHop_set_fees(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
21002         export function RouteHintHop_set_fees(this_ptr: number, val: number): void {
21003                 if(!isWasmInitialized) {
21004                         throw new Error("initializeWasm() must be awaited first!");
21005                 }
21006                 const nativeResponseValue = wasm.RouteHintHop_set_fees(this_ptr, val);
21007                 // debug statements here
21008         }
21009         // uint16_t RouteHintHop_get_cltv_expiry_delta(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
21010         export function RouteHintHop_get_cltv_expiry_delta(this_ptr: number): number {
21011                 if(!isWasmInitialized) {
21012                         throw new Error("initializeWasm() must be awaited first!");
21013                 }
21014                 const nativeResponseValue = wasm.RouteHintHop_get_cltv_expiry_delta(this_ptr);
21015                 return nativeResponseValue;
21016         }
21017         // void RouteHintHop_set_cltv_expiry_delta(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint16_t val);
21018         export function RouteHintHop_set_cltv_expiry_delta(this_ptr: number, val: number): void {
21019                 if(!isWasmInitialized) {
21020                         throw new Error("initializeWasm() must be awaited first!");
21021                 }
21022                 const nativeResponseValue = wasm.RouteHintHop_set_cltv_expiry_delta(this_ptr, val);
21023                 // debug statements here
21024         }
21025         // struct LDKCOption_u64Z RouteHintHop_get_htlc_minimum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
21026         export function RouteHintHop_get_htlc_minimum_msat(this_ptr: number): number {
21027                 if(!isWasmInitialized) {
21028                         throw new Error("initializeWasm() must be awaited first!");
21029                 }
21030                 const nativeResponseValue = wasm.RouteHintHop_get_htlc_minimum_msat(this_ptr);
21031                 return nativeResponseValue;
21032         }
21033         // void RouteHintHop_set_htlc_minimum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
21034         export function RouteHintHop_set_htlc_minimum_msat(this_ptr: number, val: number): void {
21035                 if(!isWasmInitialized) {
21036                         throw new Error("initializeWasm() must be awaited first!");
21037                 }
21038                 const nativeResponseValue = wasm.RouteHintHop_set_htlc_minimum_msat(this_ptr, val);
21039                 // debug statements here
21040         }
21041         // struct LDKCOption_u64Z RouteHintHop_get_htlc_maximum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
21042         export function RouteHintHop_get_htlc_maximum_msat(this_ptr: number): number {
21043                 if(!isWasmInitialized) {
21044                         throw new Error("initializeWasm() must be awaited first!");
21045                 }
21046                 const nativeResponseValue = wasm.RouteHintHop_get_htlc_maximum_msat(this_ptr);
21047                 return nativeResponseValue;
21048         }
21049         // void RouteHintHop_set_htlc_maximum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
21050         export function RouteHintHop_set_htlc_maximum_msat(this_ptr: number, val: number): void {
21051                 if(!isWasmInitialized) {
21052                         throw new Error("initializeWasm() must be awaited first!");
21053                 }
21054                 const nativeResponseValue = wasm.RouteHintHop_set_htlc_maximum_msat(this_ptr, val);
21055                 // debug statements here
21056         }
21057         // MUST_USE_RES struct LDKRouteHintHop RouteHintHop_new(struct LDKPublicKey src_node_id_arg, uint64_t short_channel_id_arg, struct LDKRoutingFees fees_arg, uint16_t cltv_expiry_delta_arg, struct LDKCOption_u64Z htlc_minimum_msat_arg, struct LDKCOption_u64Z htlc_maximum_msat_arg);
21058         export function RouteHintHop_new(src_node_id_arg: Uint8Array, short_channel_id_arg: number, fees_arg: number, cltv_expiry_delta_arg: number, htlc_minimum_msat_arg: number, htlc_maximum_msat_arg: number): number {
21059                 if(!isWasmInitialized) {
21060                         throw new Error("initializeWasm() must be awaited first!");
21061                 }
21062                 const nativeResponseValue = wasm.RouteHintHop_new(encodeArray(src_node_id_arg), short_channel_id_arg, fees_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg);
21063                 return nativeResponseValue;
21064         }
21065         // uint64_t RouteHintHop_clone_ptr(LDKRouteHintHop *NONNULL_PTR arg);
21066         export function RouteHintHop_clone_ptr(arg: number): number {
21067                 if(!isWasmInitialized) {
21068                         throw new Error("initializeWasm() must be awaited first!");
21069                 }
21070                 const nativeResponseValue = wasm.RouteHintHop_clone_ptr(arg);
21071                 return nativeResponseValue;
21072         }
21073         // struct LDKRouteHintHop RouteHintHop_clone(const struct LDKRouteHintHop *NONNULL_PTR orig);
21074         export function RouteHintHop_clone(orig: number): number {
21075                 if(!isWasmInitialized) {
21076                         throw new Error("initializeWasm() must be awaited first!");
21077                 }
21078                 const nativeResponseValue = wasm.RouteHintHop_clone(orig);
21079                 return nativeResponseValue;
21080         }
21081         // uint64_t RouteHintHop_hash(const struct LDKRouteHintHop *NONNULL_PTR o);
21082         export function RouteHintHop_hash(o: number): number {
21083                 if(!isWasmInitialized) {
21084                         throw new Error("initializeWasm() must be awaited first!");
21085                 }
21086                 const nativeResponseValue = wasm.RouteHintHop_hash(o);
21087                 return nativeResponseValue;
21088         }
21089         // bool RouteHintHop_eq(const struct LDKRouteHintHop *NONNULL_PTR a, const struct LDKRouteHintHop *NONNULL_PTR b);
21090         export function RouteHintHop_eq(a: number, b: number): boolean {
21091                 if(!isWasmInitialized) {
21092                         throw new Error("initializeWasm() must be awaited first!");
21093                 }
21094                 const nativeResponseValue = wasm.RouteHintHop_eq(a, b);
21095                 return nativeResponseValue;
21096         }
21097         // struct LDKCVec_u8Z RouteHintHop_write(const struct LDKRouteHintHop *NONNULL_PTR obj);
21098         export function RouteHintHop_write(obj: number): Uint8Array {
21099                 if(!isWasmInitialized) {
21100                         throw new Error("initializeWasm() must be awaited first!");
21101                 }
21102                 const nativeResponseValue = wasm.RouteHintHop_write(obj);
21103                 return decodeArray(nativeResponseValue);
21104         }
21105         // struct LDKCResult_RouteHintHopDecodeErrorZ RouteHintHop_read(struct LDKu8slice ser);
21106         export function RouteHintHop_read(ser: Uint8Array): number {
21107                 if(!isWasmInitialized) {
21108                         throw new Error("initializeWasm() must be awaited first!");
21109                 }
21110                 const nativeResponseValue = wasm.RouteHintHop_read(encodeArray(ser));
21111                 return nativeResponseValue;
21112         }
21113         // struct LDKCResult_RouteLightningErrorZ find_route(struct LDKPublicKey our_node_pubkey, const struct LDKRouteParameters *NONNULL_PTR params, const struct LDKNetworkGraph *NONNULL_PTR network, struct LDKCVec_ChannelDetailsZ *first_hops, struct LDKLogger logger, const struct LDKScore *NONNULL_PTR scorer);
21114         export function find_route(our_node_pubkey: Uint8Array, params: number, network: number, first_hops: number[], logger: number, scorer: number): number {
21115                 if(!isWasmInitialized) {
21116                         throw new Error("initializeWasm() must be awaited first!");
21117                 }
21118                 const nativeResponseValue = wasm.find_route(encodeArray(our_node_pubkey), params, network, first_hops, logger, scorer);
21119                 return nativeResponseValue;
21120         }
21121         // void Score_free(struct LDKScore this_ptr);
21122         export function Score_free(this_ptr: number): void {
21123                 if(!isWasmInitialized) {
21124                         throw new Error("initializeWasm() must be awaited first!");
21125                 }
21126                 const nativeResponseValue = wasm.Score_free(this_ptr);
21127                 // debug statements here
21128         }
21129         // void LockableScore_free(struct LDKLockableScore this_ptr);
21130         export function LockableScore_free(this_ptr: number): void {
21131                 if(!isWasmInitialized) {
21132                         throw new Error("initializeWasm() must be awaited first!");
21133                 }
21134                 const nativeResponseValue = wasm.LockableScore_free(this_ptr);
21135                 // debug statements here
21136         }
21137         // void MultiThreadedLockableScore_free(struct LDKMultiThreadedLockableScore this_obj);
21138         export function MultiThreadedLockableScore_free(this_obj: number): void {
21139                 if(!isWasmInitialized) {
21140                         throw new Error("initializeWasm() must be awaited first!");
21141                 }
21142                 const nativeResponseValue = wasm.MultiThreadedLockableScore_free(this_obj);
21143                 // debug statements here
21144         }
21145         // MUST_USE_RES struct LDKMultiThreadedLockableScore MultiThreadedLockableScore_new(struct LDKScore score);
21146         export function MultiThreadedLockableScore_new(score: number): number {
21147                 if(!isWasmInitialized) {
21148                         throw new Error("initializeWasm() must be awaited first!");
21149                 }
21150                 const nativeResponseValue = wasm.MultiThreadedLockableScore_new(score);
21151                 return nativeResponseValue;
21152         }
21153         // void Scorer_free(struct LDKScorer this_obj);
21154         export function Scorer_free(this_obj: number): void {
21155                 if(!isWasmInitialized) {
21156                         throw new Error("initializeWasm() must be awaited first!");
21157                 }
21158                 const nativeResponseValue = wasm.Scorer_free(this_obj);
21159                 // debug statements here
21160         }
21161         // void ScoringParameters_free(struct LDKScoringParameters this_obj);
21162         export function ScoringParameters_free(this_obj: number): void {
21163                 if(!isWasmInitialized) {
21164                         throw new Error("initializeWasm() must be awaited first!");
21165                 }
21166                 const nativeResponseValue = wasm.ScoringParameters_free(this_obj);
21167                 // debug statements here
21168         }
21169         // uint64_t ScoringParameters_get_base_penalty_msat(const struct LDKScoringParameters *NONNULL_PTR this_ptr);
21170         export function ScoringParameters_get_base_penalty_msat(this_ptr: number): number {
21171                 if(!isWasmInitialized) {
21172                         throw new Error("initializeWasm() must be awaited first!");
21173                 }
21174                 const nativeResponseValue = wasm.ScoringParameters_get_base_penalty_msat(this_ptr);
21175                 return nativeResponseValue;
21176         }
21177         // void ScoringParameters_set_base_penalty_msat(struct LDKScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
21178         export function ScoringParameters_set_base_penalty_msat(this_ptr: number, val: number): void {
21179                 if(!isWasmInitialized) {
21180                         throw new Error("initializeWasm() must be awaited first!");
21181                 }
21182                 const nativeResponseValue = wasm.ScoringParameters_set_base_penalty_msat(this_ptr, val);
21183                 // debug statements here
21184         }
21185         // uint64_t ScoringParameters_get_failure_penalty_msat(const struct LDKScoringParameters *NONNULL_PTR this_ptr);
21186         export function ScoringParameters_get_failure_penalty_msat(this_ptr: number): number {
21187                 if(!isWasmInitialized) {
21188                         throw new Error("initializeWasm() must be awaited first!");
21189                 }
21190                 const nativeResponseValue = wasm.ScoringParameters_get_failure_penalty_msat(this_ptr);
21191                 return nativeResponseValue;
21192         }
21193         // void ScoringParameters_set_failure_penalty_msat(struct LDKScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
21194         export function ScoringParameters_set_failure_penalty_msat(this_ptr: number, val: number): void {
21195                 if(!isWasmInitialized) {
21196                         throw new Error("initializeWasm() must be awaited first!");
21197                 }
21198                 const nativeResponseValue = wasm.ScoringParameters_set_failure_penalty_msat(this_ptr, val);
21199                 // debug statements here
21200         }
21201         // uint16_t ScoringParameters_get_overuse_penalty_start_1024th(const struct LDKScoringParameters *NONNULL_PTR this_ptr);
21202         export function ScoringParameters_get_overuse_penalty_start_1024th(this_ptr: number): number {
21203                 if(!isWasmInitialized) {
21204                         throw new Error("initializeWasm() must be awaited first!");
21205                 }
21206                 const nativeResponseValue = wasm.ScoringParameters_get_overuse_penalty_start_1024th(this_ptr);
21207                 return nativeResponseValue;
21208         }
21209         // void ScoringParameters_set_overuse_penalty_start_1024th(struct LDKScoringParameters *NONNULL_PTR this_ptr, uint16_t val);
21210         export function ScoringParameters_set_overuse_penalty_start_1024th(this_ptr: number, val: number): void {
21211                 if(!isWasmInitialized) {
21212                         throw new Error("initializeWasm() must be awaited first!");
21213                 }
21214                 const nativeResponseValue = wasm.ScoringParameters_set_overuse_penalty_start_1024th(this_ptr, val);
21215                 // debug statements here
21216         }
21217         // uint64_t ScoringParameters_get_overuse_penalty_msat_per_1024th(const struct LDKScoringParameters *NONNULL_PTR this_ptr);
21218         export function ScoringParameters_get_overuse_penalty_msat_per_1024th(this_ptr: number): number {
21219                 if(!isWasmInitialized) {
21220                         throw new Error("initializeWasm() must be awaited first!");
21221                 }
21222                 const nativeResponseValue = wasm.ScoringParameters_get_overuse_penalty_msat_per_1024th(this_ptr);
21223                 return nativeResponseValue;
21224         }
21225         // void ScoringParameters_set_overuse_penalty_msat_per_1024th(struct LDKScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
21226         export function ScoringParameters_set_overuse_penalty_msat_per_1024th(this_ptr: number, val: number): void {
21227                 if(!isWasmInitialized) {
21228                         throw new Error("initializeWasm() must be awaited first!");
21229                 }
21230                 const nativeResponseValue = wasm.ScoringParameters_set_overuse_penalty_msat_per_1024th(this_ptr, val);
21231                 // debug statements here
21232         }
21233         // uint64_t ScoringParameters_get_failure_penalty_half_life(const struct LDKScoringParameters *NONNULL_PTR this_ptr);
21234         export function ScoringParameters_get_failure_penalty_half_life(this_ptr: number): number {
21235                 if(!isWasmInitialized) {
21236                         throw new Error("initializeWasm() must be awaited first!");
21237                 }
21238                 const nativeResponseValue = wasm.ScoringParameters_get_failure_penalty_half_life(this_ptr);
21239                 return nativeResponseValue;
21240         }
21241         // void ScoringParameters_set_failure_penalty_half_life(struct LDKScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
21242         export function ScoringParameters_set_failure_penalty_half_life(this_ptr: number, val: number): void {
21243                 if(!isWasmInitialized) {
21244                         throw new Error("initializeWasm() must be awaited first!");
21245                 }
21246                 const nativeResponseValue = wasm.ScoringParameters_set_failure_penalty_half_life(this_ptr, val);
21247                 // debug statements here
21248         }
21249         // MUST_USE_RES struct LDKScoringParameters ScoringParameters_new(uint64_t base_penalty_msat_arg, uint64_t failure_penalty_msat_arg, uint16_t overuse_penalty_start_1024th_arg, uint64_t overuse_penalty_msat_per_1024th_arg, uint64_t failure_penalty_half_life_arg);
21250         export function ScoringParameters_new(base_penalty_msat_arg: number, failure_penalty_msat_arg: number, overuse_penalty_start_1024th_arg: number, overuse_penalty_msat_per_1024th_arg: number, failure_penalty_half_life_arg: number): number {
21251                 if(!isWasmInitialized) {
21252                         throw new Error("initializeWasm() must be awaited first!");
21253                 }
21254                 const nativeResponseValue = wasm.ScoringParameters_new(base_penalty_msat_arg, failure_penalty_msat_arg, overuse_penalty_start_1024th_arg, overuse_penalty_msat_per_1024th_arg, failure_penalty_half_life_arg);
21255                 return nativeResponseValue;
21256         }
21257         // struct LDKCVec_u8Z ScoringParameters_write(const struct LDKScoringParameters *NONNULL_PTR obj);
21258         export function ScoringParameters_write(obj: number): Uint8Array {
21259                 if(!isWasmInitialized) {
21260                         throw new Error("initializeWasm() must be awaited first!");
21261                 }
21262                 const nativeResponseValue = wasm.ScoringParameters_write(obj);
21263                 return decodeArray(nativeResponseValue);
21264         }
21265         // struct LDKCResult_ScoringParametersDecodeErrorZ ScoringParameters_read(struct LDKu8slice ser);
21266         export function ScoringParameters_read(ser: Uint8Array): number {
21267                 if(!isWasmInitialized) {
21268                         throw new Error("initializeWasm() must be awaited first!");
21269                 }
21270                 const nativeResponseValue = wasm.ScoringParameters_read(encodeArray(ser));
21271                 return nativeResponseValue;
21272         }
21273         // MUST_USE_RES struct LDKScorer Scorer_new(struct LDKScoringParameters params);
21274         export function Scorer_new(params: number): number {
21275                 if(!isWasmInitialized) {
21276                         throw new Error("initializeWasm() must be awaited first!");
21277                 }
21278                 const nativeResponseValue = wasm.Scorer_new(params);
21279                 return nativeResponseValue;
21280         }
21281         // MUST_USE_RES struct LDKScorer Scorer_default(void);
21282         export function Scorer_default(): number {
21283                 if(!isWasmInitialized) {
21284                         throw new Error("initializeWasm() must be awaited first!");
21285                 }
21286                 const nativeResponseValue = wasm.Scorer_default();
21287                 return nativeResponseValue;
21288         }
21289         // MUST_USE_RES struct LDKScoringParameters ScoringParameters_default(void);
21290         export function ScoringParameters_default(): number {
21291                 if(!isWasmInitialized) {
21292                         throw new Error("initializeWasm() must be awaited first!");
21293                 }
21294                 const nativeResponseValue = wasm.ScoringParameters_default();
21295                 return nativeResponseValue;
21296         }
21297         // struct LDKScore Scorer_as_Score(const struct LDKScorer *NONNULL_PTR this_arg);
21298         export function Scorer_as_Score(this_arg: number): number {
21299                 if(!isWasmInitialized) {
21300                         throw new Error("initializeWasm() must be awaited first!");
21301                 }
21302                 const nativeResponseValue = wasm.Scorer_as_Score(this_arg);
21303                 return nativeResponseValue;
21304         }
21305         // struct LDKCVec_u8Z Scorer_write(const struct LDKScorer *NONNULL_PTR obj);
21306         export function Scorer_write(obj: number): Uint8Array {
21307                 if(!isWasmInitialized) {
21308                         throw new Error("initializeWasm() must be awaited first!");
21309                 }
21310                 const nativeResponseValue = wasm.Scorer_write(obj);
21311                 return decodeArray(nativeResponseValue);
21312         }
21313         // struct LDKCResult_ScorerDecodeErrorZ Scorer_read(struct LDKu8slice ser);
21314         export function Scorer_read(ser: Uint8Array): number {
21315                 if(!isWasmInitialized) {
21316                         throw new Error("initializeWasm() must be awaited first!");
21317                 }
21318                 const nativeResponseValue = wasm.Scorer_read(encodeArray(ser));
21319                 return nativeResponseValue;
21320         }
21321         // void FilesystemPersister_free(struct LDKFilesystemPersister this_obj);
21322         export function FilesystemPersister_free(this_obj: number): void {
21323                 if(!isWasmInitialized) {
21324                         throw new Error("initializeWasm() must be awaited first!");
21325                 }
21326                 const nativeResponseValue = wasm.FilesystemPersister_free(this_obj);
21327                 // debug statements here
21328         }
21329         // MUST_USE_RES struct LDKFilesystemPersister FilesystemPersister_new(struct LDKStr path_to_channel_data);
21330         export function FilesystemPersister_new(path_to_channel_data: String): number {
21331                 if(!isWasmInitialized) {
21332                         throw new Error("initializeWasm() must be awaited first!");
21333                 }
21334                 const nativeResponseValue = wasm.FilesystemPersister_new(path_to_channel_data);
21335                 return nativeResponseValue;
21336         }
21337         // MUST_USE_RES struct LDKStr FilesystemPersister_get_data_dir(const struct LDKFilesystemPersister *NONNULL_PTR this_arg);
21338         export function FilesystemPersister_get_data_dir(this_arg: number): String {
21339                 if(!isWasmInitialized) {
21340                         throw new Error("initializeWasm() must be awaited first!");
21341                 }
21342                 const nativeResponseValue = wasm.FilesystemPersister_get_data_dir(this_arg);
21343                 return nativeResponseValue;
21344         }
21345         // MUST_USE_RES struct LDKCResult_NoneErrorZ FilesystemPersister_persist_manager(struct LDKStr data_dir, const struct LDKChannelManager *NONNULL_PTR manager);
21346         export function FilesystemPersister_persist_manager(data_dir: String, manager: number): number {
21347                 if(!isWasmInitialized) {
21348                         throw new Error("initializeWasm() must be awaited first!");
21349                 }
21350                 const nativeResponseValue = wasm.FilesystemPersister_persist_manager(data_dir, manager);
21351                 return nativeResponseValue;
21352         }
21353         // MUST_USE_RES struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ FilesystemPersister_read_channelmonitors(const struct LDKFilesystemPersister *NONNULL_PTR this_arg, struct LDKKeysInterface keys_manager);
21354         export function FilesystemPersister_read_channelmonitors(this_arg: number, keys_manager: number): number {
21355                 if(!isWasmInitialized) {
21356                         throw new Error("initializeWasm() must be awaited first!");
21357                 }
21358                 const nativeResponseValue = wasm.FilesystemPersister_read_channelmonitors(this_arg, keys_manager);
21359                 return nativeResponseValue;
21360         }
21361         // struct LDKPersist FilesystemPersister_as_Persist(const struct LDKFilesystemPersister *NONNULL_PTR this_arg);
21362         export function FilesystemPersister_as_Persist(this_arg: number): number {
21363                 if(!isWasmInitialized) {
21364                         throw new Error("initializeWasm() must be awaited first!");
21365                 }
21366                 const nativeResponseValue = wasm.FilesystemPersister_as_Persist(this_arg);
21367                 return nativeResponseValue;
21368         }
21369         // void BackgroundProcessor_free(struct LDKBackgroundProcessor this_obj);
21370         export function BackgroundProcessor_free(this_obj: number): void {
21371                 if(!isWasmInitialized) {
21372                         throw new Error("initializeWasm() must be awaited first!");
21373                 }
21374                 const nativeResponseValue = wasm.BackgroundProcessor_free(this_obj);
21375                 // debug statements here
21376         }
21377         // void ChannelManagerPersister_free(struct LDKChannelManagerPersister this_ptr);
21378         export function ChannelManagerPersister_free(this_ptr: number): void {
21379                 if(!isWasmInitialized) {
21380                         throw new Error("initializeWasm() must be awaited first!");
21381                 }
21382                 const nativeResponseValue = wasm.ChannelManagerPersister_free(this_ptr);
21383                 // debug statements here
21384         }
21385         // MUST_USE_RES struct LDKBackgroundProcessor BackgroundProcessor_start(struct LDKChannelManagerPersister persister, struct LDKEventHandler event_handler, const struct LDKChainMonitor *NONNULL_PTR chain_monitor, const struct LDKChannelManager *NONNULL_PTR channel_manager, struct LDKNetGraphMsgHandler net_graph_msg_handler, const struct LDKPeerManager *NONNULL_PTR peer_manager, struct LDKLogger logger);
21386         export function BackgroundProcessor_start(persister: number, event_handler: number, chain_monitor: number, channel_manager: number, net_graph_msg_handler: number, peer_manager: number, logger: number): number {
21387                 if(!isWasmInitialized) {
21388                         throw new Error("initializeWasm() must be awaited first!");
21389                 }
21390                 const nativeResponseValue = wasm.BackgroundProcessor_start(persister, event_handler, chain_monitor, channel_manager, net_graph_msg_handler, peer_manager, logger);
21391                 return nativeResponseValue;
21392         }
21393         // MUST_USE_RES struct LDKCResult_NoneErrorZ BackgroundProcessor_join(struct LDKBackgroundProcessor this_arg);
21394         export function BackgroundProcessor_join(this_arg: number): number {
21395                 if(!isWasmInitialized) {
21396                         throw new Error("initializeWasm() must be awaited first!");
21397                 }
21398                 const nativeResponseValue = wasm.BackgroundProcessor_join(this_arg);
21399                 return nativeResponseValue;
21400         }
21401         // MUST_USE_RES struct LDKCResult_NoneErrorZ BackgroundProcessor_stop(struct LDKBackgroundProcessor this_arg);
21402         export function BackgroundProcessor_stop(this_arg: number): number {
21403                 if(!isWasmInitialized) {
21404                         throw new Error("initializeWasm() must be awaited first!");
21405                 }
21406                 const nativeResponseValue = wasm.BackgroundProcessor_stop(this_arg);
21407                 return nativeResponseValue;
21408         }
21409         // void check_platform(void);
21410         export function check_platform(): void {
21411                 if(!isWasmInitialized) {
21412                         throw new Error("initializeWasm() must be awaited first!");
21413                 }
21414                 const nativeResponseValue = wasm.check_platform();
21415                 // debug statements here
21416         }
21417         // void Invoice_free(struct LDKInvoice this_obj);
21418         export function Invoice_free(this_obj: number): void {
21419                 if(!isWasmInitialized) {
21420                         throw new Error("initializeWasm() must be awaited first!");
21421                 }
21422                 const nativeResponseValue = wasm.Invoice_free(this_obj);
21423                 // debug statements here
21424         }
21425         // bool Invoice_eq(const struct LDKInvoice *NONNULL_PTR a, const struct LDKInvoice *NONNULL_PTR b);
21426         export function Invoice_eq(a: number, b: number): boolean {
21427                 if(!isWasmInitialized) {
21428                         throw new Error("initializeWasm() must be awaited first!");
21429                 }
21430                 const nativeResponseValue = wasm.Invoice_eq(a, b);
21431                 return nativeResponseValue;
21432         }
21433         // uint64_t Invoice_clone_ptr(LDKInvoice *NONNULL_PTR arg);
21434         export function Invoice_clone_ptr(arg: number): number {
21435                 if(!isWasmInitialized) {
21436                         throw new Error("initializeWasm() must be awaited first!");
21437                 }
21438                 const nativeResponseValue = wasm.Invoice_clone_ptr(arg);
21439                 return nativeResponseValue;
21440         }
21441         // struct LDKInvoice Invoice_clone(const struct LDKInvoice *NONNULL_PTR orig);
21442         export function Invoice_clone(orig: number): number {
21443                 if(!isWasmInitialized) {
21444                         throw new Error("initializeWasm() must be awaited first!");
21445                 }
21446                 const nativeResponseValue = wasm.Invoice_clone(orig);
21447                 return nativeResponseValue;
21448         }
21449         // void SignedRawInvoice_free(struct LDKSignedRawInvoice this_obj);
21450         export function SignedRawInvoice_free(this_obj: number): void {
21451                 if(!isWasmInitialized) {
21452                         throw new Error("initializeWasm() must be awaited first!");
21453                 }
21454                 const nativeResponseValue = wasm.SignedRawInvoice_free(this_obj);
21455                 // debug statements here
21456         }
21457         // bool SignedRawInvoice_eq(const struct LDKSignedRawInvoice *NONNULL_PTR a, const struct LDKSignedRawInvoice *NONNULL_PTR b);
21458         export function SignedRawInvoice_eq(a: number, b: number): boolean {
21459                 if(!isWasmInitialized) {
21460                         throw new Error("initializeWasm() must be awaited first!");
21461                 }
21462                 const nativeResponseValue = wasm.SignedRawInvoice_eq(a, b);
21463                 return nativeResponseValue;
21464         }
21465         // uint64_t SignedRawInvoice_clone_ptr(LDKSignedRawInvoice *NONNULL_PTR arg);
21466         export function SignedRawInvoice_clone_ptr(arg: number): number {
21467                 if(!isWasmInitialized) {
21468                         throw new Error("initializeWasm() must be awaited first!");
21469                 }
21470                 const nativeResponseValue = wasm.SignedRawInvoice_clone_ptr(arg);
21471                 return nativeResponseValue;
21472         }
21473         // struct LDKSignedRawInvoice SignedRawInvoice_clone(const struct LDKSignedRawInvoice *NONNULL_PTR orig);
21474         export function SignedRawInvoice_clone(orig: number): number {
21475                 if(!isWasmInitialized) {
21476                         throw new Error("initializeWasm() must be awaited first!");
21477                 }
21478                 const nativeResponseValue = wasm.SignedRawInvoice_clone(orig);
21479                 return nativeResponseValue;
21480         }
21481         // void RawInvoice_free(struct LDKRawInvoice this_obj);
21482         export function RawInvoice_free(this_obj: number): void {
21483                 if(!isWasmInitialized) {
21484                         throw new Error("initializeWasm() must be awaited first!");
21485                 }
21486                 const nativeResponseValue = wasm.RawInvoice_free(this_obj);
21487                 // debug statements here
21488         }
21489         // struct LDKRawDataPart RawInvoice_get_data(const struct LDKRawInvoice *NONNULL_PTR this_ptr);
21490         export function RawInvoice_get_data(this_ptr: number): number {
21491                 if(!isWasmInitialized) {
21492                         throw new Error("initializeWasm() must be awaited first!");
21493                 }
21494                 const nativeResponseValue = wasm.RawInvoice_get_data(this_ptr);
21495                 return nativeResponseValue;
21496         }
21497         // void RawInvoice_set_data(struct LDKRawInvoice *NONNULL_PTR this_ptr, struct LDKRawDataPart val);
21498         export function RawInvoice_set_data(this_ptr: number, val: number): void {
21499                 if(!isWasmInitialized) {
21500                         throw new Error("initializeWasm() must be awaited first!");
21501                 }
21502                 const nativeResponseValue = wasm.RawInvoice_set_data(this_ptr, val);
21503                 // debug statements here
21504         }
21505         // bool RawInvoice_eq(const struct LDKRawInvoice *NONNULL_PTR a, const struct LDKRawInvoice *NONNULL_PTR b);
21506         export function RawInvoice_eq(a: number, b: number): boolean {
21507                 if(!isWasmInitialized) {
21508                         throw new Error("initializeWasm() must be awaited first!");
21509                 }
21510                 const nativeResponseValue = wasm.RawInvoice_eq(a, b);
21511                 return nativeResponseValue;
21512         }
21513         // uint64_t RawInvoice_clone_ptr(LDKRawInvoice *NONNULL_PTR arg);
21514         export function RawInvoice_clone_ptr(arg: number): number {
21515                 if(!isWasmInitialized) {
21516                         throw new Error("initializeWasm() must be awaited first!");
21517                 }
21518                 const nativeResponseValue = wasm.RawInvoice_clone_ptr(arg);
21519                 return nativeResponseValue;
21520         }
21521         // struct LDKRawInvoice RawInvoice_clone(const struct LDKRawInvoice *NONNULL_PTR orig);
21522         export function RawInvoice_clone(orig: number): number {
21523                 if(!isWasmInitialized) {
21524                         throw new Error("initializeWasm() must be awaited first!");
21525                 }
21526                 const nativeResponseValue = wasm.RawInvoice_clone(orig);
21527                 return nativeResponseValue;
21528         }
21529         // void RawDataPart_free(struct LDKRawDataPart this_obj);
21530         export function RawDataPart_free(this_obj: number): void {
21531                 if(!isWasmInitialized) {
21532                         throw new Error("initializeWasm() must be awaited first!");
21533                 }
21534                 const nativeResponseValue = wasm.RawDataPart_free(this_obj);
21535                 // debug statements here
21536         }
21537         // struct LDKPositiveTimestamp RawDataPart_get_timestamp(const struct LDKRawDataPart *NONNULL_PTR this_ptr);
21538         export function RawDataPart_get_timestamp(this_ptr: number): number {
21539                 if(!isWasmInitialized) {
21540                         throw new Error("initializeWasm() must be awaited first!");
21541                 }
21542                 const nativeResponseValue = wasm.RawDataPart_get_timestamp(this_ptr);
21543                 return nativeResponseValue;
21544         }
21545         // void RawDataPart_set_timestamp(struct LDKRawDataPart *NONNULL_PTR this_ptr, struct LDKPositiveTimestamp val);
21546         export function RawDataPart_set_timestamp(this_ptr: number, val: number): void {
21547                 if(!isWasmInitialized) {
21548                         throw new Error("initializeWasm() must be awaited first!");
21549                 }
21550                 const nativeResponseValue = wasm.RawDataPart_set_timestamp(this_ptr, val);
21551                 // debug statements here
21552         }
21553         // bool RawDataPart_eq(const struct LDKRawDataPart *NONNULL_PTR a, const struct LDKRawDataPart *NONNULL_PTR b);
21554         export function RawDataPart_eq(a: number, b: number): boolean {
21555                 if(!isWasmInitialized) {
21556                         throw new Error("initializeWasm() must be awaited first!");
21557                 }
21558                 const nativeResponseValue = wasm.RawDataPart_eq(a, b);
21559                 return nativeResponseValue;
21560         }
21561         // uint64_t RawDataPart_clone_ptr(LDKRawDataPart *NONNULL_PTR arg);
21562         export function RawDataPart_clone_ptr(arg: number): number {
21563                 if(!isWasmInitialized) {
21564                         throw new Error("initializeWasm() must be awaited first!");
21565                 }
21566                 const nativeResponseValue = wasm.RawDataPart_clone_ptr(arg);
21567                 return nativeResponseValue;
21568         }
21569         // struct LDKRawDataPart RawDataPart_clone(const struct LDKRawDataPart *NONNULL_PTR orig);
21570         export function RawDataPart_clone(orig: number): number {
21571                 if(!isWasmInitialized) {
21572                         throw new Error("initializeWasm() must be awaited first!");
21573                 }
21574                 const nativeResponseValue = wasm.RawDataPart_clone(orig);
21575                 return nativeResponseValue;
21576         }
21577         // void PositiveTimestamp_free(struct LDKPositiveTimestamp this_obj);
21578         export function PositiveTimestamp_free(this_obj: number): void {
21579                 if(!isWasmInitialized) {
21580                         throw new Error("initializeWasm() must be awaited first!");
21581                 }
21582                 const nativeResponseValue = wasm.PositiveTimestamp_free(this_obj);
21583                 // debug statements here
21584         }
21585         // bool PositiveTimestamp_eq(const struct LDKPositiveTimestamp *NONNULL_PTR a, const struct LDKPositiveTimestamp *NONNULL_PTR b);
21586         export function PositiveTimestamp_eq(a: number, b: number): boolean {
21587                 if(!isWasmInitialized) {
21588                         throw new Error("initializeWasm() must be awaited first!");
21589                 }
21590                 const nativeResponseValue = wasm.PositiveTimestamp_eq(a, b);
21591                 return nativeResponseValue;
21592         }
21593         // uint64_t PositiveTimestamp_clone_ptr(LDKPositiveTimestamp *NONNULL_PTR arg);
21594         export function PositiveTimestamp_clone_ptr(arg: number): number {
21595                 if(!isWasmInitialized) {
21596                         throw new Error("initializeWasm() must be awaited first!");
21597                 }
21598                 const nativeResponseValue = wasm.PositiveTimestamp_clone_ptr(arg);
21599                 return nativeResponseValue;
21600         }
21601         // struct LDKPositiveTimestamp PositiveTimestamp_clone(const struct LDKPositiveTimestamp *NONNULL_PTR orig);
21602         export function PositiveTimestamp_clone(orig: number): number {
21603                 if(!isWasmInitialized) {
21604                         throw new Error("initializeWasm() must be awaited first!");
21605                 }
21606                 const nativeResponseValue = wasm.PositiveTimestamp_clone(orig);
21607                 return nativeResponseValue;
21608         }
21609         // enum LDKSiPrefix SiPrefix_clone(const enum LDKSiPrefix *NONNULL_PTR orig);
21610         export function SiPrefix_clone(orig: number): SiPrefix {
21611                 if(!isWasmInitialized) {
21612                         throw new Error("initializeWasm() must be awaited first!");
21613                 }
21614                 const nativeResponseValue = wasm.SiPrefix_clone(orig);
21615                 return nativeResponseValue;
21616         }
21617         // enum LDKSiPrefix SiPrefix_milli(void);
21618         export function SiPrefix_milli(): SiPrefix {
21619                 if(!isWasmInitialized) {
21620                         throw new Error("initializeWasm() must be awaited first!");
21621                 }
21622                 const nativeResponseValue = wasm.SiPrefix_milli();
21623                 return nativeResponseValue;
21624         }
21625         // enum LDKSiPrefix SiPrefix_micro(void);
21626         export function SiPrefix_micro(): SiPrefix {
21627                 if(!isWasmInitialized) {
21628                         throw new Error("initializeWasm() must be awaited first!");
21629                 }
21630                 const nativeResponseValue = wasm.SiPrefix_micro();
21631                 return nativeResponseValue;
21632         }
21633         // enum LDKSiPrefix SiPrefix_nano(void);
21634         export function SiPrefix_nano(): SiPrefix {
21635                 if(!isWasmInitialized) {
21636                         throw new Error("initializeWasm() must be awaited first!");
21637                 }
21638                 const nativeResponseValue = wasm.SiPrefix_nano();
21639                 return nativeResponseValue;
21640         }
21641         // enum LDKSiPrefix SiPrefix_pico(void);
21642         export function SiPrefix_pico(): SiPrefix {
21643                 if(!isWasmInitialized) {
21644                         throw new Error("initializeWasm() must be awaited first!");
21645                 }
21646                 const nativeResponseValue = wasm.SiPrefix_pico();
21647                 return nativeResponseValue;
21648         }
21649         // bool SiPrefix_eq(const enum LDKSiPrefix *NONNULL_PTR a, const enum LDKSiPrefix *NONNULL_PTR b);
21650         export function SiPrefix_eq(a: number, b: number): boolean {
21651                 if(!isWasmInitialized) {
21652                         throw new Error("initializeWasm() must be awaited first!");
21653                 }
21654                 const nativeResponseValue = wasm.SiPrefix_eq(a, b);
21655                 return nativeResponseValue;
21656         }
21657         // MUST_USE_RES uint64_t SiPrefix_multiplier(const enum LDKSiPrefix *NONNULL_PTR this_arg);
21658         export function SiPrefix_multiplier(this_arg: number): number {
21659                 if(!isWasmInitialized) {
21660                         throw new Error("initializeWasm() must be awaited first!");
21661                 }
21662                 const nativeResponseValue = wasm.SiPrefix_multiplier(this_arg);
21663                 return nativeResponseValue;
21664         }
21665         // enum LDKCurrency Currency_clone(const enum LDKCurrency *NONNULL_PTR orig);
21666         export function Currency_clone(orig: number): Currency {
21667                 if(!isWasmInitialized) {
21668                         throw new Error("initializeWasm() must be awaited first!");
21669                 }
21670                 const nativeResponseValue = wasm.Currency_clone(orig);
21671                 return nativeResponseValue;
21672         }
21673         // enum LDKCurrency Currency_bitcoin(void);
21674         export function Currency_bitcoin(): Currency {
21675                 if(!isWasmInitialized) {
21676                         throw new Error("initializeWasm() must be awaited first!");
21677                 }
21678                 const nativeResponseValue = wasm.Currency_bitcoin();
21679                 return nativeResponseValue;
21680         }
21681         // enum LDKCurrency Currency_bitcoin_testnet(void);
21682         export function Currency_bitcoin_testnet(): Currency {
21683                 if(!isWasmInitialized) {
21684                         throw new Error("initializeWasm() must be awaited first!");
21685                 }
21686                 const nativeResponseValue = wasm.Currency_bitcoin_testnet();
21687                 return nativeResponseValue;
21688         }
21689         // enum LDKCurrency Currency_regtest(void);
21690         export function Currency_regtest(): Currency {
21691                 if(!isWasmInitialized) {
21692                         throw new Error("initializeWasm() must be awaited first!");
21693                 }
21694                 const nativeResponseValue = wasm.Currency_regtest();
21695                 return nativeResponseValue;
21696         }
21697         // enum LDKCurrency Currency_simnet(void);
21698         export function Currency_simnet(): Currency {
21699                 if(!isWasmInitialized) {
21700                         throw new Error("initializeWasm() must be awaited first!");
21701                 }
21702                 const nativeResponseValue = wasm.Currency_simnet();
21703                 return nativeResponseValue;
21704         }
21705         // enum LDKCurrency Currency_signet(void);
21706         export function Currency_signet(): Currency {
21707                 if(!isWasmInitialized) {
21708                         throw new Error("initializeWasm() must be awaited first!");
21709                 }
21710                 const nativeResponseValue = wasm.Currency_signet();
21711                 return nativeResponseValue;
21712         }
21713         // uint64_t Currency_hash(const enum LDKCurrency *NONNULL_PTR o);
21714         export function Currency_hash(o: number): number {
21715                 if(!isWasmInitialized) {
21716                         throw new Error("initializeWasm() must be awaited first!");
21717                 }
21718                 const nativeResponseValue = wasm.Currency_hash(o);
21719                 return nativeResponseValue;
21720         }
21721         // bool Currency_eq(const enum LDKCurrency *NONNULL_PTR a, const enum LDKCurrency *NONNULL_PTR b);
21722         export function Currency_eq(a: number, b: number): boolean {
21723                 if(!isWasmInitialized) {
21724                         throw new Error("initializeWasm() must be awaited first!");
21725                 }
21726                 const nativeResponseValue = wasm.Currency_eq(a, b);
21727                 return nativeResponseValue;
21728         }
21729         // void Sha256_free(struct LDKSha256 this_obj);
21730         export function Sha256_free(this_obj: number): void {
21731                 if(!isWasmInitialized) {
21732                         throw new Error("initializeWasm() must be awaited first!");
21733                 }
21734                 const nativeResponseValue = wasm.Sha256_free(this_obj);
21735                 // debug statements here
21736         }
21737         // uint64_t Sha256_clone_ptr(LDKSha256 *NONNULL_PTR arg);
21738         export function Sha256_clone_ptr(arg: number): number {
21739                 if(!isWasmInitialized) {
21740                         throw new Error("initializeWasm() must be awaited first!");
21741                 }
21742                 const nativeResponseValue = wasm.Sha256_clone_ptr(arg);
21743                 return nativeResponseValue;
21744         }
21745         // struct LDKSha256 Sha256_clone(const struct LDKSha256 *NONNULL_PTR orig);
21746         export function Sha256_clone(orig: number): number {
21747                 if(!isWasmInitialized) {
21748                         throw new Error("initializeWasm() must be awaited first!");
21749                 }
21750                 const nativeResponseValue = wasm.Sha256_clone(orig);
21751                 return nativeResponseValue;
21752         }
21753         // uint64_t Sha256_hash(const struct LDKSha256 *NONNULL_PTR o);
21754         export function Sha256_hash(o: number): number {
21755                 if(!isWasmInitialized) {
21756                         throw new Error("initializeWasm() must be awaited first!");
21757                 }
21758                 const nativeResponseValue = wasm.Sha256_hash(o);
21759                 return nativeResponseValue;
21760         }
21761         // bool Sha256_eq(const struct LDKSha256 *NONNULL_PTR a, const struct LDKSha256 *NONNULL_PTR b);
21762         export function Sha256_eq(a: number, b: number): boolean {
21763                 if(!isWasmInitialized) {
21764                         throw new Error("initializeWasm() must be awaited first!");
21765                 }
21766                 const nativeResponseValue = wasm.Sha256_eq(a, b);
21767                 return nativeResponseValue;
21768         }
21769         // void Description_free(struct LDKDescription this_obj);
21770         export function Description_free(this_obj: number): void {
21771                 if(!isWasmInitialized) {
21772                         throw new Error("initializeWasm() must be awaited first!");
21773                 }
21774                 const nativeResponseValue = wasm.Description_free(this_obj);
21775                 // debug statements here
21776         }
21777         // uint64_t Description_clone_ptr(LDKDescription *NONNULL_PTR arg);
21778         export function Description_clone_ptr(arg: number): number {
21779                 if(!isWasmInitialized) {
21780                         throw new Error("initializeWasm() must be awaited first!");
21781                 }
21782                 const nativeResponseValue = wasm.Description_clone_ptr(arg);
21783                 return nativeResponseValue;
21784         }
21785         // struct LDKDescription Description_clone(const struct LDKDescription *NONNULL_PTR orig);
21786         export function Description_clone(orig: number): number {
21787                 if(!isWasmInitialized) {
21788                         throw new Error("initializeWasm() must be awaited first!");
21789                 }
21790                 const nativeResponseValue = wasm.Description_clone(orig);
21791                 return nativeResponseValue;
21792         }
21793         // uint64_t Description_hash(const struct LDKDescription *NONNULL_PTR o);
21794         export function Description_hash(o: number): number {
21795                 if(!isWasmInitialized) {
21796                         throw new Error("initializeWasm() must be awaited first!");
21797                 }
21798                 const nativeResponseValue = wasm.Description_hash(o);
21799                 return nativeResponseValue;
21800         }
21801         // bool Description_eq(const struct LDKDescription *NONNULL_PTR a, const struct LDKDescription *NONNULL_PTR b);
21802         export function Description_eq(a: number, b: number): boolean {
21803                 if(!isWasmInitialized) {
21804                         throw new Error("initializeWasm() must be awaited first!");
21805                 }
21806                 const nativeResponseValue = wasm.Description_eq(a, b);
21807                 return nativeResponseValue;
21808         }
21809         // void PayeePubKey_free(struct LDKPayeePubKey this_obj);
21810         export function PayeePubKey_free(this_obj: number): void {
21811                 if(!isWasmInitialized) {
21812                         throw new Error("initializeWasm() must be awaited first!");
21813                 }
21814                 const nativeResponseValue = wasm.PayeePubKey_free(this_obj);
21815                 // debug statements here
21816         }
21817         // struct LDKPublicKey PayeePubKey_get_a(const struct LDKPayeePubKey *NONNULL_PTR this_ptr);
21818         export function PayeePubKey_get_a(this_ptr: number): Uint8Array {
21819                 if(!isWasmInitialized) {
21820                         throw new Error("initializeWasm() must be awaited first!");
21821                 }
21822                 const nativeResponseValue = wasm.PayeePubKey_get_a(this_ptr);
21823                 return decodeArray(nativeResponseValue);
21824         }
21825         // void PayeePubKey_set_a(struct LDKPayeePubKey *NONNULL_PTR this_ptr, struct LDKPublicKey val);
21826         export function PayeePubKey_set_a(this_ptr: number, val: Uint8Array): void {
21827                 if(!isWasmInitialized) {
21828                         throw new Error("initializeWasm() must be awaited first!");
21829                 }
21830                 const nativeResponseValue = wasm.PayeePubKey_set_a(this_ptr, encodeArray(val));
21831                 // debug statements here
21832         }
21833         // MUST_USE_RES struct LDKPayeePubKey PayeePubKey_new(struct LDKPublicKey a_arg);
21834         export function PayeePubKey_new(a_arg: Uint8Array): number {
21835                 if(!isWasmInitialized) {
21836                         throw new Error("initializeWasm() must be awaited first!");
21837                 }
21838                 const nativeResponseValue = wasm.PayeePubKey_new(encodeArray(a_arg));
21839                 return nativeResponseValue;
21840         }
21841         // uint64_t PayeePubKey_clone_ptr(LDKPayeePubKey *NONNULL_PTR arg);
21842         export function PayeePubKey_clone_ptr(arg: number): number {
21843                 if(!isWasmInitialized) {
21844                         throw new Error("initializeWasm() must be awaited first!");
21845                 }
21846                 const nativeResponseValue = wasm.PayeePubKey_clone_ptr(arg);
21847                 return nativeResponseValue;
21848         }
21849         // struct LDKPayeePubKey PayeePubKey_clone(const struct LDKPayeePubKey *NONNULL_PTR orig);
21850         export function PayeePubKey_clone(orig: number): number {
21851                 if(!isWasmInitialized) {
21852                         throw new Error("initializeWasm() must be awaited first!");
21853                 }
21854                 const nativeResponseValue = wasm.PayeePubKey_clone(orig);
21855                 return nativeResponseValue;
21856         }
21857         // uint64_t PayeePubKey_hash(const struct LDKPayeePubKey *NONNULL_PTR o);
21858         export function PayeePubKey_hash(o: number): number {
21859                 if(!isWasmInitialized) {
21860                         throw new Error("initializeWasm() must be awaited first!");
21861                 }
21862                 const nativeResponseValue = wasm.PayeePubKey_hash(o);
21863                 return nativeResponseValue;
21864         }
21865         // bool PayeePubKey_eq(const struct LDKPayeePubKey *NONNULL_PTR a, const struct LDKPayeePubKey *NONNULL_PTR b);
21866         export function PayeePubKey_eq(a: number, b: number): boolean {
21867                 if(!isWasmInitialized) {
21868                         throw new Error("initializeWasm() must be awaited first!");
21869                 }
21870                 const nativeResponseValue = wasm.PayeePubKey_eq(a, b);
21871                 return nativeResponseValue;
21872         }
21873         // void ExpiryTime_free(struct LDKExpiryTime this_obj);
21874         export function ExpiryTime_free(this_obj: number): void {
21875                 if(!isWasmInitialized) {
21876                         throw new Error("initializeWasm() must be awaited first!");
21877                 }
21878                 const nativeResponseValue = wasm.ExpiryTime_free(this_obj);
21879                 // debug statements here
21880         }
21881         // uint64_t ExpiryTime_clone_ptr(LDKExpiryTime *NONNULL_PTR arg);
21882         export function ExpiryTime_clone_ptr(arg: number): number {
21883                 if(!isWasmInitialized) {
21884                         throw new Error("initializeWasm() must be awaited first!");
21885                 }
21886                 const nativeResponseValue = wasm.ExpiryTime_clone_ptr(arg);
21887                 return nativeResponseValue;
21888         }
21889         // struct LDKExpiryTime ExpiryTime_clone(const struct LDKExpiryTime *NONNULL_PTR orig);
21890         export function ExpiryTime_clone(orig: number): number {
21891                 if(!isWasmInitialized) {
21892                         throw new Error("initializeWasm() must be awaited first!");
21893                 }
21894                 const nativeResponseValue = wasm.ExpiryTime_clone(orig);
21895                 return nativeResponseValue;
21896         }
21897         // uint64_t ExpiryTime_hash(const struct LDKExpiryTime *NONNULL_PTR o);
21898         export function ExpiryTime_hash(o: number): number {
21899                 if(!isWasmInitialized) {
21900                         throw new Error("initializeWasm() must be awaited first!");
21901                 }
21902                 const nativeResponseValue = wasm.ExpiryTime_hash(o);
21903                 return nativeResponseValue;
21904         }
21905         // bool ExpiryTime_eq(const struct LDKExpiryTime *NONNULL_PTR a, const struct LDKExpiryTime *NONNULL_PTR b);
21906         export function ExpiryTime_eq(a: number, b: number): boolean {
21907                 if(!isWasmInitialized) {
21908                         throw new Error("initializeWasm() must be awaited first!");
21909                 }
21910                 const nativeResponseValue = wasm.ExpiryTime_eq(a, b);
21911                 return nativeResponseValue;
21912         }
21913         // void MinFinalCltvExpiry_free(struct LDKMinFinalCltvExpiry this_obj);
21914         export function MinFinalCltvExpiry_free(this_obj: number): void {
21915                 if(!isWasmInitialized) {
21916                         throw new Error("initializeWasm() must be awaited first!");
21917                 }
21918                 const nativeResponseValue = wasm.MinFinalCltvExpiry_free(this_obj);
21919                 // debug statements here
21920         }
21921         // uint64_t MinFinalCltvExpiry_get_a(const struct LDKMinFinalCltvExpiry *NONNULL_PTR this_ptr);
21922         export function MinFinalCltvExpiry_get_a(this_ptr: number): number {
21923                 if(!isWasmInitialized) {
21924                         throw new Error("initializeWasm() must be awaited first!");
21925                 }
21926                 const nativeResponseValue = wasm.MinFinalCltvExpiry_get_a(this_ptr);
21927                 return nativeResponseValue;
21928         }
21929         // void MinFinalCltvExpiry_set_a(struct LDKMinFinalCltvExpiry *NONNULL_PTR this_ptr, uint64_t val);
21930         export function MinFinalCltvExpiry_set_a(this_ptr: number, val: number): void {
21931                 if(!isWasmInitialized) {
21932                         throw new Error("initializeWasm() must be awaited first!");
21933                 }
21934                 const nativeResponseValue = wasm.MinFinalCltvExpiry_set_a(this_ptr, val);
21935                 // debug statements here
21936         }
21937         // MUST_USE_RES struct LDKMinFinalCltvExpiry MinFinalCltvExpiry_new(uint64_t a_arg);
21938         export function MinFinalCltvExpiry_new(a_arg: number): number {
21939                 if(!isWasmInitialized) {
21940                         throw new Error("initializeWasm() must be awaited first!");
21941                 }
21942                 const nativeResponseValue = wasm.MinFinalCltvExpiry_new(a_arg);
21943                 return nativeResponseValue;
21944         }
21945         // uint64_t MinFinalCltvExpiry_clone_ptr(LDKMinFinalCltvExpiry *NONNULL_PTR arg);
21946         export function MinFinalCltvExpiry_clone_ptr(arg: number): number {
21947                 if(!isWasmInitialized) {
21948                         throw new Error("initializeWasm() must be awaited first!");
21949                 }
21950                 const nativeResponseValue = wasm.MinFinalCltvExpiry_clone_ptr(arg);
21951                 return nativeResponseValue;
21952         }
21953         // struct LDKMinFinalCltvExpiry MinFinalCltvExpiry_clone(const struct LDKMinFinalCltvExpiry *NONNULL_PTR orig);
21954         export function MinFinalCltvExpiry_clone(orig: number): number {
21955                 if(!isWasmInitialized) {
21956                         throw new Error("initializeWasm() must be awaited first!");
21957                 }
21958                 const nativeResponseValue = wasm.MinFinalCltvExpiry_clone(orig);
21959                 return nativeResponseValue;
21960         }
21961         // uint64_t MinFinalCltvExpiry_hash(const struct LDKMinFinalCltvExpiry *NONNULL_PTR o);
21962         export function MinFinalCltvExpiry_hash(o: number): number {
21963                 if(!isWasmInitialized) {
21964                         throw new Error("initializeWasm() must be awaited first!");
21965                 }
21966                 const nativeResponseValue = wasm.MinFinalCltvExpiry_hash(o);
21967                 return nativeResponseValue;
21968         }
21969         // bool MinFinalCltvExpiry_eq(const struct LDKMinFinalCltvExpiry *NONNULL_PTR a, const struct LDKMinFinalCltvExpiry *NONNULL_PTR b);
21970         export function MinFinalCltvExpiry_eq(a: number, b: number): boolean {
21971                 if(!isWasmInitialized) {
21972                         throw new Error("initializeWasm() must be awaited first!");
21973                 }
21974                 const nativeResponseValue = wasm.MinFinalCltvExpiry_eq(a, b);
21975                 return nativeResponseValue;
21976         }
21977         // void Fallback_free(struct LDKFallback this_ptr);
21978         export function Fallback_free(this_ptr: number): void {
21979                 if(!isWasmInitialized) {
21980                         throw new Error("initializeWasm() must be awaited first!");
21981                 }
21982                 const nativeResponseValue = wasm.Fallback_free(this_ptr);
21983                 // debug statements here
21984         }
21985         // uint64_t Fallback_clone_ptr(LDKFallback *NONNULL_PTR arg);
21986         export function Fallback_clone_ptr(arg: number): number {
21987                 if(!isWasmInitialized) {
21988                         throw new Error("initializeWasm() must be awaited first!");
21989                 }
21990                 const nativeResponseValue = wasm.Fallback_clone_ptr(arg);
21991                 return nativeResponseValue;
21992         }
21993         // struct LDKFallback Fallback_clone(const struct LDKFallback *NONNULL_PTR orig);
21994         export function Fallback_clone(orig: number): number {
21995                 if(!isWasmInitialized) {
21996                         throw new Error("initializeWasm() must be awaited first!");
21997                 }
21998                 const nativeResponseValue = wasm.Fallback_clone(orig);
21999                 return nativeResponseValue;
22000         }
22001         // struct LDKFallback Fallback_seg_wit_program(struct LDKu5 version, struct LDKCVec_u8Z program);
22002         export function Fallback_seg_wit_program(version: number, program: Uint8Array): number {
22003                 if(!isWasmInitialized) {
22004                         throw new Error("initializeWasm() must be awaited first!");
22005                 }
22006                 const nativeResponseValue = wasm.Fallback_seg_wit_program(version, encodeArray(program));
22007                 return nativeResponseValue;
22008         }
22009         // struct LDKFallback Fallback_pub_key_hash(struct LDKTwentyBytes a);
22010         export function Fallback_pub_key_hash(a: Uint8Array): number {
22011                 if(!isWasmInitialized) {
22012                         throw new Error("initializeWasm() must be awaited first!");
22013                 }
22014                 const nativeResponseValue = wasm.Fallback_pub_key_hash(encodeArray(a));
22015                 return nativeResponseValue;
22016         }
22017         // struct LDKFallback Fallback_script_hash(struct LDKTwentyBytes a);
22018         export function Fallback_script_hash(a: Uint8Array): number {
22019                 if(!isWasmInitialized) {
22020                         throw new Error("initializeWasm() must be awaited first!");
22021                 }
22022                 const nativeResponseValue = wasm.Fallback_script_hash(encodeArray(a));
22023                 return nativeResponseValue;
22024         }
22025         // uint64_t Fallback_hash(const struct LDKFallback *NONNULL_PTR o);
22026         export function Fallback_hash(o: number): number {
22027                 if(!isWasmInitialized) {
22028                         throw new Error("initializeWasm() must be awaited first!");
22029                 }
22030                 const nativeResponseValue = wasm.Fallback_hash(o);
22031                 return nativeResponseValue;
22032         }
22033         // bool Fallback_eq(const struct LDKFallback *NONNULL_PTR a, const struct LDKFallback *NONNULL_PTR b);
22034         export function Fallback_eq(a: number, b: number): boolean {
22035                 if(!isWasmInitialized) {
22036                         throw new Error("initializeWasm() must be awaited first!");
22037                 }
22038                 const nativeResponseValue = wasm.Fallback_eq(a, b);
22039                 return nativeResponseValue;
22040         }
22041         // void InvoiceSignature_free(struct LDKInvoiceSignature this_obj);
22042         export function InvoiceSignature_free(this_obj: number): void {
22043                 if(!isWasmInitialized) {
22044                         throw new Error("initializeWasm() must be awaited first!");
22045                 }
22046                 const nativeResponseValue = wasm.InvoiceSignature_free(this_obj);
22047                 // debug statements here
22048         }
22049         // uint64_t InvoiceSignature_clone_ptr(LDKInvoiceSignature *NONNULL_PTR arg);
22050         export function InvoiceSignature_clone_ptr(arg: number): number {
22051                 if(!isWasmInitialized) {
22052                         throw new Error("initializeWasm() must be awaited first!");
22053                 }
22054                 const nativeResponseValue = wasm.InvoiceSignature_clone_ptr(arg);
22055                 return nativeResponseValue;
22056         }
22057         // struct LDKInvoiceSignature InvoiceSignature_clone(const struct LDKInvoiceSignature *NONNULL_PTR orig);
22058         export function InvoiceSignature_clone(orig: number): number {
22059                 if(!isWasmInitialized) {
22060                         throw new Error("initializeWasm() must be awaited first!");
22061                 }
22062                 const nativeResponseValue = wasm.InvoiceSignature_clone(orig);
22063                 return nativeResponseValue;
22064         }
22065         // bool InvoiceSignature_eq(const struct LDKInvoiceSignature *NONNULL_PTR a, const struct LDKInvoiceSignature *NONNULL_PTR b);
22066         export function InvoiceSignature_eq(a: number, b: number): boolean {
22067                 if(!isWasmInitialized) {
22068                         throw new Error("initializeWasm() must be awaited first!");
22069                 }
22070                 const nativeResponseValue = wasm.InvoiceSignature_eq(a, b);
22071                 return nativeResponseValue;
22072         }
22073         // void PrivateRoute_free(struct LDKPrivateRoute this_obj);
22074         export function PrivateRoute_free(this_obj: number): void {
22075                 if(!isWasmInitialized) {
22076                         throw new Error("initializeWasm() must be awaited first!");
22077                 }
22078                 const nativeResponseValue = wasm.PrivateRoute_free(this_obj);
22079                 // debug statements here
22080         }
22081         // uint64_t PrivateRoute_clone_ptr(LDKPrivateRoute *NONNULL_PTR arg);
22082         export function PrivateRoute_clone_ptr(arg: number): number {
22083                 if(!isWasmInitialized) {
22084                         throw new Error("initializeWasm() must be awaited first!");
22085                 }
22086                 const nativeResponseValue = wasm.PrivateRoute_clone_ptr(arg);
22087                 return nativeResponseValue;
22088         }
22089         // struct LDKPrivateRoute PrivateRoute_clone(const struct LDKPrivateRoute *NONNULL_PTR orig);
22090         export function PrivateRoute_clone(orig: number): number {
22091                 if(!isWasmInitialized) {
22092                         throw new Error("initializeWasm() must be awaited first!");
22093                 }
22094                 const nativeResponseValue = wasm.PrivateRoute_clone(orig);
22095                 return nativeResponseValue;
22096         }
22097         // uint64_t PrivateRoute_hash(const struct LDKPrivateRoute *NONNULL_PTR o);
22098         export function PrivateRoute_hash(o: number): number {
22099                 if(!isWasmInitialized) {
22100                         throw new Error("initializeWasm() must be awaited first!");
22101                 }
22102                 const nativeResponseValue = wasm.PrivateRoute_hash(o);
22103                 return nativeResponseValue;
22104         }
22105         // bool PrivateRoute_eq(const struct LDKPrivateRoute *NONNULL_PTR a, const struct LDKPrivateRoute *NONNULL_PTR b);
22106         export function PrivateRoute_eq(a: number, b: number): boolean {
22107                 if(!isWasmInitialized) {
22108                         throw new Error("initializeWasm() must be awaited first!");
22109                 }
22110                 const nativeResponseValue = wasm.PrivateRoute_eq(a, b);
22111                 return nativeResponseValue;
22112         }
22113         // MUST_USE_RES struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ SignedRawInvoice_into_parts(struct LDKSignedRawInvoice this_arg);
22114         export function SignedRawInvoice_into_parts(this_arg: number): number {
22115                 if(!isWasmInitialized) {
22116                         throw new Error("initializeWasm() must be awaited first!");
22117                 }
22118                 const nativeResponseValue = wasm.SignedRawInvoice_into_parts(this_arg);
22119                 return nativeResponseValue;
22120         }
22121         // MUST_USE_RES struct LDKRawInvoice SignedRawInvoice_raw_invoice(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
22122         export function SignedRawInvoice_raw_invoice(this_arg: number): number {
22123                 if(!isWasmInitialized) {
22124                         throw new Error("initializeWasm() must be awaited first!");
22125                 }
22126                 const nativeResponseValue = wasm.SignedRawInvoice_raw_invoice(this_arg);
22127                 return nativeResponseValue;
22128         }
22129         // MUST_USE_RES const uint8_t (*SignedRawInvoice_hash(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg))[32];
22130         export function SignedRawInvoice_hash(this_arg: number): Uint8Array {
22131                 if(!isWasmInitialized) {
22132                         throw new Error("initializeWasm() must be awaited first!");
22133                 }
22134                 const nativeResponseValue = wasm.SignedRawInvoice_hash(this_arg);
22135                 return decodeArray(nativeResponseValue);
22136         }
22137         // MUST_USE_RES struct LDKInvoiceSignature SignedRawInvoice_signature(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
22138         export function SignedRawInvoice_signature(this_arg: number): number {
22139                 if(!isWasmInitialized) {
22140                         throw new Error("initializeWasm() must be awaited first!");
22141                 }
22142                 const nativeResponseValue = wasm.SignedRawInvoice_signature(this_arg);
22143                 return nativeResponseValue;
22144         }
22145         // MUST_USE_RES struct LDKCResult_PayeePubKeyErrorZ SignedRawInvoice_recover_payee_pub_key(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
22146         export function SignedRawInvoice_recover_payee_pub_key(this_arg: number): number {
22147                 if(!isWasmInitialized) {
22148                         throw new Error("initializeWasm() must be awaited first!");
22149                 }
22150                 const nativeResponseValue = wasm.SignedRawInvoice_recover_payee_pub_key(this_arg);
22151                 return nativeResponseValue;
22152         }
22153         // MUST_USE_RES bool SignedRawInvoice_check_signature(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
22154         export function SignedRawInvoice_check_signature(this_arg: number): boolean {
22155                 if(!isWasmInitialized) {
22156                         throw new Error("initializeWasm() must be awaited first!");
22157                 }
22158                 const nativeResponseValue = wasm.SignedRawInvoice_check_signature(this_arg);
22159                 return nativeResponseValue;
22160         }
22161         // MUST_USE_RES struct LDKThirtyTwoBytes RawInvoice_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
22162         export function RawInvoice_hash(this_arg: number): Uint8Array {
22163                 if(!isWasmInitialized) {
22164                         throw new Error("initializeWasm() must be awaited first!");
22165                 }
22166                 const nativeResponseValue = wasm.RawInvoice_hash(this_arg);
22167                 return decodeArray(nativeResponseValue);
22168         }
22169         // MUST_USE_RES struct LDKSha256 RawInvoice_payment_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
22170         export function RawInvoice_payment_hash(this_arg: number): number {
22171                 if(!isWasmInitialized) {
22172                         throw new Error("initializeWasm() must be awaited first!");
22173                 }
22174                 const nativeResponseValue = wasm.RawInvoice_payment_hash(this_arg);
22175                 return nativeResponseValue;
22176         }
22177         // MUST_USE_RES struct LDKDescription RawInvoice_description(const struct LDKRawInvoice *NONNULL_PTR this_arg);
22178         export function RawInvoice_description(this_arg: number): number {
22179                 if(!isWasmInitialized) {
22180                         throw new Error("initializeWasm() must be awaited first!");
22181                 }
22182                 const nativeResponseValue = wasm.RawInvoice_description(this_arg);
22183                 return nativeResponseValue;
22184         }
22185         // MUST_USE_RES struct LDKPayeePubKey RawInvoice_payee_pub_key(const struct LDKRawInvoice *NONNULL_PTR this_arg);
22186         export function RawInvoice_payee_pub_key(this_arg: number): number {
22187                 if(!isWasmInitialized) {
22188                         throw new Error("initializeWasm() must be awaited first!");
22189                 }
22190                 const nativeResponseValue = wasm.RawInvoice_payee_pub_key(this_arg);
22191                 return nativeResponseValue;
22192         }
22193         // MUST_USE_RES struct LDKSha256 RawInvoice_description_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
22194         export function RawInvoice_description_hash(this_arg: number): number {
22195                 if(!isWasmInitialized) {
22196                         throw new Error("initializeWasm() must be awaited first!");
22197                 }
22198                 const nativeResponseValue = wasm.RawInvoice_description_hash(this_arg);
22199                 return nativeResponseValue;
22200         }
22201         // MUST_USE_RES struct LDKExpiryTime RawInvoice_expiry_time(const struct LDKRawInvoice *NONNULL_PTR this_arg);
22202         export function RawInvoice_expiry_time(this_arg: number): number {
22203                 if(!isWasmInitialized) {
22204                         throw new Error("initializeWasm() must be awaited first!");
22205                 }
22206                 const nativeResponseValue = wasm.RawInvoice_expiry_time(this_arg);
22207                 return nativeResponseValue;
22208         }
22209         // MUST_USE_RES struct LDKMinFinalCltvExpiry RawInvoice_min_final_cltv_expiry(const struct LDKRawInvoice *NONNULL_PTR this_arg);
22210         export function RawInvoice_min_final_cltv_expiry(this_arg: number): number {
22211                 if(!isWasmInitialized) {
22212                         throw new Error("initializeWasm() must be awaited first!");
22213                 }
22214                 const nativeResponseValue = wasm.RawInvoice_min_final_cltv_expiry(this_arg);
22215                 return nativeResponseValue;
22216         }
22217         // MUST_USE_RES struct LDKThirtyTwoBytes RawInvoice_payment_secret(const struct LDKRawInvoice *NONNULL_PTR this_arg);
22218         export function RawInvoice_payment_secret(this_arg: number): Uint8Array {
22219                 if(!isWasmInitialized) {
22220                         throw new Error("initializeWasm() must be awaited first!");
22221                 }
22222                 const nativeResponseValue = wasm.RawInvoice_payment_secret(this_arg);
22223                 return decodeArray(nativeResponseValue);
22224         }
22225         // MUST_USE_RES struct LDKInvoiceFeatures RawInvoice_features(const struct LDKRawInvoice *NONNULL_PTR this_arg);
22226         export function RawInvoice_features(this_arg: number): number {
22227                 if(!isWasmInitialized) {
22228                         throw new Error("initializeWasm() must be awaited first!");
22229                 }
22230                 const nativeResponseValue = wasm.RawInvoice_features(this_arg);
22231                 return nativeResponseValue;
22232         }
22233         // MUST_USE_RES struct LDKCVec_PrivateRouteZ RawInvoice_private_routes(const struct LDKRawInvoice *NONNULL_PTR this_arg);
22234         export function RawInvoice_private_routes(this_arg: number): number[] {
22235                 if(!isWasmInitialized) {
22236                         throw new Error("initializeWasm() must be awaited first!");
22237                 }
22238                 const nativeResponseValue = wasm.RawInvoice_private_routes(this_arg);
22239                 return nativeResponseValue;
22240         }
22241         // MUST_USE_RES struct LDKCOption_u64Z RawInvoice_amount_pico_btc(const struct LDKRawInvoice *NONNULL_PTR this_arg);
22242         export function RawInvoice_amount_pico_btc(this_arg: number): number {
22243                 if(!isWasmInitialized) {
22244                         throw new Error("initializeWasm() must be awaited first!");
22245                 }
22246                 const nativeResponseValue = wasm.RawInvoice_amount_pico_btc(this_arg);
22247                 return nativeResponseValue;
22248         }
22249         // MUST_USE_RES enum LDKCurrency RawInvoice_currency(const struct LDKRawInvoice *NONNULL_PTR this_arg);
22250         export function RawInvoice_currency(this_arg: number): Currency {
22251                 if(!isWasmInitialized) {
22252                         throw new Error("initializeWasm() must be awaited first!");
22253                 }
22254                 const nativeResponseValue = wasm.RawInvoice_currency(this_arg);
22255                 return nativeResponseValue;
22256         }
22257         // MUST_USE_RES struct LDKCResult_PositiveTimestampCreationErrorZ PositiveTimestamp_from_unix_timestamp(uint64_t unix_seconds);
22258         export function PositiveTimestamp_from_unix_timestamp(unix_seconds: number): number {
22259                 if(!isWasmInitialized) {
22260                         throw new Error("initializeWasm() must be awaited first!");
22261                 }
22262                 const nativeResponseValue = wasm.PositiveTimestamp_from_unix_timestamp(unix_seconds);
22263                 return nativeResponseValue;
22264         }
22265         // MUST_USE_RES struct LDKCResult_PositiveTimestampCreationErrorZ PositiveTimestamp_from_system_time(uint64_t time);
22266         export function PositiveTimestamp_from_system_time(time: number): number {
22267                 if(!isWasmInitialized) {
22268                         throw new Error("initializeWasm() must be awaited first!");
22269                 }
22270                 const nativeResponseValue = wasm.PositiveTimestamp_from_system_time(time);
22271                 return nativeResponseValue;
22272         }
22273         // MUST_USE_RES uint64_t PositiveTimestamp_as_unix_timestamp(const struct LDKPositiveTimestamp *NONNULL_PTR this_arg);
22274         export function PositiveTimestamp_as_unix_timestamp(this_arg: number): number {
22275                 if(!isWasmInitialized) {
22276                         throw new Error("initializeWasm() must be awaited first!");
22277                 }
22278                 const nativeResponseValue = wasm.PositiveTimestamp_as_unix_timestamp(this_arg);
22279                 return nativeResponseValue;
22280         }
22281         // MUST_USE_RES uint64_t PositiveTimestamp_as_time(const struct LDKPositiveTimestamp *NONNULL_PTR this_arg);
22282         export function PositiveTimestamp_as_time(this_arg: number): number {
22283                 if(!isWasmInitialized) {
22284                         throw new Error("initializeWasm() must be awaited first!");
22285                 }
22286                 const nativeResponseValue = wasm.PositiveTimestamp_as_time(this_arg);
22287                 return nativeResponseValue;
22288         }
22289         // MUST_USE_RES struct LDKSignedRawInvoice Invoice_into_signed_raw(struct LDKInvoice this_arg);
22290         export function Invoice_into_signed_raw(this_arg: number): number {
22291                 if(!isWasmInitialized) {
22292                         throw new Error("initializeWasm() must be awaited first!");
22293                 }
22294                 const nativeResponseValue = wasm.Invoice_into_signed_raw(this_arg);
22295                 return nativeResponseValue;
22296         }
22297         // MUST_USE_RES struct LDKCResult_NoneSemanticErrorZ Invoice_check_signature(const struct LDKInvoice *NONNULL_PTR this_arg);
22298         export function Invoice_check_signature(this_arg: number): number {
22299                 if(!isWasmInitialized) {
22300                         throw new Error("initializeWasm() must be awaited first!");
22301                 }
22302                 const nativeResponseValue = wasm.Invoice_check_signature(this_arg);
22303                 return nativeResponseValue;
22304         }
22305         // MUST_USE_RES struct LDKCResult_InvoiceSemanticErrorZ Invoice_from_signed(struct LDKSignedRawInvoice signed_invoice);
22306         export function Invoice_from_signed(signed_invoice: number): number {
22307                 if(!isWasmInitialized) {
22308                         throw new Error("initializeWasm() must be awaited first!");
22309                 }
22310                 const nativeResponseValue = wasm.Invoice_from_signed(signed_invoice);
22311                 return nativeResponseValue;
22312         }
22313         // MUST_USE_RES uint64_t Invoice_timestamp(const struct LDKInvoice *NONNULL_PTR this_arg);
22314         export function Invoice_timestamp(this_arg: number): number {
22315                 if(!isWasmInitialized) {
22316                         throw new Error("initializeWasm() must be awaited first!");
22317                 }
22318                 const nativeResponseValue = wasm.Invoice_timestamp(this_arg);
22319                 return nativeResponseValue;
22320         }
22321         // MUST_USE_RES const uint8_t (*Invoice_payment_hash(const struct LDKInvoice *NONNULL_PTR this_arg))[32];
22322         export function Invoice_payment_hash(this_arg: number): Uint8Array {
22323                 if(!isWasmInitialized) {
22324                         throw new Error("initializeWasm() must be awaited first!");
22325                 }
22326                 const nativeResponseValue = wasm.Invoice_payment_hash(this_arg);
22327                 return decodeArray(nativeResponseValue);
22328         }
22329         // MUST_USE_RES struct LDKPublicKey Invoice_payee_pub_key(const struct LDKInvoice *NONNULL_PTR this_arg);
22330         export function Invoice_payee_pub_key(this_arg: number): Uint8Array {
22331                 if(!isWasmInitialized) {
22332                         throw new Error("initializeWasm() must be awaited first!");
22333                 }
22334                 const nativeResponseValue = wasm.Invoice_payee_pub_key(this_arg);
22335                 return decodeArray(nativeResponseValue);
22336         }
22337         // MUST_USE_RES const uint8_t (*Invoice_payment_secret(const struct LDKInvoice *NONNULL_PTR this_arg))[32];
22338         export function Invoice_payment_secret(this_arg: number): Uint8Array {
22339                 if(!isWasmInitialized) {
22340                         throw new Error("initializeWasm() must be awaited first!");
22341                 }
22342                 const nativeResponseValue = wasm.Invoice_payment_secret(this_arg);
22343                 return decodeArray(nativeResponseValue);
22344         }
22345         // MUST_USE_RES struct LDKInvoiceFeatures Invoice_features(const struct LDKInvoice *NONNULL_PTR this_arg);
22346         export function Invoice_features(this_arg: number): number {
22347                 if(!isWasmInitialized) {
22348                         throw new Error("initializeWasm() must be awaited first!");
22349                 }
22350                 const nativeResponseValue = wasm.Invoice_features(this_arg);
22351                 return nativeResponseValue;
22352         }
22353         // MUST_USE_RES struct LDKPublicKey Invoice_recover_payee_pub_key(const struct LDKInvoice *NONNULL_PTR this_arg);
22354         export function Invoice_recover_payee_pub_key(this_arg: number): Uint8Array {
22355                 if(!isWasmInitialized) {
22356                         throw new Error("initializeWasm() must be awaited first!");
22357                 }
22358                 const nativeResponseValue = wasm.Invoice_recover_payee_pub_key(this_arg);
22359                 return decodeArray(nativeResponseValue);
22360         }
22361         // MUST_USE_RES uint64_t Invoice_expiry_time(const struct LDKInvoice *NONNULL_PTR this_arg);
22362         export function Invoice_expiry_time(this_arg: number): number {
22363                 if(!isWasmInitialized) {
22364                         throw new Error("initializeWasm() must be awaited first!");
22365                 }
22366                 const nativeResponseValue = wasm.Invoice_expiry_time(this_arg);
22367                 return nativeResponseValue;
22368         }
22369         // MUST_USE_RES bool Invoice_is_expired(const struct LDKInvoice *NONNULL_PTR this_arg);
22370         export function Invoice_is_expired(this_arg: number): boolean {
22371                 if(!isWasmInitialized) {
22372                         throw new Error("initializeWasm() must be awaited first!");
22373                 }
22374                 const nativeResponseValue = wasm.Invoice_is_expired(this_arg);
22375                 return nativeResponseValue;
22376         }
22377         // MUST_USE_RES uint64_t Invoice_min_final_cltv_expiry(const struct LDKInvoice *NONNULL_PTR this_arg);
22378         export function Invoice_min_final_cltv_expiry(this_arg: number): number {
22379                 if(!isWasmInitialized) {
22380                         throw new Error("initializeWasm() must be awaited first!");
22381                 }
22382                 const nativeResponseValue = wasm.Invoice_min_final_cltv_expiry(this_arg);
22383                 return nativeResponseValue;
22384         }
22385         // MUST_USE_RES struct LDKCVec_PrivateRouteZ Invoice_private_routes(const struct LDKInvoice *NONNULL_PTR this_arg);
22386         export function Invoice_private_routes(this_arg: number): number[] {
22387                 if(!isWasmInitialized) {
22388                         throw new Error("initializeWasm() must be awaited first!");
22389                 }
22390                 const nativeResponseValue = wasm.Invoice_private_routes(this_arg);
22391                 return nativeResponseValue;
22392         }
22393         // MUST_USE_RES struct LDKCVec_RouteHintZ Invoice_route_hints(const struct LDKInvoice *NONNULL_PTR this_arg);
22394         export function Invoice_route_hints(this_arg: number): number[] {
22395                 if(!isWasmInitialized) {
22396                         throw new Error("initializeWasm() must be awaited first!");
22397                 }
22398                 const nativeResponseValue = wasm.Invoice_route_hints(this_arg);
22399                 return nativeResponseValue;
22400         }
22401         // MUST_USE_RES enum LDKCurrency Invoice_currency(const struct LDKInvoice *NONNULL_PTR this_arg);
22402         export function Invoice_currency(this_arg: number): Currency {
22403                 if(!isWasmInitialized) {
22404                         throw new Error("initializeWasm() must be awaited first!");
22405                 }
22406                 const nativeResponseValue = wasm.Invoice_currency(this_arg);
22407                 return nativeResponseValue;
22408         }
22409         // MUST_USE_RES struct LDKCOption_u64Z Invoice_amount_milli_satoshis(const struct LDKInvoice *NONNULL_PTR this_arg);
22410         export function Invoice_amount_milli_satoshis(this_arg: number): number {
22411                 if(!isWasmInitialized) {
22412                         throw new Error("initializeWasm() must be awaited first!");
22413                 }
22414                 const nativeResponseValue = wasm.Invoice_amount_milli_satoshis(this_arg);
22415                 return nativeResponseValue;
22416         }
22417         // MUST_USE_RES struct LDKCResult_DescriptionCreationErrorZ Description_new(struct LDKStr description);
22418         export function Description_new(description: String): number {
22419                 if(!isWasmInitialized) {
22420                         throw new Error("initializeWasm() must be awaited first!");
22421                 }
22422                 const nativeResponseValue = wasm.Description_new(description);
22423                 return nativeResponseValue;
22424         }
22425         // MUST_USE_RES struct LDKStr Description_into_inner(struct LDKDescription this_arg);
22426         export function Description_into_inner(this_arg: number): String {
22427                 if(!isWasmInitialized) {
22428                         throw new Error("initializeWasm() must be awaited first!");
22429                 }
22430                 const nativeResponseValue = wasm.Description_into_inner(this_arg);
22431                 return nativeResponseValue;
22432         }
22433         // MUST_USE_RES struct LDKCResult_ExpiryTimeCreationErrorZ ExpiryTime_from_seconds(uint64_t seconds);
22434         export function ExpiryTime_from_seconds(seconds: number): number {
22435                 if(!isWasmInitialized) {
22436                         throw new Error("initializeWasm() must be awaited first!");
22437                 }
22438                 const nativeResponseValue = wasm.ExpiryTime_from_seconds(seconds);
22439                 return nativeResponseValue;
22440         }
22441         // MUST_USE_RES struct LDKCResult_ExpiryTimeCreationErrorZ ExpiryTime_from_duration(uint64_t duration);
22442         export function ExpiryTime_from_duration(duration: number): number {
22443                 if(!isWasmInitialized) {
22444                         throw new Error("initializeWasm() must be awaited first!");
22445                 }
22446                 const nativeResponseValue = wasm.ExpiryTime_from_duration(duration);
22447                 return nativeResponseValue;
22448         }
22449         // MUST_USE_RES uint64_t ExpiryTime_as_seconds(const struct LDKExpiryTime *NONNULL_PTR this_arg);
22450         export function ExpiryTime_as_seconds(this_arg: number): number {
22451                 if(!isWasmInitialized) {
22452                         throw new Error("initializeWasm() must be awaited first!");
22453                 }
22454                 const nativeResponseValue = wasm.ExpiryTime_as_seconds(this_arg);
22455                 return nativeResponseValue;
22456         }
22457         // MUST_USE_RES uint64_t ExpiryTime_as_duration(const struct LDKExpiryTime *NONNULL_PTR this_arg);
22458         export function ExpiryTime_as_duration(this_arg: number): number {
22459                 if(!isWasmInitialized) {
22460                         throw new Error("initializeWasm() must be awaited first!");
22461                 }
22462                 const nativeResponseValue = wasm.ExpiryTime_as_duration(this_arg);
22463                 return nativeResponseValue;
22464         }
22465         // MUST_USE_RES struct LDKCResult_PrivateRouteCreationErrorZ PrivateRoute_new(struct LDKRouteHint hops);
22466         export function PrivateRoute_new(hops: number): number {
22467                 if(!isWasmInitialized) {
22468                         throw new Error("initializeWasm() must be awaited first!");
22469                 }
22470                 const nativeResponseValue = wasm.PrivateRoute_new(hops);
22471                 return nativeResponseValue;
22472         }
22473         // MUST_USE_RES struct LDKRouteHint PrivateRoute_into_inner(struct LDKPrivateRoute this_arg);
22474         export function PrivateRoute_into_inner(this_arg: number): number {
22475                 if(!isWasmInitialized) {
22476                         throw new Error("initializeWasm() must be awaited first!");
22477                 }
22478                 const nativeResponseValue = wasm.PrivateRoute_into_inner(this_arg);
22479                 return nativeResponseValue;
22480         }
22481         // enum LDKCreationError CreationError_clone(const enum LDKCreationError *NONNULL_PTR orig);
22482         export function CreationError_clone(orig: number): CreationError {
22483                 if(!isWasmInitialized) {
22484                         throw new Error("initializeWasm() must be awaited first!");
22485                 }
22486                 const nativeResponseValue = wasm.CreationError_clone(orig);
22487                 return nativeResponseValue;
22488         }
22489         // enum LDKCreationError CreationError_description_too_long(void);
22490         export function CreationError_description_too_long(): CreationError {
22491                 if(!isWasmInitialized) {
22492                         throw new Error("initializeWasm() must be awaited first!");
22493                 }
22494                 const nativeResponseValue = wasm.CreationError_description_too_long();
22495                 return nativeResponseValue;
22496         }
22497         // enum LDKCreationError CreationError_route_too_long(void);
22498         export function CreationError_route_too_long(): CreationError {
22499                 if(!isWasmInitialized) {
22500                         throw new Error("initializeWasm() must be awaited first!");
22501                 }
22502                 const nativeResponseValue = wasm.CreationError_route_too_long();
22503                 return nativeResponseValue;
22504         }
22505         // enum LDKCreationError CreationError_timestamp_out_of_bounds(void);
22506         export function CreationError_timestamp_out_of_bounds(): CreationError {
22507                 if(!isWasmInitialized) {
22508                         throw new Error("initializeWasm() must be awaited first!");
22509                 }
22510                 const nativeResponseValue = wasm.CreationError_timestamp_out_of_bounds();
22511                 return nativeResponseValue;
22512         }
22513         // enum LDKCreationError CreationError_expiry_time_out_of_bounds(void);
22514         export function CreationError_expiry_time_out_of_bounds(): CreationError {
22515                 if(!isWasmInitialized) {
22516                         throw new Error("initializeWasm() must be awaited first!");
22517                 }
22518                 const nativeResponseValue = wasm.CreationError_expiry_time_out_of_bounds();
22519                 return nativeResponseValue;
22520         }
22521         // enum LDKCreationError CreationError_invalid_amount(void);
22522         export function CreationError_invalid_amount(): CreationError {
22523                 if(!isWasmInitialized) {
22524                         throw new Error("initializeWasm() must be awaited first!");
22525                 }
22526                 const nativeResponseValue = wasm.CreationError_invalid_amount();
22527                 return nativeResponseValue;
22528         }
22529         // bool CreationError_eq(const enum LDKCreationError *NONNULL_PTR a, const enum LDKCreationError *NONNULL_PTR b);
22530         export function CreationError_eq(a: number, b: number): boolean {
22531                 if(!isWasmInitialized) {
22532                         throw new Error("initializeWasm() must be awaited first!");
22533                 }
22534                 const nativeResponseValue = wasm.CreationError_eq(a, b);
22535                 return nativeResponseValue;
22536         }
22537         // struct LDKStr CreationError_to_str(const enum LDKCreationError *NONNULL_PTR o);
22538         export function CreationError_to_str(o: number): String {
22539                 if(!isWasmInitialized) {
22540                         throw new Error("initializeWasm() must be awaited first!");
22541                 }
22542                 const nativeResponseValue = wasm.CreationError_to_str(o);
22543                 return nativeResponseValue;
22544         }
22545         // enum LDKSemanticError SemanticError_clone(const enum LDKSemanticError *NONNULL_PTR orig);
22546         export function SemanticError_clone(orig: number): SemanticError {
22547                 if(!isWasmInitialized) {
22548                         throw new Error("initializeWasm() must be awaited first!");
22549                 }
22550                 const nativeResponseValue = wasm.SemanticError_clone(orig);
22551                 return nativeResponseValue;
22552         }
22553         // enum LDKSemanticError SemanticError_no_payment_hash(void);
22554         export function SemanticError_no_payment_hash(): SemanticError {
22555                 if(!isWasmInitialized) {
22556                         throw new Error("initializeWasm() must be awaited first!");
22557                 }
22558                 const nativeResponseValue = wasm.SemanticError_no_payment_hash();
22559                 return nativeResponseValue;
22560         }
22561         // enum LDKSemanticError SemanticError_multiple_payment_hashes(void);
22562         export function SemanticError_multiple_payment_hashes(): SemanticError {
22563                 if(!isWasmInitialized) {
22564                         throw new Error("initializeWasm() must be awaited first!");
22565                 }
22566                 const nativeResponseValue = wasm.SemanticError_multiple_payment_hashes();
22567                 return nativeResponseValue;
22568         }
22569         // enum LDKSemanticError SemanticError_no_description(void);
22570         export function SemanticError_no_description(): SemanticError {
22571                 if(!isWasmInitialized) {
22572                         throw new Error("initializeWasm() must be awaited first!");
22573                 }
22574                 const nativeResponseValue = wasm.SemanticError_no_description();
22575                 return nativeResponseValue;
22576         }
22577         // enum LDKSemanticError SemanticError_multiple_descriptions(void);
22578         export function SemanticError_multiple_descriptions(): SemanticError {
22579                 if(!isWasmInitialized) {
22580                         throw new Error("initializeWasm() must be awaited first!");
22581                 }
22582                 const nativeResponseValue = wasm.SemanticError_multiple_descriptions();
22583                 return nativeResponseValue;
22584         }
22585         // enum LDKSemanticError SemanticError_no_payment_secret(void);
22586         export function SemanticError_no_payment_secret(): SemanticError {
22587                 if(!isWasmInitialized) {
22588                         throw new Error("initializeWasm() must be awaited first!");
22589                 }
22590                 const nativeResponseValue = wasm.SemanticError_no_payment_secret();
22591                 return nativeResponseValue;
22592         }
22593         // enum LDKSemanticError SemanticError_multiple_payment_secrets(void);
22594         export function SemanticError_multiple_payment_secrets(): SemanticError {
22595                 if(!isWasmInitialized) {
22596                         throw new Error("initializeWasm() must be awaited first!");
22597                 }
22598                 const nativeResponseValue = wasm.SemanticError_multiple_payment_secrets();
22599                 return nativeResponseValue;
22600         }
22601         // enum LDKSemanticError SemanticError_invalid_features(void);
22602         export function SemanticError_invalid_features(): SemanticError {
22603                 if(!isWasmInitialized) {
22604                         throw new Error("initializeWasm() must be awaited first!");
22605                 }
22606                 const nativeResponseValue = wasm.SemanticError_invalid_features();
22607                 return nativeResponseValue;
22608         }
22609         // enum LDKSemanticError SemanticError_invalid_recovery_id(void);
22610         export function SemanticError_invalid_recovery_id(): SemanticError {
22611                 if(!isWasmInitialized) {
22612                         throw new Error("initializeWasm() must be awaited first!");
22613                 }
22614                 const nativeResponseValue = wasm.SemanticError_invalid_recovery_id();
22615                 return nativeResponseValue;
22616         }
22617         // enum LDKSemanticError SemanticError_invalid_signature(void);
22618         export function SemanticError_invalid_signature(): SemanticError {
22619                 if(!isWasmInitialized) {
22620                         throw new Error("initializeWasm() must be awaited first!");
22621                 }
22622                 const nativeResponseValue = wasm.SemanticError_invalid_signature();
22623                 return nativeResponseValue;
22624         }
22625         // enum LDKSemanticError SemanticError_imprecise_amount(void);
22626         export function SemanticError_imprecise_amount(): SemanticError {
22627                 if(!isWasmInitialized) {
22628                         throw new Error("initializeWasm() must be awaited first!");
22629                 }
22630                 const nativeResponseValue = wasm.SemanticError_imprecise_amount();
22631                 return nativeResponseValue;
22632         }
22633         // bool SemanticError_eq(const enum LDKSemanticError *NONNULL_PTR a, const enum LDKSemanticError *NONNULL_PTR b);
22634         export function SemanticError_eq(a: number, b: number): boolean {
22635                 if(!isWasmInitialized) {
22636                         throw new Error("initializeWasm() must be awaited first!");
22637                 }
22638                 const nativeResponseValue = wasm.SemanticError_eq(a, b);
22639                 return nativeResponseValue;
22640         }
22641         // struct LDKStr SemanticError_to_str(const enum LDKSemanticError *NONNULL_PTR o);
22642         export function SemanticError_to_str(o: number): String {
22643                 if(!isWasmInitialized) {
22644                         throw new Error("initializeWasm() must be awaited first!");
22645                 }
22646                 const nativeResponseValue = wasm.SemanticError_to_str(o);
22647                 return nativeResponseValue;
22648         }
22649         // void SignOrCreationError_free(struct LDKSignOrCreationError this_ptr);
22650         export function SignOrCreationError_free(this_ptr: number): void {
22651                 if(!isWasmInitialized) {
22652                         throw new Error("initializeWasm() must be awaited first!");
22653                 }
22654                 const nativeResponseValue = wasm.SignOrCreationError_free(this_ptr);
22655                 // debug statements here
22656         }
22657         // uint64_t SignOrCreationError_clone_ptr(LDKSignOrCreationError *NONNULL_PTR arg);
22658         export function SignOrCreationError_clone_ptr(arg: number): number {
22659                 if(!isWasmInitialized) {
22660                         throw new Error("initializeWasm() must be awaited first!");
22661                 }
22662                 const nativeResponseValue = wasm.SignOrCreationError_clone_ptr(arg);
22663                 return nativeResponseValue;
22664         }
22665         // struct LDKSignOrCreationError SignOrCreationError_clone(const struct LDKSignOrCreationError *NONNULL_PTR orig);
22666         export function SignOrCreationError_clone(orig: number): number {
22667                 if(!isWasmInitialized) {
22668                         throw new Error("initializeWasm() must be awaited first!");
22669                 }
22670                 const nativeResponseValue = wasm.SignOrCreationError_clone(orig);
22671                 return nativeResponseValue;
22672         }
22673         // struct LDKSignOrCreationError SignOrCreationError_sign_error(void);
22674         export function SignOrCreationError_sign_error(): number {
22675                 if(!isWasmInitialized) {
22676                         throw new Error("initializeWasm() must be awaited first!");
22677                 }
22678                 const nativeResponseValue = wasm.SignOrCreationError_sign_error();
22679                 return nativeResponseValue;
22680         }
22681         // struct LDKSignOrCreationError SignOrCreationError_creation_error(enum LDKCreationError a);
22682         export function SignOrCreationError_creation_error(a: CreationError): number {
22683                 if(!isWasmInitialized) {
22684                         throw new Error("initializeWasm() must be awaited first!");
22685                 }
22686                 const nativeResponseValue = wasm.SignOrCreationError_creation_error(a);
22687                 return nativeResponseValue;
22688         }
22689         // bool SignOrCreationError_eq(const struct LDKSignOrCreationError *NONNULL_PTR a, const struct LDKSignOrCreationError *NONNULL_PTR b);
22690         export function SignOrCreationError_eq(a: number, b: number): boolean {
22691                 if(!isWasmInitialized) {
22692                         throw new Error("initializeWasm() must be awaited first!");
22693                 }
22694                 const nativeResponseValue = wasm.SignOrCreationError_eq(a, b);
22695                 return nativeResponseValue;
22696         }
22697         // struct LDKStr SignOrCreationError_to_str(const struct LDKSignOrCreationError *NONNULL_PTR o);
22698         export function SignOrCreationError_to_str(o: number): String {
22699                 if(!isWasmInitialized) {
22700                         throw new Error("initializeWasm() must be awaited first!");
22701                 }
22702                 const nativeResponseValue = wasm.SignOrCreationError_to_str(o);
22703                 return nativeResponseValue;
22704         }
22705         // void InvoicePayer_free(struct LDKInvoicePayer this_obj);
22706         export function InvoicePayer_free(this_obj: number): void {
22707                 if(!isWasmInitialized) {
22708                         throw new Error("initializeWasm() must be awaited first!");
22709                 }
22710                 const nativeResponseValue = wasm.InvoicePayer_free(this_obj);
22711                 // debug statements here
22712         }
22713         // void Payer_free(struct LDKPayer this_ptr);
22714         export function Payer_free(this_ptr: number): void {
22715                 if(!isWasmInitialized) {
22716                         throw new Error("initializeWasm() must be awaited first!");
22717                 }
22718                 const nativeResponseValue = wasm.Payer_free(this_ptr);
22719                 // debug statements here
22720         }
22721         // void Router_free(struct LDKRouter this_ptr);
22722         export function Router_free(this_ptr: number): void {
22723                 if(!isWasmInitialized) {
22724                         throw new Error("initializeWasm() must be awaited first!");
22725                 }
22726                 const nativeResponseValue = wasm.Router_free(this_ptr);
22727                 // debug statements here
22728         }
22729         // void RetryAttempts_free(struct LDKRetryAttempts this_obj);
22730         export function RetryAttempts_free(this_obj: number): void {
22731                 if(!isWasmInitialized) {
22732                         throw new Error("initializeWasm() must be awaited first!");
22733                 }
22734                 const nativeResponseValue = wasm.RetryAttempts_free(this_obj);
22735                 // debug statements here
22736         }
22737         // uintptr_t RetryAttempts_get_a(const struct LDKRetryAttempts *NONNULL_PTR this_ptr);
22738         export function RetryAttempts_get_a(this_ptr: number): number {
22739                 if(!isWasmInitialized) {
22740                         throw new Error("initializeWasm() must be awaited first!");
22741                 }
22742                 const nativeResponseValue = wasm.RetryAttempts_get_a(this_ptr);
22743                 return nativeResponseValue;
22744         }
22745         // void RetryAttempts_set_a(struct LDKRetryAttempts *NONNULL_PTR this_ptr, uintptr_t val);
22746         export function RetryAttempts_set_a(this_ptr: number, val: number): void {
22747                 if(!isWasmInitialized) {
22748                         throw new Error("initializeWasm() must be awaited first!");
22749                 }
22750                 const nativeResponseValue = wasm.RetryAttempts_set_a(this_ptr, val);
22751                 // debug statements here
22752         }
22753         // MUST_USE_RES struct LDKRetryAttempts RetryAttempts_new(uintptr_t a_arg);
22754         export function RetryAttempts_new(a_arg: number): number {
22755                 if(!isWasmInitialized) {
22756                         throw new Error("initializeWasm() must be awaited first!");
22757                 }
22758                 const nativeResponseValue = wasm.RetryAttempts_new(a_arg);
22759                 return nativeResponseValue;
22760         }
22761         // uint64_t RetryAttempts_clone_ptr(LDKRetryAttempts *NONNULL_PTR arg);
22762         export function RetryAttempts_clone_ptr(arg: number): number {
22763                 if(!isWasmInitialized) {
22764                         throw new Error("initializeWasm() must be awaited first!");
22765                 }
22766                 const nativeResponseValue = wasm.RetryAttempts_clone_ptr(arg);
22767                 return nativeResponseValue;
22768         }
22769         // struct LDKRetryAttempts RetryAttempts_clone(const struct LDKRetryAttempts *NONNULL_PTR orig);
22770         export function RetryAttempts_clone(orig: number): number {
22771                 if(!isWasmInitialized) {
22772                         throw new Error("initializeWasm() must be awaited first!");
22773                 }
22774                 const nativeResponseValue = wasm.RetryAttempts_clone(orig);
22775                 return nativeResponseValue;
22776         }
22777         // bool RetryAttempts_eq(const struct LDKRetryAttempts *NONNULL_PTR a, const struct LDKRetryAttempts *NONNULL_PTR b);
22778         export function RetryAttempts_eq(a: number, b: number): boolean {
22779                 if(!isWasmInitialized) {
22780                         throw new Error("initializeWasm() must be awaited first!");
22781                 }
22782                 const nativeResponseValue = wasm.RetryAttempts_eq(a, b);
22783                 return nativeResponseValue;
22784         }
22785         // uint64_t RetryAttempts_hash(const struct LDKRetryAttempts *NONNULL_PTR o);
22786         export function RetryAttempts_hash(o: number): number {
22787                 if(!isWasmInitialized) {
22788                         throw new Error("initializeWasm() must be awaited first!");
22789                 }
22790                 const nativeResponseValue = wasm.RetryAttempts_hash(o);
22791                 return nativeResponseValue;
22792         }
22793         // void PaymentError_free(struct LDKPaymentError this_ptr);
22794         export function PaymentError_free(this_ptr: number): void {
22795                 if(!isWasmInitialized) {
22796                         throw new Error("initializeWasm() must be awaited first!");
22797                 }
22798                 const nativeResponseValue = wasm.PaymentError_free(this_ptr);
22799                 // debug statements here
22800         }
22801         // uint64_t PaymentError_clone_ptr(LDKPaymentError *NONNULL_PTR arg);
22802         export function PaymentError_clone_ptr(arg: number): number {
22803                 if(!isWasmInitialized) {
22804                         throw new Error("initializeWasm() must be awaited first!");
22805                 }
22806                 const nativeResponseValue = wasm.PaymentError_clone_ptr(arg);
22807                 return nativeResponseValue;
22808         }
22809         // struct LDKPaymentError PaymentError_clone(const struct LDKPaymentError *NONNULL_PTR orig);
22810         export function PaymentError_clone(orig: number): number {
22811                 if(!isWasmInitialized) {
22812                         throw new Error("initializeWasm() must be awaited first!");
22813                 }
22814                 const nativeResponseValue = wasm.PaymentError_clone(orig);
22815                 return nativeResponseValue;
22816         }
22817         // struct LDKPaymentError PaymentError_invoice(struct LDKStr a);
22818         export function PaymentError_invoice(a: String): number {
22819                 if(!isWasmInitialized) {
22820                         throw new Error("initializeWasm() must be awaited first!");
22821                 }
22822                 const nativeResponseValue = wasm.PaymentError_invoice(a);
22823                 return nativeResponseValue;
22824         }
22825         // struct LDKPaymentError PaymentError_routing(struct LDKLightningError a);
22826         export function PaymentError_routing(a: number): number {
22827                 if(!isWasmInitialized) {
22828                         throw new Error("initializeWasm() must be awaited first!");
22829                 }
22830                 const nativeResponseValue = wasm.PaymentError_routing(a);
22831                 return nativeResponseValue;
22832         }
22833         // struct LDKPaymentError PaymentError_sending(struct LDKPaymentSendFailure a);
22834         export function PaymentError_sending(a: number): number {
22835                 if(!isWasmInitialized) {
22836                         throw new Error("initializeWasm() must be awaited first!");
22837                 }
22838                 const nativeResponseValue = wasm.PaymentError_sending(a);
22839                 return nativeResponseValue;
22840         }
22841         // MUST_USE_RES struct LDKInvoicePayer InvoicePayer_new(struct LDKPayer payer, struct LDKRouter router, const struct LDKMultiThreadedLockableScore *NONNULL_PTR scorer, struct LDKLogger logger, struct LDKEventHandler event_handler, struct LDKRetryAttempts retry_attempts);
22842         export function InvoicePayer_new(payer: number, router: number, scorer: number, logger: number, event_handler: number, retry_attempts: number): number {
22843                 if(!isWasmInitialized) {
22844                         throw new Error("initializeWasm() must be awaited first!");
22845                 }
22846                 const nativeResponseValue = wasm.InvoicePayer_new(payer, router, scorer, logger, event_handler, retry_attempts);
22847                 return nativeResponseValue;
22848         }
22849         // MUST_USE_RES struct LDKCResult_PaymentIdPaymentErrorZ InvoicePayer_pay_invoice(const struct LDKInvoicePayer *NONNULL_PTR this_arg, const struct LDKInvoice *NONNULL_PTR invoice);
22850         export function InvoicePayer_pay_invoice(this_arg: number, invoice: number): number {
22851                 if(!isWasmInitialized) {
22852                         throw new Error("initializeWasm() must be awaited first!");
22853                 }
22854                 const nativeResponseValue = wasm.InvoicePayer_pay_invoice(this_arg, invoice);
22855                 return nativeResponseValue;
22856         }
22857         // MUST_USE_RES struct LDKCResult_PaymentIdPaymentErrorZ InvoicePayer_pay_zero_value_invoice(const struct LDKInvoicePayer *NONNULL_PTR this_arg, const struct LDKInvoice *NONNULL_PTR invoice, uint64_t amount_msats);
22858         export function InvoicePayer_pay_zero_value_invoice(this_arg: number, invoice: number, amount_msats: number): number {
22859                 if(!isWasmInitialized) {
22860                         throw new Error("initializeWasm() must be awaited first!");
22861                 }
22862                 const nativeResponseValue = wasm.InvoicePayer_pay_zero_value_invoice(this_arg, invoice, amount_msats);
22863                 return nativeResponseValue;
22864         }
22865         // MUST_USE_RES struct LDKCResult_PaymentIdPaymentErrorZ InvoicePayer_pay_pubkey(const struct LDKInvoicePayer *NONNULL_PTR this_arg, struct LDKPublicKey pubkey, struct LDKThirtyTwoBytes payment_preimage, uint64_t amount_msats, uint32_t final_cltv_expiry_delta);
22866         export function InvoicePayer_pay_pubkey(this_arg: number, pubkey: Uint8Array, payment_preimage: Uint8Array, amount_msats: number, final_cltv_expiry_delta: number): number {
22867                 if(!isWasmInitialized) {
22868                         throw new Error("initializeWasm() must be awaited first!");
22869                 }
22870                 const nativeResponseValue = wasm.InvoicePayer_pay_pubkey(this_arg, encodeArray(pubkey), encodeArray(payment_preimage), amount_msats, final_cltv_expiry_delta);
22871                 return nativeResponseValue;
22872         }
22873         // void InvoicePayer_remove_cached_payment(const struct LDKInvoicePayer *NONNULL_PTR this_arg, const uint8_t (*payment_hash)[32]);
22874         export function InvoicePayer_remove_cached_payment(this_arg: number, payment_hash: Uint8Array): void {
22875                 if(!isWasmInitialized) {
22876                         throw new Error("initializeWasm() must be awaited first!");
22877                 }
22878                 const nativeResponseValue = wasm.InvoicePayer_remove_cached_payment(this_arg, encodeArray(payment_hash));
22879                 // debug statements here
22880         }
22881         // struct LDKEventHandler InvoicePayer_as_EventHandler(const struct LDKInvoicePayer *NONNULL_PTR this_arg);
22882         export function InvoicePayer_as_EventHandler(this_arg: number): number {
22883                 if(!isWasmInitialized) {
22884                         throw new Error("initializeWasm() must be awaited first!");
22885                 }
22886                 const nativeResponseValue = wasm.InvoicePayer_as_EventHandler(this_arg);
22887                 return nativeResponseValue;
22888         }
22889         // struct LDKCResult_InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager(const struct LDKChannelManager *NONNULL_PTR channelmanager, struct LDKKeysInterface keys_manager, enum LDKCurrency network, struct LDKCOption_u64Z amt_msat, struct LDKStr description);
22890         export function create_invoice_from_channelmanager(channelmanager: number, keys_manager: number, network: Currency, amt_msat: number, description: String): number {
22891                 if(!isWasmInitialized) {
22892                         throw new Error("initializeWasm() must be awaited first!");
22893                 }
22894                 const nativeResponseValue = wasm.create_invoice_from_channelmanager(channelmanager, keys_manager, network, amt_msat, description);
22895                 return nativeResponseValue;
22896         }
22897         // void DefaultRouter_free(struct LDKDefaultRouter this_obj);
22898         export function DefaultRouter_free(this_obj: number): void {
22899                 if(!isWasmInitialized) {
22900                         throw new Error("initializeWasm() must be awaited first!");
22901                 }
22902                 const nativeResponseValue = wasm.DefaultRouter_free(this_obj);
22903                 // debug statements here
22904         }
22905         // MUST_USE_RES struct LDKDefaultRouter DefaultRouter_new(const struct LDKNetworkGraph *NONNULL_PTR network_graph, struct LDKLogger logger);
22906         export function DefaultRouter_new(network_graph: number, logger: number): number {
22907                 if(!isWasmInitialized) {
22908                         throw new Error("initializeWasm() must be awaited first!");
22909                 }
22910                 const nativeResponseValue = wasm.DefaultRouter_new(network_graph, logger);
22911                 return nativeResponseValue;
22912         }
22913         // struct LDKRouter DefaultRouter_as_Router(const struct LDKDefaultRouter *NONNULL_PTR this_arg);
22914         export function DefaultRouter_as_Router(this_arg: number): number {
22915                 if(!isWasmInitialized) {
22916                         throw new Error("initializeWasm() must be awaited first!");
22917                 }
22918                 const nativeResponseValue = wasm.DefaultRouter_as_Router(this_arg);
22919                 return nativeResponseValue;
22920         }
22921         // struct LDKPayer ChannelManager_as_Payer(const struct LDKChannelManager *NONNULL_PTR this_arg);
22922         export function ChannelManager_as_Payer(this_arg: number): number {
22923                 if(!isWasmInitialized) {
22924                         throw new Error("initializeWasm() must be awaited first!");
22925                 }
22926                 const nativeResponseValue = wasm.ChannelManager_as_Payer(this_arg);
22927                 return nativeResponseValue;
22928         }
22929         // struct LDKCResult_SiPrefixNoneZ SiPrefix_from_str(struct LDKStr s);
22930         export function SiPrefix_from_str(s: String): number {
22931                 if(!isWasmInitialized) {
22932                         throw new Error("initializeWasm() must be awaited first!");
22933                 }
22934                 const nativeResponseValue = wasm.SiPrefix_from_str(s);
22935                 return nativeResponseValue;
22936         }
22937         // struct LDKCResult_InvoiceNoneZ Invoice_from_str(struct LDKStr s);
22938         export function Invoice_from_str(s: String): number {
22939                 if(!isWasmInitialized) {
22940                         throw new Error("initializeWasm() must be awaited first!");
22941                 }
22942                 const nativeResponseValue = wasm.Invoice_from_str(s);
22943                 return nativeResponseValue;
22944         }
22945         // struct LDKCResult_SignedRawInvoiceNoneZ SignedRawInvoice_from_str(struct LDKStr s);
22946         export function SignedRawInvoice_from_str(s: String): number {
22947                 if(!isWasmInitialized) {
22948                         throw new Error("initializeWasm() must be awaited first!");
22949                 }
22950                 const nativeResponseValue = wasm.SignedRawInvoice_from_str(s);
22951                 return nativeResponseValue;
22952         }
22953         // struct LDKStr Invoice_to_str(const struct LDKInvoice *NONNULL_PTR o);
22954         export function Invoice_to_str(o: number): String {
22955                 if(!isWasmInitialized) {
22956                         throw new Error("initializeWasm() must be awaited first!");
22957                 }
22958                 const nativeResponseValue = wasm.Invoice_to_str(o);
22959                 return nativeResponseValue;
22960         }
22961         // struct LDKStr SignedRawInvoice_to_str(const struct LDKSignedRawInvoice *NONNULL_PTR o);
22962         export function SignedRawInvoice_to_str(o: number): String {
22963                 if(!isWasmInitialized) {
22964                         throw new Error("initializeWasm() must be awaited first!");
22965                 }
22966                 const nativeResponseValue = wasm.SignedRawInvoice_to_str(o);
22967                 return nativeResponseValue;
22968         }
22969         // struct LDKStr Currency_to_str(const enum LDKCurrency *NONNULL_PTR o);
22970         export function Currency_to_str(o: number): String {
22971                 if(!isWasmInitialized) {
22972                         throw new Error("initializeWasm() must be awaited first!");
22973                 }
22974                 const nativeResponseValue = wasm.Currency_to_str(o);
22975                 return nativeResponseValue;
22976         }
22977         // struct LDKStr SiPrefix_to_str(const enum LDKSiPrefix *NONNULL_PTR o);
22978         export function SiPrefix_to_str(o: number): String {
22979                 if(!isWasmInitialized) {
22980                         throw new Error("initializeWasm() must be awaited first!");
22981                 }
22982                 const nativeResponseValue = wasm.SiPrefix_to_str(o);
22983                 return nativeResponseValue;
22984         }
22985
22986         export async function initializeWasm(allowDoubleInitialization: boolean = false): Promise<void> {
22987             if(isWasmInitialized && !allowDoubleInitialization) {
22988                 return;
22989             }
22990             const wasmInstance = await WebAssembly.instantiate(wasmModule, imports)
22991             wasm = wasmInstance.exports;
22992             isWasmInitialized = true;
22993         }
22994