Update auto-generated bindings
[ldk-java] / ts / bindings.ts
1
2 import * as fs from 'fs';
3 const source = fs.readFileSync('./ldk.wasm');
4
5 const memory = new WebAssembly.Memory({initial: 256});
6 const wasmModule = new WebAssembly.Module(source);
7
8 const imports: any = {};
9 imports.env = {};
10
11 imports.env.memoryBase = 0;
12 imports.env.memory = memory;
13 imports.env.tableBase = 0;
14 imports.env.table = new WebAssembly.Table({initial: 4, element: 'anyfunc'});
15
16 imports.env["abort"] = function () {
17     console.error("ABORT");
18 };
19
20 let wasm = null;
21 let isWasmInitialized: boolean = false;
22
23
24 // WASM CODEC
25
26 const nextMultipleOfFour = (value: number) => {
27     return Math.ceil(value / 4) * 4;
28 }
29
30 const encodeUint8Array = (inputArray) => {
31         const cArrayPointer = wasm.TS_malloc(inputArray.length + 4);
32         const arrayLengthView = new Uint32Array(memory.buffer, cArrayPointer, 1);
33     arrayLengthView[0] = inputArray.length;
34         const arrayMemoryView = new Uint8Array(memory.buffer, cArrayPointer + 4, inputArray.length);
35         arrayMemoryView.set(inputArray);
36         return cArrayPointer;
37 }
38
39 const encodeUint32Array = (inputArray) => {
40         const cArrayPointer = wasm.TS_malloc((inputArray.length + 1) * 4);
41         const arrayMemoryView = new Uint32Array(memory.buffer, cArrayPointer, inputArray.length);
42         arrayMemoryView.set(inputArray, 1);
43     arrayMemoryView[0] = inputArray.length;
44         return cArrayPointer;
45 }
46
47 const getArrayLength = (arrayPointer) => {
48         const arraySizeViewer = new Uint32Array(
49                 memory.buffer, // value
50                 arrayPointer, // offset
51                 1 // one int
52         );
53         return arraySizeViewer[0];
54 }
55 const decodeUint8Array = (arrayPointer, free = true) => {
56         const arraySize = getArrayLength(arrayPointer);
57         const actualArrayViewer = new Uint8Array(
58                 memory.buffer, // value
59                 arrayPointer + 4, // offset (ignoring length bytes)
60                 arraySize // uint8 count
61         );
62         // Clone the contents, TODO: In the future we should wrap the Viewer in a class that
63         // will free the underlying memory when it becomes unreachable instead of copying here.
64         const actualArray = actualArrayViewer.slice(0, arraySize);
65         if (free) {
66                 wasm.TS_free(arrayPointer);
67         }
68         return actualArray;
69 }
70 const decodeUint32Array = (arrayPointer, free = true) => {
71         const arraySize = getArrayLength(arrayPointer);
72         const actualArrayViewer = new Uint32Array(
73                 memory.buffer, // value
74                 arrayPointer + 4, // offset (ignoring length bytes)
75                 arraySize // uint32 count
76         );
77         // Clone the contents, TODO: In the future we should wrap the Viewer in a class that
78         // will free the underlying memory when it becomes unreachable instead of copying here.
79         const actualArray = actualArrayViewer.slice(0, arraySize);
80         if (free) {
81                 wasm.TS_free(arrayPointer);
82         }
83         return actualArray;
84 }
85
86 const encodeString = (string) => {
87     // make malloc count divisible by 4
88     const memoryNeed = nextMultipleOfFour(string.length + 1);
89     const stringPointer = wasm.TS_malloc(memoryNeed);
90     const stringMemoryView = new Uint8Array(
91         memory.buffer, // value
92         stringPointer, // offset
93         string.length + 1 // length
94     );
95     for (let i = 0; i < string.length; i++) {
96         stringMemoryView[i] = string.charCodeAt(i);
97     }
98     stringMemoryView[string.length] = 0;
99     return stringPointer;
100 }
101
102 const decodeString = (stringPointer, free = true) => {
103     const memoryView = new Uint8Array(memory.buffer, stringPointer);
104     let cursor = 0;
105     let result = '';
106
107     while (memoryView[cursor] !== 0) {
108         result += String.fromCharCode(memoryView[cursor]);
109         cursor++;
110     }
111
112     if (free) {
113         wasm.wasm_free(stringPointer);
114     }
115
116     return result;
117 };
118
119 export class VecOrSliceDef {
120     public dataptr: number;
121     public datalen: number;
122     public stride: number;
123     public constructor(dataptr: number, datalen: number, stride: number) {
124         this.dataptr = dataptr;
125         this.datalen = datalen;
126         this.stride = stride;
127     }
128 }
129
130 /*
131 TODO: load WASM file
132 static {
133     System.loadLibrary("lightningjni");
134     init(java.lang.Enum.class, VecOrSliceDef.class);
135     init_class_cache();
136 }
137
138 static native void init(java.lang.Class c, java.lang.Class slicedef);
139 static native void init_class_cache();
140
141 public static native boolean deref_bool(long ptr);
142 public static native long deref_long(long ptr);
143 public static native void free_heap_ptr(long ptr);
144 public static native byte[] read_bytes(long ptr, long len);
145 public static native byte[] get_u8_slice_bytes(long slice_ptr);
146 public static native long bytes_to_u8_vec(byte[] bytes);
147 public static native long new_txpointer_copy_data(byte[] txdata);
148 public static native void txpointer_free(long ptr);
149 public static native byte[] txpointer_get_buffer(long ptr);
150 public static native long vec_slice_len(long vec);
151 public static native long new_empty_slice_vec();
152 */
153
154         public static native long LDKCVec_u8Z_new(number[] elems);
155         public static native boolean LDKCResult_ChannelConfigDecodeErrorZ_result_ok(long arg);
156         public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_ok(long arg);
157         public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_err(long arg);
158         public static native boolean LDKCResult_OutPointDecodeErrorZ_result_ok(long arg);
159         public static native number LDKCResult_OutPointDecodeErrorZ_get_ok(long arg);
160         public static native number LDKCResult_OutPointDecodeErrorZ_get_err(long arg);
161         public static native boolean LDKCResult_SecretKeyErrorZ_result_ok(long arg);
162         public static native Uint8Array LDKCResult_SecretKeyErrorZ_get_ok(long arg);
163         public static native LDKSecp256k1Error LDKCResult_SecretKeyErrorZ_get_err(long arg);
164         public static native boolean LDKCResult_PublicKeyErrorZ_result_ok(long arg);
165         public static native Uint8Array LDKCResult_PublicKeyErrorZ_get_ok(long arg);
166         public static native LDKSecp256k1Error LDKCResult_PublicKeyErrorZ_get_err(long arg);
167         public static native boolean LDKCResult_TxCreationKeysDecodeErrorZ_result_ok(long arg);
168         public static native number LDKCResult_TxCreationKeysDecodeErrorZ_get_ok(long arg);
169         public static native number LDKCResult_TxCreationKeysDecodeErrorZ_get_err(long arg);
170         public static native boolean LDKCResult_ChannelPublicKeysDecodeErrorZ_result_ok(long arg);
171         public static native number LDKCResult_ChannelPublicKeysDecodeErrorZ_get_ok(long arg);
172         public static native number LDKCResult_ChannelPublicKeysDecodeErrorZ_get_err(long arg);
173         public static native boolean LDKCResult_TxCreationKeysErrorZ_result_ok(long arg);
174         public static native number LDKCResult_TxCreationKeysErrorZ_get_ok(long arg);
175         public static native LDKSecp256k1Error LDKCResult_TxCreationKeysErrorZ_get_err(long arg);
176         public static class LDKCOption_u32Z {
177                 private LDKCOption_u32Z() {}
178                 export class Some extends LDKCOption_u32Z {
179                         public number some;
180                         Some(number some) { this.some = some; }
181                 }
182                 export class None extends LDKCOption_u32Z {
183                         None() { }
184                 }
185                 static native void init();
186         }
187         static { LDKCOption_u32Z.init(); }
188         public static native LDKCOption_u32Z LDKCOption_u32Z_ref_from_ptr(long ptr);
189         public static native boolean LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_result_ok(long arg);
190         public static native number LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_ok(long arg);
191         public static native number LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(long arg);
192         public static native boolean LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_result_ok(long arg);
193         public static native number LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_ok(long arg);
194         public static native number LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(long arg);
195         public static native boolean LDKCResult_ChannelTransactionParametersDecodeErrorZ_result_ok(long arg);
196         public static native number LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_ok(long arg);
197         public static native number LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_err(long arg);
198         public static native boolean LDKCResult_HolderCommitmentTransactionDecodeErrorZ_result_ok(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 boolean LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_result_ok(long arg);
202         public static native number LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_ok(long arg);
203         public static native number LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(long arg);
204         public static native boolean LDKCResult_CommitmentTransactionDecodeErrorZ_result_ok(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 boolean LDKCResult_TrustedCommitmentTransactionNoneZ_result_ok(long arg);
208         public static native number LDKCResult_TrustedCommitmentTransactionNoneZ_get_ok(long arg);
209         public static native void LDKCResult_TrustedCommitmentTransactionNoneZ_get_err(long arg);
210         public static native boolean LDKCResult_CVec_SignatureZNoneZ_result_ok(long arg);
211         public static native Uint8Array[] LDKCResult_CVec_SignatureZNoneZ_get_ok(long arg);
212         public static native void LDKCResult_CVec_SignatureZNoneZ_get_err(long arg);
213         public static native boolean LDKCResult_ChannelMonitorUpdateDecodeErrorZ_result_ok(long arg);
214         public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(long arg);
215         public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_err(long arg);
216         public static native boolean LDKCResult_HTLCUpdateDecodeErrorZ_result_ok(long arg);
217         public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_ok(long arg);
218         public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_err(long arg);
219         public static native boolean LDKCResult_NoneMonitorUpdateErrorZ_result_ok(long arg);
220         public static native void LDKCResult_NoneMonitorUpdateErrorZ_get_ok(long arg);
221         public static native number LDKCResult_NoneMonitorUpdateErrorZ_get_err(long arg);
222         public static native long LDKC2Tuple_OutPointScriptZ_new(number a, Uint8Array b);
223         public static native number LDKC2Tuple_OutPointScriptZ_get_a(long ptr);
224         public static native Uint8Array LDKC2Tuple_OutPointScriptZ_get_b(long ptr);
225         public static native long LDKC2Tuple_u32ScriptZ_new(number a, Uint8Array b);
226         public static native number LDKC2Tuple_u32ScriptZ_get_a(long ptr);
227         public static native Uint8Array LDKC2Tuple_u32ScriptZ_get_b(long ptr);
228         public static native long LDKCVec_C2Tuple_u32ScriptZZ_new(number[] elems);
229         public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(Uint8Array a, number[] b);
230         public static native Uint8Array LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(long ptr);
231         public static native number[] LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(long ptr);
232         public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_new(number[] elems);
233         public static class LDKMonitorEvent {
234                 private LDKMonitorEvent() {}
235                 export class HTLCEvent extends LDKMonitorEvent {
236                         public number htlc_event;
237                         HTLCEvent(number htlc_event) { this.htlc_event = htlc_event; }
238                 }
239                 export class CommitmentTxBroadcasted extends LDKMonitorEvent {
240                         public number commitment_tx_broadcasted;
241                         CommitmentTxBroadcasted(number commitment_tx_broadcasted) { this.commitment_tx_broadcasted = commitment_tx_broadcasted; }
242                 }
243                 static native void init();
244         }
245         static { LDKMonitorEvent.init(); }
246         public static native LDKMonitorEvent LDKMonitorEvent_ref_from_ptr(long ptr);
247         public static native long LDKCVec_MonitorEventZ_new(number[] elems);
248         public static class LDKSpendableOutputDescriptor {
249                 private LDKSpendableOutputDescriptor() {}
250                 export class StaticOutput extends LDKSpendableOutputDescriptor {
251                         public number outpoint;
252                         public number output;
253                         StaticOutput(number outpoint, number output) { this.outpoint = outpoint; this.output = output; }
254                 }
255                 export class DelayedPaymentOutput extends LDKSpendableOutputDescriptor {
256                         public number delayed_payment_output;
257                         DelayedPaymentOutput(number delayed_payment_output) { this.delayed_payment_output = delayed_payment_output; }
258                 }
259                 export class StaticPaymentOutput extends LDKSpendableOutputDescriptor {
260                         public number static_payment_output;
261                         StaticPaymentOutput(number static_payment_output) { this.static_payment_output = static_payment_output; }
262                 }
263                 static native void init();
264         }
265         static { LDKSpendableOutputDescriptor.init(); }
266         public static native LDKSpendableOutputDescriptor LDKSpendableOutputDescriptor_ref_from_ptr(long ptr);
267         public static native long LDKCVec_SpendableOutputDescriptorZ_new(number[] elems);
268         public static class LDKEvent {
269                 private LDKEvent() {}
270                 export class FundingGenerationReady extends LDKEvent {
271                         public Uint8Array temporary_channel_id;
272                         public number channel_value_satoshis;
273                         public Uint8Array output_script;
274                         public number user_channel_id;
275                         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; }
276                 }
277                 export class PaymentReceived extends LDKEvent {
278                         public Uint8Array payment_hash;
279                         public Uint8Array payment_secret;
280                         public number amt;
281                         PaymentReceived(Uint8Array payment_hash, Uint8Array payment_secret, number amt) { this.payment_hash = payment_hash; this.payment_secret = payment_secret; this.amt = amt; }
282                 }
283                 export class PaymentSent extends LDKEvent {
284                         public Uint8Array payment_preimage;
285                         PaymentSent(Uint8Array payment_preimage) { this.payment_preimage = payment_preimage; }
286                 }
287                 export class PaymentFailed extends LDKEvent {
288                         public Uint8Array payment_hash;
289                         public boolean rejected_by_dest;
290                         PaymentFailed(Uint8Array payment_hash, boolean rejected_by_dest) { this.payment_hash = payment_hash; this.rejected_by_dest = rejected_by_dest; }
291                 }
292                 export class PendingHTLCsForwardable extends LDKEvent {
293                         public number time_forwardable;
294                         PendingHTLCsForwardable(number time_forwardable) { this.time_forwardable = time_forwardable; }
295                 }
296                 export class SpendableOutputs extends LDKEvent {
297                         public number[] outputs;
298                         SpendableOutputs(number[] outputs) { this.outputs = outputs; }
299                 }
300                 static native void init();
301         }
302         static { LDKEvent.init(); }
303         public static native LDKEvent LDKEvent_ref_from_ptr(long ptr);
304         public static native long LDKCVec_EventZ_new(number[] elems);
305         public static native long LDKC2Tuple_usizeTransactionZ_new(number a, Uint8Array b);
306         public static native number LDKC2Tuple_usizeTransactionZ_get_a(long ptr);
307         public static native Uint8Array LDKC2Tuple_usizeTransactionZ_get_b(long ptr);
308         public static native long LDKCVec_C2Tuple_usizeTransactionZZ_new(number[] elems);
309         public static native long LDKC2Tuple_u32TxOutZ_new(number a, number b);
310         public static native number LDKC2Tuple_u32TxOutZ_get_a(long ptr);
311         public static native number LDKC2Tuple_u32TxOutZ_get_b(long ptr);
312         public static native long LDKCVec_C2Tuple_u32TxOutZZ_new(number[] elems);
313         public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(Uint8Array a, number[] b);
314         public static native Uint8Array LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(long ptr);
315         public static native number[] LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(long ptr);
316         public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_new(number[] elems);
317         public static native boolean LDKCResult_NoneChannelMonitorUpdateErrZ_result_ok(long arg);
318         public static native void LDKCResult_NoneChannelMonitorUpdateErrZ_get_ok(long arg);
319         public static native LDKChannelMonitorUpdateErr LDKCResult_NoneChannelMonitorUpdateErrZ_get_err(long arg);
320         public static native long LDKC2Tuple_SignatureCVec_SignatureZZ_new(Uint8Array a, Uint8Array[] b);
321         public static native Uint8Array LDKC2Tuple_SignatureCVec_SignatureZZ_get_a(long ptr);
322         public static native Uint8Array[] LDKC2Tuple_SignatureCVec_SignatureZZ_get_b(long ptr);
323         public static native boolean LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_result_ok(long arg);
324         public static native number LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(long arg);
325         public static native void LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(long arg);
326         public static native boolean LDKCResult_SignatureNoneZ_result_ok(long arg);
327         public static native Uint8Array LDKCResult_SignatureNoneZ_get_ok(long arg);
328         public static native void LDKCResult_SignatureNoneZ_get_err(long arg);
329
330
331
332 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
333
334                 export interface LDKBaseSign {
335                         get_per_commitment_point (idx: number): Uint8Array;
336                         release_commitment_secret (idx: number): Uint8Array;
337                         channel_keys_id (): Uint8Array;
338                         sign_counterparty_commitment (commitment_tx: number): number;
339                         sign_holder_commitment_and_htlcs (commitment_tx: number): number;
340                         sign_justice_transaction (justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number;
341                         sign_counterparty_htlc_transaction (htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number;
342                         sign_closing_transaction (closing_tx: Uint8Array): number;
343                         sign_channel_announcement (msg: number): number;
344                         ready_channel (channel_parameters: number): void;
345                 }
346
347                 export function LDKBaseSign_new(impl: LDKBaseSign, pubkeys: number): number {
348             throw new Error('unimplemented'); // TODO: bind to WASM
349         }
350
351 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
352
353
354         // LDKPublicKey BaseSign_get_per_commitment_point LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx
355         export function BaseSign_get_per_commitment_point(this_arg: number, idx: number): Uint8Array {
356                 if(!isWasmInitialized) {
357                         throw new Error("initializeWasm() must be awaited first!");
358                 }
359                 const nativeResponseValue = wasm.BaseSign_get_per_commitment_point(this_arg, idx);
360                 return decodeArray(nativeResponseValue);
361         }
362         // LDKThirtyTwoBytes BaseSign_release_commitment_secret LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx
363         export function BaseSign_release_commitment_secret(this_arg: number, idx: number): Uint8Array {
364                 if(!isWasmInitialized) {
365                         throw new Error("initializeWasm() must be awaited first!");
366                 }
367                 const nativeResponseValue = wasm.BaseSign_release_commitment_secret(this_arg, idx);
368                 return decodeArray(nativeResponseValue);
369         }
370         // LDKThirtyTwoBytes BaseSign_channel_keys_id LDKBaseSign *NONNULL_PTR this_arg
371         export function BaseSign_channel_keys_id(this_arg: number): Uint8Array {
372                 if(!isWasmInitialized) {
373                         throw new Error("initializeWasm() must be awaited first!");
374                 }
375                 const nativeResponseValue = wasm.BaseSign_channel_keys_id(this_arg);
376                 return decodeArray(nativeResponseValue);
377         }
378         // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ BaseSign_sign_counterparty_commitment LDKBaseSign *NONNULL_PTR this_arg, const struct LDKCommitmentTransaction *NONNULL_PTR commitment_tx
379         export function BaseSign_sign_counterparty_commitment(this_arg: number, commitment_tx: number): number {
380                 if(!isWasmInitialized) {
381                         throw new Error("initializeWasm() must be awaited first!");
382                 }
383                 const nativeResponseValue = wasm.BaseSign_sign_counterparty_commitment(this_arg, commitment_tx);
384                 return nativeResponseValue;
385         }
386         // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ BaseSign_sign_holder_commitment_and_htlcs LDKBaseSign *NONNULL_PTR this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR commitment_tx
387         export function BaseSign_sign_holder_commitment_and_htlcs(this_arg: number, commitment_tx: number): number {
388                 if(!isWasmInitialized) {
389                         throw new Error("initializeWasm() must be awaited first!");
390                 }
391                 const nativeResponseValue = wasm.BaseSign_sign_holder_commitment_and_htlcs(this_arg, commitment_tx);
392                 return nativeResponseValue;
393         }
394         // LDKCResult_SignatureNoneZ BaseSign_sign_justice_transaction 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
395         export function BaseSign_sign_justice_transaction(this_arg: number, justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number {
396                 if(!isWasmInitialized) {
397                         throw new Error("initializeWasm() must be awaited first!");
398                 }
399                 const nativeResponseValue = wasm.BaseSign_sign_justice_transaction(this_arg, encodeArray(justice_tx), input, amount, encodeArray(per_commitment_key), htlc);
400                 return nativeResponseValue;
401         }
402         // 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
403         export function BaseSign_sign_counterparty_htlc_transaction(this_arg: number, htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number {
404                 if(!isWasmInitialized) {
405                         throw new Error("initializeWasm() must be awaited first!");
406                 }
407                 const nativeResponseValue = wasm.BaseSign_sign_counterparty_htlc_transaction(this_arg, encodeArray(htlc_tx), input, amount, encodeArray(per_commitment_point), htlc);
408                 return nativeResponseValue;
409         }
410         // LDKCResult_SignatureNoneZ BaseSign_sign_closing_transaction LDKBaseSign *NONNULL_PTR this_arg, struct LDKTransaction closing_tx
411         export function BaseSign_sign_closing_transaction(this_arg: number, closing_tx: Uint8Array): number {
412                 if(!isWasmInitialized) {
413                         throw new Error("initializeWasm() must be awaited first!");
414                 }
415                 const nativeResponseValue = wasm.BaseSign_sign_closing_transaction(this_arg, encodeArray(closing_tx));
416                 return nativeResponseValue;
417         }
418         // LDKCResult_SignatureNoneZ BaseSign_sign_channel_announcement LDKBaseSign *NONNULL_PTR this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg
419         export function BaseSign_sign_channel_announcement(this_arg: number, msg: number): number {
420                 if(!isWasmInitialized) {
421                         throw new Error("initializeWasm() must be awaited first!");
422                 }
423                 const nativeResponseValue = wasm.BaseSign_sign_channel_announcement(this_arg, msg);
424                 return nativeResponseValue;
425         }
426         // void BaseSign_ready_channel LDKBaseSign *NONNULL_PTR this_arg, const struct LDKChannelTransactionParameters *NONNULL_PTR channel_parameters
427         export function BaseSign_ready_channel(this_arg: number, channel_parameters: number): void {
428                 if(!isWasmInitialized) {
429                         throw new Error("initializeWasm() must be awaited first!");
430                 }
431                 const nativeResponseValue = wasm.BaseSign_ready_channel(this_arg, channel_parameters);
432                 // debug statements here
433         }
434         // LDKChannelPublicKeys BaseSign_get_pubkeys LDKBaseSign *NONNULL_PTR this_arg
435         export function BaseSign_get_pubkeys(this_arg: number): number {
436                 if(!isWasmInitialized) {
437                         throw new Error("initializeWasm() must be awaited first!");
438                 }
439                 const nativeResponseValue = wasm.BaseSign_get_pubkeys(this_arg);
440                 return nativeResponseValue;
441         }
442
443
444
445 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
446
447                 export interface LDKSign {
448                         write (): Uint8Array;
449                 }
450
451                 export function LDKSign_new(impl: LDKSign, BaseSign: LDKBaseSign, pubkeys: number): number {
452             throw new Error('unimplemented'); // TODO: bind to WASM
453         }
454
455 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
456
457
458         // LDKCVec_u8Z Sign_write LDKSign *NONNULL_PTR this_arg
459         export function Sign_write(this_arg: number): Uint8Array {
460                 if(!isWasmInitialized) {
461                         throw new Error("initializeWasm() must be awaited first!");
462                 }
463                 const nativeResponseValue = wasm.Sign_write(this_arg);
464                 return decodeArray(nativeResponseValue);
465         }
466         public static native long LDKC2Tuple_BlockHashChannelMonitorZ_new(Uint8Array a, number b);
467         public static native Uint8Array LDKC2Tuple_BlockHashChannelMonitorZ_get_a(long ptr);
468         public static native number LDKC2Tuple_BlockHashChannelMonitorZ_get_b(long ptr);
469         public static native boolean LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_result_ok(long arg);
470         public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(long arg);
471         public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(long arg);
472         public static native long LDKCVec_RouteHopZ_new(number[] elems);
473         public static native boolean LDKCResult_RouteDecodeErrorZ_result_ok(long arg);
474         public static native number LDKCResult_RouteDecodeErrorZ_get_ok(long arg);
475         public static native number LDKCResult_RouteDecodeErrorZ_get_err(long arg);
476         public static class LDKCOption_u64Z {
477                 private LDKCOption_u64Z() {}
478                 export class Some extends LDKCOption_u64Z {
479                         public number some;
480                         Some(number some) { this.some = some; }
481                 }
482                 export class None extends LDKCOption_u64Z {
483                         None() { }
484                 }
485                 static native void init();
486         }
487         static { LDKCOption_u64Z.init(); }
488         public static native LDKCOption_u64Z LDKCOption_u64Z_ref_from_ptr(long ptr);
489         public static native long LDKCVec_ChannelDetailsZ_new(number[] elems);
490         public static native long LDKCVec_RouteHintZ_new(number[] elems);
491         public static native boolean LDKCResult_RouteLightningErrorZ_result_ok(long arg);
492         public static native number LDKCResult_RouteLightningErrorZ_get_ok(long arg);
493         public static native number LDKCResult_RouteLightningErrorZ_get_err(long arg);
494         public static class LDKErrorAction {
495                 private LDKErrorAction() {}
496                 export class DisconnectPeer extends LDKErrorAction {
497                         public number msg;
498                         DisconnectPeer(number msg) { this.msg = msg; }
499                 }
500                 export class IgnoreError extends LDKErrorAction {
501                         IgnoreError() { }
502                 }
503                 export class SendErrorMessage extends LDKErrorAction {
504                         public number msg;
505                         SendErrorMessage(number msg) { this.msg = msg; }
506                 }
507                 static native void init();
508         }
509         static { LDKErrorAction.init(); }
510         public static native LDKErrorAction LDKErrorAction_ref_from_ptr(long ptr);
511         public static class LDKHTLCFailChannelUpdate {
512                 private LDKHTLCFailChannelUpdate() {}
513                 export class ChannelUpdateMessage extends LDKHTLCFailChannelUpdate {
514                         public number msg;
515                         ChannelUpdateMessage(number msg) { this.msg = msg; }
516                 }
517                 export class ChannelClosed extends LDKHTLCFailChannelUpdate {
518                         public number short_channel_id;
519                         public boolean is_permanent;
520                         ChannelClosed(number short_channel_id, boolean is_permanent) { this.short_channel_id = short_channel_id; this.is_permanent = is_permanent; }
521                 }
522                 export class NodeFailure extends LDKHTLCFailChannelUpdate {
523                         public Uint8Array node_id;
524                         public boolean is_permanent;
525                         NodeFailure(Uint8Array node_id, boolean is_permanent) { this.node_id = node_id; this.is_permanent = is_permanent; }
526                 }
527                 static native void init();
528         }
529         static { LDKHTLCFailChannelUpdate.init(); }
530         public static native LDKHTLCFailChannelUpdate LDKHTLCFailChannelUpdate_ref_from_ptr(long ptr);
531         public static class LDKMessageSendEvent {
532                 private LDKMessageSendEvent() {}
533                 export class SendAcceptChannel extends LDKMessageSendEvent {
534                         public Uint8Array node_id;
535                         public number msg;
536                         SendAcceptChannel(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
537                 }
538                 export class SendOpenChannel extends LDKMessageSendEvent {
539                         public Uint8Array node_id;
540                         public number msg;
541                         SendOpenChannel(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
542                 }
543                 export class SendFundingCreated extends LDKMessageSendEvent {
544                         public Uint8Array node_id;
545                         public number msg;
546                         SendFundingCreated(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
547                 }
548                 export class SendFundingSigned extends LDKMessageSendEvent {
549                         public Uint8Array node_id;
550                         public number msg;
551                         SendFundingSigned(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
552                 }
553                 export class SendFundingLocked extends LDKMessageSendEvent {
554                         public Uint8Array node_id;
555                         public number msg;
556                         SendFundingLocked(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
557                 }
558                 export class SendAnnouncementSignatures extends LDKMessageSendEvent {
559                         public Uint8Array node_id;
560                         public number msg;
561                         SendAnnouncementSignatures(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
562                 }
563                 export class UpdateHTLCs extends LDKMessageSendEvent {
564                         public Uint8Array node_id;
565                         public number updates;
566                         UpdateHTLCs(Uint8Array node_id, number updates) { this.node_id = node_id; this.updates = updates; }
567                 }
568                 export class SendRevokeAndACK extends LDKMessageSendEvent {
569                         public Uint8Array node_id;
570                         public number msg;
571                         SendRevokeAndACK(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
572                 }
573                 export class SendClosingSigned extends LDKMessageSendEvent {
574                         public Uint8Array node_id;
575                         public number msg;
576                         SendClosingSigned(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
577                 }
578                 export class SendShutdown extends LDKMessageSendEvent {
579                         public Uint8Array node_id;
580                         public number msg;
581                         SendShutdown(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
582                 }
583                 export class SendChannelReestablish extends LDKMessageSendEvent {
584                         public Uint8Array node_id;
585                         public number msg;
586                         SendChannelReestablish(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
587                 }
588                 export class BroadcastChannelAnnouncement extends LDKMessageSendEvent {
589                         public number msg;
590                         public number update_msg;
591                         BroadcastChannelAnnouncement(number msg, number update_msg) { this.msg = msg; this.update_msg = update_msg; }
592                 }
593                 export class BroadcastNodeAnnouncement extends LDKMessageSendEvent {
594                         public number msg;
595                         BroadcastNodeAnnouncement(number msg) { this.msg = msg; }
596                 }
597                 export class BroadcastChannelUpdate extends LDKMessageSendEvent {
598                         public number msg;
599                         BroadcastChannelUpdate(number msg) { this.msg = msg; }
600                 }
601                 export class HandleError extends LDKMessageSendEvent {
602                         public Uint8Array node_id;
603                         public number action;
604                         HandleError(Uint8Array node_id, number action) { this.node_id = node_id; this.action = action; }
605                 }
606                 export class PaymentFailureNetworkUpdate extends LDKMessageSendEvent {
607                         public number update;
608                         PaymentFailureNetworkUpdate(number update) { this.update = update; }
609                 }
610                 export class SendChannelRangeQuery extends LDKMessageSendEvent {
611                         public Uint8Array node_id;
612                         public number msg;
613                         SendChannelRangeQuery(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
614                 }
615                 export class SendShortIdsQuery extends LDKMessageSendEvent {
616                         public Uint8Array node_id;
617                         public number msg;
618                         SendShortIdsQuery(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
619                 }
620                 export class SendReplyChannelRange extends LDKMessageSendEvent {
621                         public Uint8Array node_id;
622                         public number msg;
623                         SendReplyChannelRange(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
624                 }
625                 static native void init();
626         }
627         static { LDKMessageSendEvent.init(); }
628         public static native LDKMessageSendEvent LDKMessageSendEvent_ref_from_ptr(long ptr);
629         public static native long LDKCVec_MessageSendEventZ_new(number[] elems);
630         public static native boolean LDKCResult_boolLightningErrorZ_result_ok(long arg);
631         public static native boolean LDKCResult_boolLightningErrorZ_get_ok(long arg);
632         public static native number LDKCResult_boolLightningErrorZ_get_err(long arg);
633         public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(number a, number b, number c);
634         public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(long ptr);
635         public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(long ptr);
636         public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(long ptr);
637         public static native long LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_new(number[] elems);
638         public static native long LDKCVec_NodeAnnouncementZ_new(number[] elems);
639         public static native boolean LDKCResult_NoneLightningErrorZ_result_ok(long arg);
640         public static native void LDKCResult_NoneLightningErrorZ_get_ok(long arg);
641         public static native number LDKCResult_NoneLightningErrorZ_get_err(long arg);
642         public static native boolean LDKCResult_CVec_u8ZPeerHandleErrorZ_result_ok(long arg);
643         public static native Uint8Array LDKCResult_CVec_u8ZPeerHandleErrorZ_get_ok(long arg);
644         public static native number LDKCResult_CVec_u8ZPeerHandleErrorZ_get_err(long arg);
645         public static native boolean LDKCResult_NonePeerHandleErrorZ_result_ok(long arg);
646         public static native void LDKCResult_NonePeerHandleErrorZ_get_ok(long arg);
647         public static native number LDKCResult_NonePeerHandleErrorZ_get_err(long arg);
648         public static native boolean LDKCResult_boolPeerHandleErrorZ_result_ok(long arg);
649         public static native boolean LDKCResult_boolPeerHandleErrorZ_get_ok(long arg);
650         public static native number LDKCResult_boolPeerHandleErrorZ_get_err(long arg);
651         public static native boolean LDKCResult_TxOutAccessErrorZ_result_ok(long arg);
652         public static native number LDKCResult_TxOutAccessErrorZ_get_ok(long arg);
653         public static native LDKAccessError LDKCResult_TxOutAccessErrorZ_get_err(long arg);
654         public static class LDKCOption_C2Tuple_usizeTransactionZZ {
655                 private LDKCOption_C2Tuple_usizeTransactionZZ() {}
656                 export class Some extends LDKCOption_C2Tuple_usizeTransactionZZ {
657                         public number some;
658                         Some(number some) { this.some = some; }
659                 }
660                 export class None extends LDKCOption_C2Tuple_usizeTransactionZZ {
661                         None() { }
662                 }
663                 static native void init();
664         }
665         static { LDKCOption_C2Tuple_usizeTransactionZZ.init(); }
666         public static native LDKCOption_C2Tuple_usizeTransactionZZ LDKCOption_C2Tuple_usizeTransactionZZ_ref_from_ptr(long ptr);
667         public static native boolean LDKCResult_DirectionalChannelInfoDecodeErrorZ_result_ok(long arg);
668         public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_ok(long arg);
669         public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_err(long arg);
670         public static native boolean LDKCResult_ChannelInfoDecodeErrorZ_result_ok(long arg);
671         public static native number LDKCResult_ChannelInfoDecodeErrorZ_get_ok(long arg);
672         public static native number LDKCResult_ChannelInfoDecodeErrorZ_get_err(long arg);
673         public static native boolean LDKCResult_RoutingFeesDecodeErrorZ_result_ok(long arg);
674         public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_ok(long arg);
675         public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_err(long arg);
676         public static class LDKNetAddress {
677                 private LDKNetAddress() {}
678                 export class IPv4 extends LDKNetAddress {
679                         public Uint8Array addr;
680                         public number port;
681                         IPv4(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
682                 }
683                 export class IPv6 extends LDKNetAddress {
684                         public Uint8Array addr;
685                         public number port;
686                         IPv6(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
687                 }
688                 export class OnionV2 extends LDKNetAddress {
689                         public Uint8Array addr;
690                         public number port;
691                         OnionV2(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
692                 }
693                 export class OnionV3 extends LDKNetAddress {
694                         public Uint8Array ed25519_pubkey;
695                         public number checksum;
696                         public number version;
697                         public number port;
698                         OnionV3(Uint8Array ed25519_pubkey, number checksum, number version, number port) { this.ed25519_pubkey = ed25519_pubkey; this.checksum = checksum; this.version = version; this.port = port; }
699                 }
700                 static native void init();
701         }
702         static { LDKNetAddress.init(); }
703         public static native LDKNetAddress LDKNetAddress_ref_from_ptr(long ptr);
704         public static native long LDKCVec_NetAddressZ_new(number[] elems);
705         public static native boolean LDKCResult_NodeAnnouncementInfoDecodeErrorZ_result_ok(long arg);
706         public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(long arg);
707         public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_err(long arg);
708         public static native long LDKCVec_u64Z_new(number[] elems);
709         public static native boolean LDKCResult_NodeInfoDecodeErrorZ_result_ok(long arg);
710         public static native number LDKCResult_NodeInfoDecodeErrorZ_get_ok(long arg);
711         public static native number LDKCResult_NodeInfoDecodeErrorZ_get_err(long arg);
712         public static native boolean LDKCResult_NetworkGraphDecodeErrorZ_result_ok(long arg);
713         public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_ok(long arg);
714         public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_err(long arg);
715         public static native boolean LDKCResult_InitFeaturesDecodeErrorZ_result_ok(long arg);
716         public static native number LDKCResult_InitFeaturesDecodeErrorZ_get_ok(long arg);
717         public static native number LDKCResult_InitFeaturesDecodeErrorZ_get_err(long arg);
718         public static native boolean LDKCResult_NodeFeaturesDecodeErrorZ_result_ok(long arg);
719         public static native number LDKCResult_NodeFeaturesDecodeErrorZ_get_ok(long arg);
720         public static native number LDKCResult_NodeFeaturesDecodeErrorZ_get_err(long arg);
721         public static native boolean LDKCResult_ChannelFeaturesDecodeErrorZ_result_ok(long arg);
722         public static native number LDKCResult_ChannelFeaturesDecodeErrorZ_get_ok(long arg);
723         public static native number LDKCResult_ChannelFeaturesDecodeErrorZ_get_err(long arg);
724         public static native boolean LDKCResult_InvoiceFeaturesDecodeErrorZ_result_ok(long arg);
725         public static native number LDKCResult_InvoiceFeaturesDecodeErrorZ_get_ok(long arg);
726         public static native number LDKCResult_InvoiceFeaturesDecodeErrorZ_get_err(long arg);
727         public static native boolean LDKCResult_NetAddressu8Z_result_ok(long arg);
728         public static native number LDKCResult_NetAddressu8Z_get_ok(long arg);
729         public static native number LDKCResult_NetAddressu8Z_get_err(long arg);
730         public static native boolean LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_result_ok(long arg);
731         public static native number LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_ok(long arg);
732         public static native number LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_err(long arg);
733         public static native long LDKCVec_UpdateAddHTLCZ_new(number[] elems);
734         public static native long LDKCVec_UpdateFulfillHTLCZ_new(number[] elems);
735         public static native long LDKCVec_UpdateFailHTLCZ_new(number[] elems);
736         public static native long LDKCVec_UpdateFailMalformedHTLCZ_new(number[] elems);
737         public static native boolean LDKCResult_AcceptChannelDecodeErrorZ_result_ok(long arg);
738         public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_ok(long arg);
739         public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_err(long arg);
740         public static native boolean LDKCResult_AnnouncementSignaturesDecodeErrorZ_result_ok(long arg);
741         public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_ok(long arg);
742         public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_err(long arg);
743         public static native boolean LDKCResult_ChannelReestablishDecodeErrorZ_result_ok(long arg);
744         public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_ok(long arg);
745         public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_err(long arg);
746         public static native boolean LDKCResult_ClosingSignedDecodeErrorZ_result_ok(long arg);
747         public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_ok(long arg);
748         public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_err(long arg);
749         public static native boolean LDKCResult_CommitmentSignedDecodeErrorZ_result_ok(long arg);
750         public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_ok(long arg);
751         public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_err(long arg);
752         public static native boolean LDKCResult_FundingCreatedDecodeErrorZ_result_ok(long arg);
753         public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_ok(long arg);
754         public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_err(long arg);
755         public static native boolean LDKCResult_FundingSignedDecodeErrorZ_result_ok(long arg);
756         public static native number LDKCResult_FundingSignedDecodeErrorZ_get_ok(long arg);
757         public static native number LDKCResult_FundingSignedDecodeErrorZ_get_err(long arg);
758         public static native boolean LDKCResult_FundingLockedDecodeErrorZ_result_ok(long arg);
759         public static native number LDKCResult_FundingLockedDecodeErrorZ_get_ok(long arg);
760         public static native number LDKCResult_FundingLockedDecodeErrorZ_get_err(long arg);
761         public static native boolean LDKCResult_InitDecodeErrorZ_result_ok(long arg);
762         public static native number LDKCResult_InitDecodeErrorZ_get_ok(long arg);
763         public static native number LDKCResult_InitDecodeErrorZ_get_err(long arg);
764         public static native boolean LDKCResult_OpenChannelDecodeErrorZ_result_ok(long arg);
765         public static native number LDKCResult_OpenChannelDecodeErrorZ_get_ok(long arg);
766         public static native number LDKCResult_OpenChannelDecodeErrorZ_get_err(long arg);
767         public static native boolean LDKCResult_RevokeAndACKDecodeErrorZ_result_ok(long arg);
768         public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_ok(long arg);
769         public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_err(long arg);
770         public static native boolean LDKCResult_ShutdownDecodeErrorZ_result_ok(long arg);
771         public static native number LDKCResult_ShutdownDecodeErrorZ_get_ok(long arg);
772         public static native number LDKCResult_ShutdownDecodeErrorZ_get_err(long arg);
773         public static native boolean LDKCResult_UpdateFailHTLCDecodeErrorZ_result_ok(long arg);
774         public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_ok(long arg);
775         public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_err(long arg);
776         public static native boolean LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_result_ok(long arg);
777         public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(long arg);
778         public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(long arg);
779         public static native boolean LDKCResult_UpdateFeeDecodeErrorZ_result_ok(long arg);
780         public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_ok(long arg);
781         public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_err(long arg);
782         public static native boolean LDKCResult_UpdateFulfillHTLCDecodeErrorZ_result_ok(long arg);
783         public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(long arg);
784         public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_err(long arg);
785         public static native boolean LDKCResult_UpdateAddHTLCDecodeErrorZ_result_ok(long arg);
786         public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_ok(long arg);
787         public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_err(long arg);
788         public static native boolean LDKCResult_PingDecodeErrorZ_result_ok(long arg);
789         public static native number LDKCResult_PingDecodeErrorZ_get_ok(long arg);
790         public static native number LDKCResult_PingDecodeErrorZ_get_err(long arg);
791         public static native boolean LDKCResult_PongDecodeErrorZ_result_ok(long arg);
792         public static native number LDKCResult_PongDecodeErrorZ_get_ok(long arg);
793         public static native number LDKCResult_PongDecodeErrorZ_get_err(long arg);
794         public static native boolean LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_result_ok(long arg);
795         public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(long arg);
796         public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(long arg);
797         public static native boolean LDKCResult_ChannelAnnouncementDecodeErrorZ_result_ok(long arg);
798         public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_ok(long arg);
799         public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_err(long arg);
800         public static native boolean LDKCResult_UnsignedChannelUpdateDecodeErrorZ_result_ok(long arg);
801         public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(long arg);
802         public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_err(long arg);
803         public static native boolean LDKCResult_ChannelUpdateDecodeErrorZ_result_ok(long arg);
804         public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_ok(long arg);
805         public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_err(long arg);
806         public static native boolean LDKCResult_ErrorMessageDecodeErrorZ_result_ok(long arg);
807         public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_ok(long arg);
808         public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_err(long arg);
809         public static native boolean LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_result_ok(long arg);
810         public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(long arg);
811         public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(long arg);
812         public static native boolean LDKCResult_NodeAnnouncementDecodeErrorZ_result_ok(long arg);
813         public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_ok(long arg);
814         public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_err(long arg);
815         public static native boolean LDKCResult_QueryShortChannelIdsDecodeErrorZ_result_ok(long arg);
816         public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_ok(long arg);
817         public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_err(long arg);
818         public static native boolean LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_result_ok(long arg);
819         public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(long arg);
820         public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(long arg);
821         public static native boolean LDKCResult_QueryChannelRangeDecodeErrorZ_result_ok(long arg);
822         public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_ok(long arg);
823         public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_err(long arg);
824         public static native boolean LDKCResult_ReplyChannelRangeDecodeErrorZ_result_ok(long arg);
825         public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_ok(long arg);
826         public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_err(long arg);
827         public static native boolean LDKCResult_GossipTimestampFilterDecodeErrorZ_result_ok(long arg);
828         public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_ok(long arg);
829         public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_err(long arg);
830         public static native boolean LDKCResult_SpendableOutputDescriptorDecodeErrorZ_result_ok(long arg);
831         public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(long arg);
832         public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_err(long arg);
833         public static native boolean LDKCResult_SignDecodeErrorZ_result_ok(long arg);
834         public static native number LDKCResult_SignDecodeErrorZ_get_ok(long arg);
835         public static native number LDKCResult_SignDecodeErrorZ_get_err(long arg);
836         public static native boolean LDKCResult_CVec_CVec_u8ZZNoneZ_result_ok(long arg);
837         public static native Uint8Array[] LDKCResult_CVec_CVec_u8ZZNoneZ_get_ok(long arg);
838         public static native void LDKCResult_CVec_CVec_u8ZZNoneZ_get_err(long arg);
839         public static native boolean LDKCResult_InMemorySignerDecodeErrorZ_result_ok(long arg);
840         public static native number LDKCResult_InMemorySignerDecodeErrorZ_get_ok(long arg);
841         public static native number LDKCResult_InMemorySignerDecodeErrorZ_get_err(long arg);
842         public static native long LDKCVec_TxOutZ_new(number[] elems);
843         public static native boolean LDKCResult_TransactionNoneZ_result_ok(long arg);
844         public static native Uint8Array LDKCResult_TransactionNoneZ_get_ok(long arg);
845         public static native void LDKCResult_TransactionNoneZ_get_err(long arg);
846         public static native boolean LDKCResult_NoneErrorZ_result_ok(long arg);
847         public static native void LDKCResult_NoneErrorZ_get_ok(long arg);
848         public static native LDKIOError LDKCResult_NoneErrorZ_get_err(long arg);
849         public static native long LDKCVec_C2Tuple_BlockHashChannelMonitorZZ_new(number[] elems);
850         public static native boolean LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_result_ok(long arg);
851         public static native number[] LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_get_ok(long arg);
852         public static native LDKIOError LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_get_err(long arg);
853         public static class LDKAPIError {
854                 private LDKAPIError() {}
855                 export class APIMisuseError extends LDKAPIError {
856                         public Uint8Array err;
857                         APIMisuseError(Uint8Array err) { this.err = err; }
858                 }
859                 export class FeeRateTooHigh extends LDKAPIError {
860                         public Uint8Array err;
861                         public number feerate;
862                         FeeRateTooHigh(Uint8Array err, number feerate) { this.err = err; this.feerate = feerate; }
863                 }
864                 export class RouteError extends LDKAPIError {
865                         public String err;
866                         RouteError(String err) { this.err = err; }
867                 }
868                 export class ChannelUnavailable extends LDKAPIError {
869                         public Uint8Array err;
870                         ChannelUnavailable(Uint8Array err) { this.err = err; }
871                 }
872                 export class MonitorUpdateFailed extends LDKAPIError {
873                         MonitorUpdateFailed() { }
874                 }
875                 static native void init();
876         }
877         static { LDKAPIError.init(); }
878         public static native LDKAPIError LDKAPIError_ref_from_ptr(long ptr);
879         public static native boolean LDKCResult_NoneAPIErrorZ_result_ok(long arg);
880         public static native void LDKCResult_NoneAPIErrorZ_get_ok(long arg);
881         public static native number LDKCResult_NoneAPIErrorZ_get_err(long arg);
882         public static native long LDKCVec_CResult_NoneAPIErrorZZ_new(number[] elems);
883         public static native long LDKCVec_APIErrorZ_new(number[] elems);
884         public static class LDKPaymentSendFailure {
885                 private LDKPaymentSendFailure() {}
886                 export class ParameterError extends LDKPaymentSendFailure {
887                         public number parameter_error;
888                         ParameterError(number parameter_error) { this.parameter_error = parameter_error; }
889                 }
890                 export class PathParameterError extends LDKPaymentSendFailure {
891                         public number[] path_parameter_error;
892                         PathParameterError(number[] path_parameter_error) { this.path_parameter_error = path_parameter_error; }
893                 }
894                 export class AllFailedRetrySafe extends LDKPaymentSendFailure {
895                         public number[] all_failed_retry_safe;
896                         AllFailedRetrySafe(number[] all_failed_retry_safe) { this.all_failed_retry_safe = all_failed_retry_safe; }
897                 }
898                 export class PartialFailure extends LDKPaymentSendFailure {
899                         public number[] partial_failure;
900                         PartialFailure(number[] partial_failure) { this.partial_failure = partial_failure; }
901                 }
902                 static native void init();
903         }
904         static { LDKPaymentSendFailure.init(); }
905         public static native LDKPaymentSendFailure LDKPaymentSendFailure_ref_from_ptr(long ptr);
906         public static native boolean LDKCResult_NonePaymentSendFailureZ_result_ok(long arg);
907         public static native void LDKCResult_NonePaymentSendFailureZ_get_ok(long arg);
908         public static native number LDKCResult_NonePaymentSendFailureZ_get_err(long arg);
909         public static native long LDKCVec_ChannelMonitorZ_new(number[] elems);
910
911
912
913 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
914
915                 export interface LDKWatch {
916                         watch_channel (funding_txo: number, monitor: number): number;
917                         update_channel (funding_txo: number, update: number): number;
918                         release_pending_monitor_events (): number[];
919                 }
920
921                 export function LDKWatch_new(impl: LDKWatch): number {
922             throw new Error('unimplemented'); // TODO: bind to WASM
923         }
924
925 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
926
927
928         // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_watch_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitor monitor
929         export function Watch_watch_channel(this_arg: number, funding_txo: number, monitor: number): number {
930                 if(!isWasmInitialized) {
931                         throw new Error("initializeWasm() must be awaited first!");
932                 }
933                 const nativeResponseValue = wasm.Watch_watch_channel(this_arg, funding_txo, monitor);
934                 return nativeResponseValue;
935         }
936         // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_update_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitorUpdate update
937         export function Watch_update_channel(this_arg: number, funding_txo: number, update: number): number {
938                 if(!isWasmInitialized) {
939                         throw new Error("initializeWasm() must be awaited first!");
940                 }
941                 const nativeResponseValue = wasm.Watch_update_channel(this_arg, funding_txo, update);
942                 return nativeResponseValue;
943         }
944         // LDKCVec_MonitorEventZ Watch_release_pending_monitor_events LDKWatch *NONNULL_PTR this_arg
945         export function Watch_release_pending_monitor_events(this_arg: number): number[] {
946                 if(!isWasmInitialized) {
947                         throw new Error("initializeWasm() must be awaited first!");
948                 }
949                 const nativeResponseValue = wasm.Watch_release_pending_monitor_events(this_arg);
950                 return nativeResponseValue;
951         }
952
953
954
955 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
956
957                 export interface LDKBroadcasterInterface {
958                         broadcast_transaction (tx: Uint8Array): void;
959                 }
960
961                 export function LDKBroadcasterInterface_new(impl: LDKBroadcasterInterface): number {
962             throw new Error('unimplemented'); // TODO: bind to WASM
963         }
964
965 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
966
967
968         // void BroadcasterInterface_broadcast_transaction LDKBroadcasterInterface *NONNULL_PTR this_arg, struct LDKTransaction tx
969         export function BroadcasterInterface_broadcast_transaction(this_arg: number, tx: Uint8Array): void {
970                 if(!isWasmInitialized) {
971                         throw new Error("initializeWasm() must be awaited first!");
972                 }
973                 const nativeResponseValue = wasm.BroadcasterInterface_broadcast_transaction(this_arg, encodeArray(tx));
974                 // debug statements here
975         }
976
977
978
979 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
980
981                 export interface LDKKeysInterface {
982                         get_node_secret (): Uint8Array;
983                         get_destination_script (): Uint8Array;
984                         get_shutdown_pubkey (): Uint8Array;
985                         get_channel_signer (inbound: boolean, channel_value_satoshis: number): number;
986                         get_secure_random_bytes (): Uint8Array;
987                         read_chan_signer (reader: Uint8Array): number;
988                 }
989
990                 export function LDKKeysInterface_new(impl: LDKKeysInterface): number {
991             throw new Error('unimplemented'); // TODO: bind to WASM
992         }
993
994 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
995
996
997         // LDKSecretKey KeysInterface_get_node_secret LDKKeysInterface *NONNULL_PTR this_arg
998         export function KeysInterface_get_node_secret(this_arg: number): Uint8Array {
999                 if(!isWasmInitialized) {
1000                         throw new Error("initializeWasm() must be awaited first!");
1001                 }
1002                 const nativeResponseValue = wasm.KeysInterface_get_node_secret(this_arg);
1003                 return decodeArray(nativeResponseValue);
1004         }
1005         // LDKCVec_u8Z KeysInterface_get_destination_script LDKKeysInterface *NONNULL_PTR this_arg
1006         export function KeysInterface_get_destination_script(this_arg: number): Uint8Array {
1007                 if(!isWasmInitialized) {
1008                         throw new Error("initializeWasm() must be awaited first!");
1009                 }
1010                 const nativeResponseValue = wasm.KeysInterface_get_destination_script(this_arg);
1011                 return decodeArray(nativeResponseValue);
1012         }
1013         // LDKPublicKey KeysInterface_get_shutdown_pubkey LDKKeysInterface *NONNULL_PTR this_arg
1014         export function KeysInterface_get_shutdown_pubkey(this_arg: number): Uint8Array {
1015                 if(!isWasmInitialized) {
1016                         throw new Error("initializeWasm() must be awaited first!");
1017                 }
1018                 const nativeResponseValue = wasm.KeysInterface_get_shutdown_pubkey(this_arg);
1019                 return decodeArray(nativeResponseValue);
1020         }
1021         // LDKSign KeysInterface_get_channel_signer LDKKeysInterface *NONNULL_PTR this_arg, bool inbound, uint64_t channel_value_satoshis
1022         export function KeysInterface_get_channel_signer(this_arg: number, inbound: boolean, channel_value_satoshis: number): number {
1023                 if(!isWasmInitialized) {
1024                         throw new Error("initializeWasm() must be awaited first!");
1025                 }
1026                 const nativeResponseValue = wasm.KeysInterface_get_channel_signer(this_arg, inbound, channel_value_satoshis);
1027                 return nativeResponseValue;
1028         }
1029         // LDKThirtyTwoBytes KeysInterface_get_secure_random_bytes LDKKeysInterface *NONNULL_PTR this_arg
1030         export function KeysInterface_get_secure_random_bytes(this_arg: number): Uint8Array {
1031                 if(!isWasmInitialized) {
1032                         throw new Error("initializeWasm() must be awaited first!");
1033                 }
1034                 const nativeResponseValue = wasm.KeysInterface_get_secure_random_bytes(this_arg);
1035                 return decodeArray(nativeResponseValue);
1036         }
1037         // LDKCResult_SignDecodeErrorZ KeysInterface_read_chan_signer LDKKeysInterface *NONNULL_PTR this_arg, struct LDKu8slice reader
1038         export function KeysInterface_read_chan_signer(this_arg: number, reader: Uint8Array): number {
1039                 if(!isWasmInitialized) {
1040                         throw new Error("initializeWasm() must be awaited first!");
1041                 }
1042                 const nativeResponseValue = wasm.KeysInterface_read_chan_signer(this_arg, encodeArray(reader));
1043                 return nativeResponseValue;
1044         }
1045
1046
1047
1048 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1049
1050                 export interface LDKFeeEstimator {
1051                         get_est_sat_per_1000_weight (confirmation_target: LDKConfirmationTarget): number;
1052                 }
1053
1054                 export function LDKFeeEstimator_new(impl: LDKFeeEstimator): number {
1055             throw new Error('unimplemented'); // TODO: bind to WASM
1056         }
1057
1058 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1059
1060
1061         // uint32_t FeeEstimator_get_est_sat_per_1000_weight LDKFeeEstimator *NONNULL_PTR this_arg, enum LDKConfirmationTarget confirmation_target
1062         export function FeeEstimator_get_est_sat_per_1000_weight(this_arg: number, confirmation_target: LDKConfirmationTarget): number {
1063                 if(!isWasmInitialized) {
1064                         throw new Error("initializeWasm() must be awaited first!");
1065                 }
1066                 const nativeResponseValue = wasm.FeeEstimator_get_est_sat_per_1000_weight(this_arg, confirmation_target);
1067                 return nativeResponseValue;
1068         }
1069
1070
1071
1072 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1073
1074                 export interface LDKLogger {
1075                         log (record: String): void;
1076                 }
1077
1078                 export function LDKLogger_new(impl: LDKLogger): number {
1079             throw new Error('unimplemented'); // TODO: bind to WASM
1080         }
1081
1082 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1083
1084
1085         public static native long LDKC2Tuple_BlockHashChannelManagerZ_new(Uint8Array a, number b);
1086         public static native Uint8Array LDKC2Tuple_BlockHashChannelManagerZ_get_a(long ptr);
1087         public static native number LDKC2Tuple_BlockHashChannelManagerZ_get_b(long ptr);
1088         public static native boolean LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_result_ok(long arg);
1089         public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(long arg);
1090         public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(long arg);
1091
1092
1093
1094 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1095
1096                 export interface LDKMessageSendEventsProvider {
1097                         get_and_clear_pending_msg_events (): number[];
1098                 }
1099
1100                 export function LDKMessageSendEventsProvider_new(impl: LDKMessageSendEventsProvider): number {
1101             throw new Error('unimplemented'); // TODO: bind to WASM
1102         }
1103
1104 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1105
1106
1107         // LDKCVec_MessageSendEventZ MessageSendEventsProvider_get_and_clear_pending_msg_events LDKMessageSendEventsProvider *NONNULL_PTR this_arg
1108         export function MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg: number): number[] {
1109                 if(!isWasmInitialized) {
1110                         throw new Error("initializeWasm() must be awaited first!");
1111                 }
1112                 const nativeResponseValue = wasm.MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg);
1113                 return nativeResponseValue;
1114         }
1115
1116
1117
1118 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1119
1120                 export interface LDKEventsProvider {
1121                         get_and_clear_pending_events (): number[];
1122                 }
1123
1124                 export function LDKEventsProvider_new(impl: LDKEventsProvider): number {
1125             throw new Error('unimplemented'); // TODO: bind to WASM
1126         }
1127
1128 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1129
1130
1131         // LDKCVec_EventZ EventsProvider_get_and_clear_pending_events LDKEventsProvider *NONNULL_PTR this_arg
1132         export function EventsProvider_get_and_clear_pending_events(this_arg: number): number[] {
1133                 if(!isWasmInitialized) {
1134                         throw new Error("initializeWasm() must be awaited first!");
1135                 }
1136                 const nativeResponseValue = wasm.EventsProvider_get_and_clear_pending_events(this_arg);
1137                 return nativeResponseValue;
1138         }
1139
1140
1141
1142 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1143
1144                 export interface LDKAccess {
1145                         get_utxo (genesis_hash: Uint8Array, short_channel_id: number): number;
1146                 }
1147
1148                 export function LDKAccess_new(impl: LDKAccess): number {
1149             throw new Error('unimplemented'); // TODO: bind to WASM
1150         }
1151
1152 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1153
1154
1155         // LDKCResult_TxOutAccessErrorZ Access_get_utxo LDKAccess *NONNULL_PTR this_arg, const uint8_t (*genesis_hash)[32], uint64_t short_channel_id
1156         export function Access_get_utxo(this_arg: number, genesis_hash: Uint8Array, short_channel_id: number): number {
1157                 if(!isWasmInitialized) {
1158                         throw new Error("initializeWasm() must be awaited first!");
1159                 }
1160                 const nativeResponseValue = wasm.Access_get_utxo(this_arg, encodeArray(genesis_hash), short_channel_id);
1161                 return nativeResponseValue;
1162         }
1163
1164
1165
1166 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1167
1168                 export interface LDKListen {
1169                         block_connected (block: Uint8Array, height: number): void;
1170                         block_disconnected (header: Uint8Array, height: number): void;
1171                 }
1172
1173                 export function LDKListen_new(impl: LDKListen): number {
1174             throw new Error('unimplemented'); // TODO: bind to WASM
1175         }
1176
1177 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1178
1179
1180         // void Listen_block_connected LDKListen *NONNULL_PTR this_arg, struct LDKu8slice block, uint32_t height
1181         export function Listen_block_connected(this_arg: number, block: Uint8Array, height: number): void {
1182                 if(!isWasmInitialized) {
1183                         throw new Error("initializeWasm() must be awaited first!");
1184                 }
1185                 const nativeResponseValue = wasm.Listen_block_connected(this_arg, encodeArray(block), height);
1186                 // debug statements here
1187         }
1188         // void Listen_block_disconnected LDKListen *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
1189         export function Listen_block_disconnected(this_arg: number, header: Uint8Array, height: number): void {
1190                 if(!isWasmInitialized) {
1191                         throw new Error("initializeWasm() must be awaited first!");
1192                 }
1193                 const nativeResponseValue = wasm.Listen_block_disconnected(this_arg, encodeArray(header), height);
1194                 // debug statements here
1195         }
1196
1197
1198
1199 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1200
1201                 export interface LDKFilter {
1202                         register_tx (txid: Uint8Array, script_pubkey: Uint8Array): void;
1203                         register_output (output: number): number;
1204                 }
1205
1206                 export function LDKFilter_new(impl: LDKFilter): number {
1207             throw new Error('unimplemented'); // TODO: bind to WASM
1208         }
1209
1210 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1211
1212
1213         // void Filter_register_tx LDKFilter *NONNULL_PTR this_arg, const uint8_t (*txid)[32], struct LDKu8slice script_pubkey
1214         export function Filter_register_tx(this_arg: number, txid: Uint8Array, script_pubkey: Uint8Array): void {
1215                 if(!isWasmInitialized) {
1216                         throw new Error("initializeWasm() must be awaited first!");
1217                 }
1218                 const nativeResponseValue = wasm.Filter_register_tx(this_arg, encodeArray(txid), encodeArray(script_pubkey));
1219                 // debug statements here
1220         }
1221         // LDKCOption_C2Tuple_usizeTransactionZZ Filter_register_output LDKFilter *NONNULL_PTR this_arg, struct LDKWatchedOutput output
1222         export function Filter_register_output(this_arg: number, output: number): number {
1223                 if(!isWasmInitialized) {
1224                         throw new Error("initializeWasm() must be awaited first!");
1225                 }
1226                 const nativeResponseValue = wasm.Filter_register_output(this_arg, output);
1227                 return nativeResponseValue;
1228         }
1229
1230
1231
1232 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1233
1234                 export interface LDKPersist {
1235                         persist_new_channel (id: number, data: number): number;
1236                         update_persisted_channel (id: number, update: number, data: number): number;
1237                 }
1238
1239                 export function LDKPersist_new(impl: LDKPersist): number {
1240             throw new Error('unimplemented'); // TODO: bind to WASM
1241         }
1242
1243 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1244
1245
1246         // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_persist_new_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint id, const struct LDKChannelMonitor *NONNULL_PTR data
1247         export function Persist_persist_new_channel(this_arg: number, id: number, data: number): number {
1248                 if(!isWasmInitialized) {
1249                         throw new Error("initializeWasm() must be awaited first!");
1250                 }
1251                 const nativeResponseValue = wasm.Persist_persist_new_channel(this_arg, id, data);
1252                 return nativeResponseValue;
1253         }
1254         // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_update_persisted_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint id, const struct LDKChannelMonitorUpdate *NONNULL_PTR update, const struct LDKChannelMonitor *NONNULL_PTR data
1255         export function Persist_update_persisted_channel(this_arg: number, id: number, update: number, data: number): number {
1256                 if(!isWasmInitialized) {
1257                         throw new Error("initializeWasm() must be awaited first!");
1258                 }
1259                 const nativeResponseValue = wasm.Persist_update_persisted_channel(this_arg, id, update, data);
1260                 return nativeResponseValue;
1261         }
1262
1263
1264
1265 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1266
1267                 export interface LDKChannelMessageHandler {
1268                         handle_open_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
1269                         handle_accept_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
1270                         handle_funding_created (their_node_id: Uint8Array, msg: number): void;
1271                         handle_funding_signed (their_node_id: Uint8Array, msg: number): void;
1272                         handle_funding_locked (their_node_id: Uint8Array, msg: number): void;
1273                         handle_shutdown (their_node_id: Uint8Array, their_features: number, msg: number): void;
1274                         handle_closing_signed (their_node_id: Uint8Array, msg: number): void;
1275                         handle_update_add_htlc (their_node_id: Uint8Array, msg: number): void;
1276                         handle_update_fulfill_htlc (their_node_id: Uint8Array, msg: number): void;
1277                         handle_update_fail_htlc (their_node_id: Uint8Array, msg: number): void;
1278                         handle_update_fail_malformed_htlc (their_node_id: Uint8Array, msg: number): void;
1279                         handle_commitment_signed (their_node_id: Uint8Array, msg: number): void;
1280                         handle_revoke_and_ack (their_node_id: Uint8Array, msg: number): void;
1281                         handle_update_fee (their_node_id: Uint8Array, msg: number): void;
1282                         handle_announcement_signatures (their_node_id: Uint8Array, msg: number): void;
1283                         peer_disconnected (their_node_id: Uint8Array, no_connection_possible: boolean): void;
1284                         peer_connected (their_node_id: Uint8Array, msg: number): void;
1285                         handle_channel_reestablish (their_node_id: Uint8Array, msg: number): void;
1286                         handle_channel_update (their_node_id: Uint8Array, msg: number): void;
1287                         handle_error (their_node_id: Uint8Array, msg: number): void;
1288                 }
1289
1290                 export function LDKChannelMessageHandler_new(impl: LDKChannelMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
1291             throw new Error('unimplemented'); // TODO: bind to WASM
1292         }
1293
1294 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1295
1296
1297         // 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
1298         export function ChannelMessageHandler_handle_open_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1299                 if(!isWasmInitialized) {
1300                         throw new Error("initializeWasm() must be awaited first!");
1301                 }
1302                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_open_channel(this_arg, encodeArray(their_node_id), their_features, msg);
1303                 // debug statements here
1304         }
1305         // 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
1306         export function ChannelMessageHandler_handle_accept_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1307                 if(!isWasmInitialized) {
1308                         throw new Error("initializeWasm() must be awaited first!");
1309                 }
1310                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_accept_channel(this_arg, encodeArray(their_node_id), their_features, msg);
1311                 // debug statements here
1312         }
1313         // void ChannelMessageHandler_handle_funding_created LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingCreated *NONNULL_PTR msg
1314         export function ChannelMessageHandler_handle_funding_created(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1315                 if(!isWasmInitialized) {
1316                         throw new Error("initializeWasm() must be awaited first!");
1317                 }
1318                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_created(this_arg, encodeArray(their_node_id), msg);
1319                 // debug statements here
1320         }
1321         // void ChannelMessageHandler_handle_funding_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingSigned *NONNULL_PTR msg
1322         export function ChannelMessageHandler_handle_funding_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1323                 if(!isWasmInitialized) {
1324                         throw new Error("initializeWasm() must be awaited first!");
1325                 }
1326                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_signed(this_arg, encodeArray(their_node_id), msg);
1327                 // debug statements here
1328         }
1329         // void ChannelMessageHandler_handle_funding_locked LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingLocked *NONNULL_PTR msg
1330         export function ChannelMessageHandler_handle_funding_locked(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1331                 if(!isWasmInitialized) {
1332                         throw new Error("initializeWasm() must be awaited first!");
1333                 }
1334                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_locked(this_arg, encodeArray(their_node_id), msg);
1335                 // debug statements here
1336         }
1337         // 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
1338         export function ChannelMessageHandler_handle_shutdown(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1339                 if(!isWasmInitialized) {
1340                         throw new Error("initializeWasm() must be awaited first!");
1341                 }
1342                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_shutdown(this_arg, encodeArray(their_node_id), their_features, msg);
1343                 // debug statements here
1344         }
1345         // void ChannelMessageHandler_handle_closing_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKClosingSigned *NONNULL_PTR msg
1346         export function ChannelMessageHandler_handle_closing_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1347                 if(!isWasmInitialized) {
1348                         throw new Error("initializeWasm() must be awaited first!");
1349                 }
1350                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_closing_signed(this_arg, encodeArray(their_node_id), msg);
1351                 // debug statements here
1352         }
1353         // void ChannelMessageHandler_handle_update_add_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateAddHTLC *NONNULL_PTR msg
1354         export function ChannelMessageHandler_handle_update_add_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1355                 if(!isWasmInitialized) {
1356                         throw new Error("initializeWasm() must be awaited first!");
1357                 }
1358                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_add_htlc(this_arg, encodeArray(their_node_id), msg);
1359                 // debug statements here
1360         }
1361         // void ChannelMessageHandler_handle_update_fulfill_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFulfillHTLC *NONNULL_PTR msg
1362         export function ChannelMessageHandler_handle_update_fulfill_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1363                 if(!isWasmInitialized) {
1364                         throw new Error("initializeWasm() must be awaited first!");
1365                 }
1366                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fulfill_htlc(this_arg, encodeArray(their_node_id), msg);
1367                 // debug statements here
1368         }
1369         // void ChannelMessageHandler_handle_update_fail_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailHTLC *NONNULL_PTR msg
1370         export function ChannelMessageHandler_handle_update_fail_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1371                 if(!isWasmInitialized) {
1372                         throw new Error("initializeWasm() must be awaited first!");
1373                 }
1374                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fail_htlc(this_arg, encodeArray(their_node_id), msg);
1375                 // debug statements here
1376         }
1377         // void ChannelMessageHandler_handle_update_fail_malformed_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR msg
1378         export function ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1379                 if(!isWasmInitialized) {
1380                         throw new Error("initializeWasm() must be awaited first!");
1381                 }
1382                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg, encodeArray(their_node_id), msg);
1383                 // debug statements here
1384         }
1385         // void ChannelMessageHandler_handle_commitment_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKCommitmentSigned *NONNULL_PTR msg
1386         export function ChannelMessageHandler_handle_commitment_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1387                 if(!isWasmInitialized) {
1388                         throw new Error("initializeWasm() must be awaited first!");
1389                 }
1390                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_commitment_signed(this_arg, encodeArray(their_node_id), msg);
1391                 // debug statements here
1392         }
1393         // void ChannelMessageHandler_handle_revoke_and_ack LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKRevokeAndACK *NONNULL_PTR msg
1394         export function ChannelMessageHandler_handle_revoke_and_ack(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1395                 if(!isWasmInitialized) {
1396                         throw new Error("initializeWasm() must be awaited first!");
1397                 }
1398                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_revoke_and_ack(this_arg, encodeArray(their_node_id), msg);
1399                 // debug statements here
1400         }
1401         // void ChannelMessageHandler_handle_update_fee LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFee *NONNULL_PTR msg
1402         export function ChannelMessageHandler_handle_update_fee(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1403                 if(!isWasmInitialized) {
1404                         throw new Error("initializeWasm() must be awaited first!");
1405                 }
1406                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fee(this_arg, encodeArray(their_node_id), msg);
1407                 // debug statements here
1408         }
1409         // void ChannelMessageHandler_handle_announcement_signatures LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKAnnouncementSignatures *NONNULL_PTR msg
1410         export function ChannelMessageHandler_handle_announcement_signatures(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1411                 if(!isWasmInitialized) {
1412                         throw new Error("initializeWasm() must be awaited first!");
1413                 }
1414                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_announcement_signatures(this_arg, encodeArray(their_node_id), msg);
1415                 // debug statements here
1416         }
1417         // void ChannelMessageHandler_peer_disconnected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, bool no_connection_possible
1418         export function ChannelMessageHandler_peer_disconnected(this_arg: number, their_node_id: Uint8Array, no_connection_possible: boolean): void {
1419                 if(!isWasmInitialized) {
1420                         throw new Error("initializeWasm() must be awaited first!");
1421                 }
1422                 const nativeResponseValue = wasm.ChannelMessageHandler_peer_disconnected(this_arg, encodeArray(their_node_id), no_connection_possible);
1423                 // debug statements here
1424         }
1425         // void ChannelMessageHandler_peer_connected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR msg
1426         export function ChannelMessageHandler_peer_connected(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1427                 if(!isWasmInitialized) {
1428                         throw new Error("initializeWasm() must be awaited first!");
1429                 }
1430                 const nativeResponseValue = wasm.ChannelMessageHandler_peer_connected(this_arg, encodeArray(their_node_id), msg);
1431                 // debug statements here
1432         }
1433         // void ChannelMessageHandler_handle_channel_reestablish LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelReestablish *NONNULL_PTR msg
1434         export function ChannelMessageHandler_handle_channel_reestablish(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1435                 if(!isWasmInitialized) {
1436                         throw new Error("initializeWasm() must be awaited first!");
1437                 }
1438                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_channel_reestablish(this_arg, encodeArray(their_node_id), msg);
1439                 // debug statements here
1440         }
1441         // void ChannelMessageHandler_handle_channel_update LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelUpdate *NONNULL_PTR msg
1442         export function ChannelMessageHandler_handle_channel_update(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1443                 if(!isWasmInitialized) {
1444                         throw new Error("initializeWasm() must be awaited first!");
1445                 }
1446                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_channel_update(this_arg, encodeArray(their_node_id), msg);
1447                 // debug statements here
1448         }
1449         // void ChannelMessageHandler_handle_error LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKErrorMessage *NONNULL_PTR msg
1450         export function ChannelMessageHandler_handle_error(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1451                 if(!isWasmInitialized) {
1452                         throw new Error("initializeWasm() must be awaited first!");
1453                 }
1454                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_error(this_arg, encodeArray(their_node_id), msg);
1455                 // debug statements here
1456         }
1457
1458
1459
1460 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1461
1462                 export interface LDKRoutingMessageHandler {
1463                         handle_node_announcement (msg: number): number;
1464                         handle_channel_announcement (msg: number): number;
1465                         handle_channel_update (msg: number): number;
1466                         handle_htlc_fail_channel_update (update: number): void;
1467                         get_next_channel_announcements (starting_point: number, batch_amount: number): number[];
1468                         get_next_node_announcements (starting_point: Uint8Array, batch_amount: number): number[];
1469                         sync_routing_table (their_node_id: Uint8Array, init: number): void;
1470                         handle_reply_channel_range (their_node_id: Uint8Array, msg: number): number;
1471                         handle_reply_short_channel_ids_end (their_node_id: Uint8Array, msg: number): number;
1472                         handle_query_channel_range (their_node_id: Uint8Array, msg: number): number;
1473                         handle_query_short_channel_ids (their_node_id: Uint8Array, msg: number): number;
1474                 }
1475
1476                 export function LDKRoutingMessageHandler_new(impl: LDKRoutingMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
1477             throw new Error('unimplemented'); // TODO: bind to WASM
1478         }
1479
1480 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1481
1482
1483         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_node_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg
1484         export function RoutingMessageHandler_handle_node_announcement(this_arg: number, msg: number): number {
1485                 if(!isWasmInitialized) {
1486                         throw new Error("initializeWasm() must be awaited first!");
1487                 }
1488                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_node_announcement(this_arg, msg);
1489                 return nativeResponseValue;
1490         }
1491         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg
1492         export function RoutingMessageHandler_handle_channel_announcement(this_arg: number, msg: number): number {
1493                 if(!isWasmInitialized) {
1494                         throw new Error("initializeWasm() must be awaited first!");
1495                 }
1496                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_channel_announcement(this_arg, msg);
1497                 return nativeResponseValue;
1498         }
1499         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_update LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg
1500         export function RoutingMessageHandler_handle_channel_update(this_arg: number, msg: number): number {
1501                 if(!isWasmInitialized) {
1502                         throw new Error("initializeWasm() must be awaited first!");
1503                 }
1504                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_channel_update(this_arg, msg);
1505                 return nativeResponseValue;
1506         }
1507         // void RoutingMessageHandler_handle_htlc_fail_channel_update LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKHTLCFailChannelUpdate *NONNULL_PTR update
1508         export function RoutingMessageHandler_handle_htlc_fail_channel_update(this_arg: number, update: number): void {
1509                 if(!isWasmInitialized) {
1510                         throw new Error("initializeWasm() must be awaited first!");
1511                 }
1512                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_htlc_fail_channel_update(this_arg, update);
1513                 // debug statements here
1514         }
1515         // LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ RoutingMessageHandler_get_next_channel_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, uint64_t starting_point, uint8_t batch_amount
1516         export function RoutingMessageHandler_get_next_channel_announcements(this_arg: number, starting_point: number, batch_amount: number): number[] {
1517                 if(!isWasmInitialized) {
1518                         throw new Error("initializeWasm() must be awaited first!");
1519                 }
1520                 const nativeResponseValue = wasm.RoutingMessageHandler_get_next_channel_announcements(this_arg, starting_point, batch_amount);
1521                 return nativeResponseValue;
1522         }
1523         // LDKCVec_NodeAnnouncementZ RoutingMessageHandler_get_next_node_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey starting_point, uint8_t batch_amount
1524         export function RoutingMessageHandler_get_next_node_announcements(this_arg: number, starting_point: Uint8Array, batch_amount: number): number[] {
1525                 if(!isWasmInitialized) {
1526                         throw new Error("initializeWasm() must be awaited first!");
1527                 }
1528                 const nativeResponseValue = wasm.RoutingMessageHandler_get_next_node_announcements(this_arg, encodeArray(starting_point), batch_amount);
1529                 return nativeResponseValue;
1530         }
1531         // void RoutingMessageHandler_sync_routing_table LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init
1532         export function RoutingMessageHandler_sync_routing_table(this_arg: number, their_node_id: Uint8Array, init: number): void {
1533                 if(!isWasmInitialized) {
1534                         throw new Error("initializeWasm() must be awaited first!");
1535                 }
1536                 const nativeResponseValue = wasm.RoutingMessageHandler_sync_routing_table(this_arg, encodeArray(their_node_id), init);
1537                 // debug statements here
1538         }
1539         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyChannelRange msg
1540         export function RoutingMessageHandler_handle_reply_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1541                 if(!isWasmInitialized) {
1542                         throw new Error("initializeWasm() must be awaited first!");
1543                 }
1544                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_reply_channel_range(this_arg, encodeArray(their_node_id), msg);
1545                 return nativeResponseValue;
1546         }
1547         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_short_channel_ids_end LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyShortChannelIdsEnd msg
1548         export function RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1549                 if(!isWasmInitialized) {
1550                         throw new Error("initializeWasm() must be awaited first!");
1551                 }
1552                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg, encodeArray(their_node_id), msg);
1553                 return nativeResponseValue;
1554         }
1555         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryChannelRange msg
1556         export function RoutingMessageHandler_handle_query_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1557                 if(!isWasmInitialized) {
1558                         throw new Error("initializeWasm() must be awaited first!");
1559                 }
1560                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_query_channel_range(this_arg, encodeArray(their_node_id), msg);
1561                 return nativeResponseValue;
1562         }
1563         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_short_channel_ids LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryShortChannelIds msg
1564         export function RoutingMessageHandler_handle_query_short_channel_ids(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1565                 if(!isWasmInitialized) {
1566                         throw new Error("initializeWasm() must be awaited first!");
1567                 }
1568                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_query_short_channel_ids(this_arg, encodeArray(their_node_id), msg);
1569                 return nativeResponseValue;
1570         }
1571
1572
1573
1574 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1575
1576                 export interface LDKSocketDescriptor {
1577                         send_data (data: Uint8Array, resume_read: boolean): number;
1578                         disconnect_socket (): void;
1579                         eq (other_arg: number): boolean;
1580                         hash (): number;
1581                 }
1582
1583                 export function LDKSocketDescriptor_new(impl: LDKSocketDescriptor): number {
1584             throw new Error('unimplemented'); // TODO: bind to WASM
1585         }
1586
1587 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1588
1589
1590         // uintptr_t SocketDescriptor_send_data LDKSocketDescriptor *NONNULL_PTR this_arg, struct LDKu8slice data, bool resume_read
1591         export function SocketDescriptor_send_data(this_arg: number, data: Uint8Array, resume_read: boolean): number {
1592                 if(!isWasmInitialized) {
1593                         throw new Error("initializeWasm() must be awaited first!");
1594                 }
1595                 const nativeResponseValue = wasm.SocketDescriptor_send_data(this_arg, encodeArray(data), resume_read);
1596                 return nativeResponseValue;
1597         }
1598         // void SocketDescriptor_disconnect_socket LDKSocketDescriptor *NONNULL_PTR this_arg
1599         export function SocketDescriptor_disconnect_socket(this_arg: number): void {
1600                 if(!isWasmInitialized) {
1601                         throw new Error("initializeWasm() must be awaited first!");
1602                 }
1603                 const nativeResponseValue = wasm.SocketDescriptor_disconnect_socket(this_arg);
1604                 // debug statements here
1605         }
1606         // uint64_t SocketDescriptor_hash LDKSocketDescriptor *NONNULL_PTR this_arg
1607         export function SocketDescriptor_hash(this_arg: number): number {
1608                 if(!isWasmInitialized) {
1609                         throw new Error("initializeWasm() must be awaited first!");
1610                 }
1611                 const nativeResponseValue = wasm.SocketDescriptor_hash(this_arg);
1612                 return nativeResponseValue;
1613         }
1614         // void Transaction_free(struct LDKTransaction _res);
1615         export function Transaction_free(_res: Uint8Array): void {
1616                 if(!isWasmInitialized) {
1617                         throw new Error("initializeWasm() must be awaited first!");
1618                 }
1619                 const nativeResponseValue = wasm.Transaction_free(encodeArray(_res));
1620                 // debug statements here
1621         }
1622         // void TxOut_free(struct LDKTxOut _res);
1623         export function TxOut_free(_res: number): void {
1624                 if(!isWasmInitialized) {
1625                         throw new Error("initializeWasm() must be awaited first!");
1626                 }
1627                 const nativeResponseValue = wasm.TxOut_free(_res);
1628                 // debug statements here
1629         }
1630         // struct LDKTxOut TxOut_clone(const struct LDKTxOut *NONNULL_PTR orig);
1631         export function TxOut_clone(orig: number): number {
1632                 if(!isWasmInitialized) {
1633                         throw new Error("initializeWasm() must be awaited first!");
1634                 }
1635                 const nativeResponseValue = wasm.TxOut_clone(orig);
1636                 return nativeResponseValue;
1637         }
1638         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_ok(struct LDKChannelConfig o);
1639         export function CResult_ChannelConfigDecodeErrorZ_ok(o: number): number {
1640                 if(!isWasmInitialized) {
1641                         throw new Error("initializeWasm() must be awaited first!");
1642                 }
1643                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_ok(o);
1644                 return nativeResponseValue;
1645         }
1646         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_err(struct LDKDecodeError e);
1647         export function CResult_ChannelConfigDecodeErrorZ_err(e: number): number {
1648                 if(!isWasmInitialized) {
1649                         throw new Error("initializeWasm() must be awaited first!");
1650                 }
1651                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_err(e);
1652                 return nativeResponseValue;
1653         }
1654         // void CResult_ChannelConfigDecodeErrorZ_free(struct LDKCResult_ChannelConfigDecodeErrorZ _res);
1655         export function CResult_ChannelConfigDecodeErrorZ_free(_res: number): void {
1656                 if(!isWasmInitialized) {
1657                         throw new Error("initializeWasm() must be awaited first!");
1658                 }
1659                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_free(_res);
1660                 // debug statements here
1661         }
1662         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_clone(const struct LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR orig);
1663         export function CResult_ChannelConfigDecodeErrorZ_clone(orig: number): number {
1664                 if(!isWasmInitialized) {
1665                         throw new Error("initializeWasm() must be awaited first!");
1666                 }
1667                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_clone(orig);
1668                 return nativeResponseValue;
1669         }
1670         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_ok(struct LDKOutPoint o);
1671         export function CResult_OutPointDecodeErrorZ_ok(o: number): number {
1672                 if(!isWasmInitialized) {
1673                         throw new Error("initializeWasm() must be awaited first!");
1674                 }
1675                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_ok(o);
1676                 return nativeResponseValue;
1677         }
1678         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_err(struct LDKDecodeError e);
1679         export function CResult_OutPointDecodeErrorZ_err(e: number): number {
1680                 if(!isWasmInitialized) {
1681                         throw new Error("initializeWasm() must be awaited first!");
1682                 }
1683                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_err(e);
1684                 return nativeResponseValue;
1685         }
1686         // void CResult_OutPointDecodeErrorZ_free(struct LDKCResult_OutPointDecodeErrorZ _res);
1687         export function CResult_OutPointDecodeErrorZ_free(_res: number): void {
1688                 if(!isWasmInitialized) {
1689                         throw new Error("initializeWasm() must be awaited first!");
1690                 }
1691                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_free(_res);
1692                 // debug statements here
1693         }
1694         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_clone(const struct LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR orig);
1695         export function CResult_OutPointDecodeErrorZ_clone(orig: number): number {
1696                 if(!isWasmInitialized) {
1697                         throw new Error("initializeWasm() must be awaited first!");
1698                 }
1699                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_clone(orig);
1700                 return nativeResponseValue;
1701         }
1702         // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_ok(struct LDKSecretKey o);
1703         export function CResult_SecretKeyErrorZ_ok(o: Uint8Array): number {
1704                 if(!isWasmInitialized) {
1705                         throw new Error("initializeWasm() must be awaited first!");
1706                 }
1707                 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_ok(encodeArray(o));
1708                 return nativeResponseValue;
1709         }
1710         // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_err(enum LDKSecp256k1Error e);
1711         export function CResult_SecretKeyErrorZ_err(e: LDKSecp256k1Error): number {
1712                 if(!isWasmInitialized) {
1713                         throw new Error("initializeWasm() must be awaited first!");
1714                 }
1715                 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_err(e);
1716                 return nativeResponseValue;
1717         }
1718         // void CResult_SecretKeyErrorZ_free(struct LDKCResult_SecretKeyErrorZ _res);
1719         export function CResult_SecretKeyErrorZ_free(_res: number): void {
1720                 if(!isWasmInitialized) {
1721                         throw new Error("initializeWasm() must be awaited first!");
1722                 }
1723                 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_free(_res);
1724                 // debug statements here
1725         }
1726         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_ok(struct LDKPublicKey o);
1727         export function CResult_PublicKeyErrorZ_ok(o: Uint8Array): number {
1728                 if(!isWasmInitialized) {
1729                         throw new Error("initializeWasm() must be awaited first!");
1730                 }
1731                 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_ok(encodeArray(o));
1732                 return nativeResponseValue;
1733         }
1734         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_err(enum LDKSecp256k1Error e);
1735         export function CResult_PublicKeyErrorZ_err(e: LDKSecp256k1Error): number {
1736                 if(!isWasmInitialized) {
1737                         throw new Error("initializeWasm() must be awaited first!");
1738                 }
1739                 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_err(e);
1740                 return nativeResponseValue;
1741         }
1742         // void CResult_PublicKeyErrorZ_free(struct LDKCResult_PublicKeyErrorZ _res);
1743         export function CResult_PublicKeyErrorZ_free(_res: number): void {
1744                 if(!isWasmInitialized) {
1745                         throw new Error("initializeWasm() must be awaited first!");
1746                 }
1747                 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_free(_res);
1748                 // debug statements here
1749         }
1750         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_ok(struct LDKTxCreationKeys o);
1751         export function CResult_TxCreationKeysDecodeErrorZ_ok(o: number): number {
1752                 if(!isWasmInitialized) {
1753                         throw new Error("initializeWasm() must be awaited first!");
1754                 }
1755                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_ok(o);
1756                 return nativeResponseValue;
1757         }
1758         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_err(struct LDKDecodeError e);
1759         export function CResult_TxCreationKeysDecodeErrorZ_err(e: number): number {
1760                 if(!isWasmInitialized) {
1761                         throw new Error("initializeWasm() must be awaited first!");
1762                 }
1763                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_err(e);
1764                 return nativeResponseValue;
1765         }
1766         // void CResult_TxCreationKeysDecodeErrorZ_free(struct LDKCResult_TxCreationKeysDecodeErrorZ _res);
1767         export function CResult_TxCreationKeysDecodeErrorZ_free(_res: number): void {
1768                 if(!isWasmInitialized) {
1769                         throw new Error("initializeWasm() must be awaited first!");
1770                 }
1771                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_free(_res);
1772                 // debug statements here
1773         }
1774         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_clone(const struct LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR orig);
1775         export function CResult_TxCreationKeysDecodeErrorZ_clone(orig: number): number {
1776                 if(!isWasmInitialized) {
1777                         throw new Error("initializeWasm() must be awaited first!");
1778                 }
1779                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_clone(orig);
1780                 return nativeResponseValue;
1781         }
1782         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_ok(struct LDKChannelPublicKeys o);
1783         export function CResult_ChannelPublicKeysDecodeErrorZ_ok(o: number): number {
1784                 if(!isWasmInitialized) {
1785                         throw new Error("initializeWasm() must be awaited first!");
1786                 }
1787                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_ok(o);
1788                 return nativeResponseValue;
1789         }
1790         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_err(struct LDKDecodeError e);
1791         export function CResult_ChannelPublicKeysDecodeErrorZ_err(e: number): number {
1792                 if(!isWasmInitialized) {
1793                         throw new Error("initializeWasm() must be awaited first!");
1794                 }
1795                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_err(e);
1796                 return nativeResponseValue;
1797         }
1798         // void CResult_ChannelPublicKeysDecodeErrorZ_free(struct LDKCResult_ChannelPublicKeysDecodeErrorZ _res);
1799         export function CResult_ChannelPublicKeysDecodeErrorZ_free(_res: number): void {
1800                 if(!isWasmInitialized) {
1801                         throw new Error("initializeWasm() must be awaited first!");
1802                 }
1803                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_free(_res);
1804                 // debug statements here
1805         }
1806         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_clone(const struct LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR orig);
1807         export function CResult_ChannelPublicKeysDecodeErrorZ_clone(orig: number): number {
1808                 if(!isWasmInitialized) {
1809                         throw new Error("initializeWasm() must be awaited first!");
1810                 }
1811                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_clone(orig);
1812                 return nativeResponseValue;
1813         }
1814         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_ok(struct LDKTxCreationKeys o);
1815         export function CResult_TxCreationKeysErrorZ_ok(o: number): number {
1816                 if(!isWasmInitialized) {
1817                         throw new Error("initializeWasm() must be awaited first!");
1818                 }
1819                 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_ok(o);
1820                 return nativeResponseValue;
1821         }
1822         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_err(enum LDKSecp256k1Error e);
1823         export function CResult_TxCreationKeysErrorZ_err(e: LDKSecp256k1Error): number {
1824                 if(!isWasmInitialized) {
1825                         throw new Error("initializeWasm() must be awaited first!");
1826                 }
1827                 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_err(e);
1828                 return nativeResponseValue;
1829         }
1830         // void CResult_TxCreationKeysErrorZ_free(struct LDKCResult_TxCreationKeysErrorZ _res);
1831         export function CResult_TxCreationKeysErrorZ_free(_res: number): void {
1832                 if(!isWasmInitialized) {
1833                         throw new Error("initializeWasm() must be awaited first!");
1834                 }
1835                 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_free(_res);
1836                 // debug statements here
1837         }
1838         // struct LDKCOption_u32Z COption_u32Z_some(uint32_t o);
1839         export function COption_u32Z_some(o: number): number {
1840                 if(!isWasmInitialized) {
1841                         throw new Error("initializeWasm() must be awaited first!");
1842                 }
1843                 const nativeResponseValue = wasm.COption_u32Z_some(o);
1844                 return nativeResponseValue;
1845         }
1846         // struct LDKCOption_u32Z COption_u32Z_none(void);
1847         export function COption_u32Z_none(): number {
1848                 if(!isWasmInitialized) {
1849                         throw new Error("initializeWasm() must be awaited first!");
1850                 }
1851                 const nativeResponseValue = wasm.COption_u32Z_none();
1852                 return nativeResponseValue;
1853         }
1854         // void COption_u32Z_free(struct LDKCOption_u32Z _res);
1855         export function COption_u32Z_free(_res: number): void {
1856                 if(!isWasmInitialized) {
1857                         throw new Error("initializeWasm() must be awaited first!");
1858                 }
1859                 const nativeResponseValue = wasm.COption_u32Z_free(_res);
1860                 // debug statements here
1861         }
1862         // struct LDKCOption_u32Z COption_u32Z_clone(const struct LDKCOption_u32Z *NONNULL_PTR orig);
1863         export function COption_u32Z_clone(orig: number): number {
1864                 if(!isWasmInitialized) {
1865                         throw new Error("initializeWasm() must be awaited first!");
1866                 }
1867                 const nativeResponseValue = wasm.COption_u32Z_clone(orig);
1868                 return nativeResponseValue;
1869         }
1870         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(struct LDKHTLCOutputInCommitment o);
1871         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o: number): number {
1872                 if(!isWasmInitialized) {
1873                         throw new Error("initializeWasm() must be awaited first!");
1874                 }
1875                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o);
1876                 return nativeResponseValue;
1877         }
1878         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_err(struct LDKDecodeError e);
1879         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e: number): number {
1880                 if(!isWasmInitialized) {
1881                         throw new Error("initializeWasm() must be awaited first!");
1882                 }
1883                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e);
1884                 return nativeResponseValue;
1885         }
1886         // void CResult_HTLCOutputInCommitmentDecodeErrorZ_free(struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ _res);
1887         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res: number): void {
1888                 if(!isWasmInitialized) {
1889                         throw new Error("initializeWasm() must be awaited first!");
1890                 }
1891                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res);
1892                 // debug statements here
1893         }
1894         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(const struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR orig);
1895         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig: number): number {
1896                 if(!isWasmInitialized) {
1897                         throw new Error("initializeWasm() must be awaited first!");
1898                 }
1899                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig);
1900                 return nativeResponseValue;
1901         }
1902         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(struct LDKCounterpartyChannelTransactionParameters o);
1903         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
1904                 if(!isWasmInitialized) {
1905                         throw new Error("initializeWasm() must be awaited first!");
1906                 }
1907                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o);
1908                 return nativeResponseValue;
1909         }
1910         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
1911         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e: number): number {
1912                 if(!isWasmInitialized) {
1913                         throw new Error("initializeWasm() must be awaited first!");
1914                 }
1915                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e);
1916                 return nativeResponseValue;
1917         }
1918         // void CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ _res);
1919         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
1920                 if(!isWasmInitialized) {
1921                         throw new Error("initializeWasm() must be awaited first!");
1922                 }
1923                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res);
1924                 // debug statements here
1925         }
1926         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
1927         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
1928                 if(!isWasmInitialized) {
1929                         throw new Error("initializeWasm() must be awaited first!");
1930                 }
1931                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig);
1932                 return nativeResponseValue;
1933         }
1934         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_ok(struct LDKChannelTransactionParameters o);
1935         export function CResult_ChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
1936                 if(!isWasmInitialized) {
1937                         throw new Error("initializeWasm() must be awaited first!");
1938                 }
1939                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_ok(o);
1940                 return nativeResponseValue;
1941         }
1942         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
1943         export function CResult_ChannelTransactionParametersDecodeErrorZ_err(e: number): number {
1944                 if(!isWasmInitialized) {
1945                         throw new Error("initializeWasm() must be awaited first!");
1946                 }
1947                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_err(e);
1948                 return nativeResponseValue;
1949         }
1950         // void CResult_ChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_ChannelTransactionParametersDecodeErrorZ _res);
1951         export function CResult_ChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
1952                 if(!isWasmInitialized) {
1953                         throw new Error("initializeWasm() must be awaited first!");
1954                 }
1955                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_free(_res);
1956                 // debug statements here
1957         }
1958         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
1959         export function CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
1960                 if(!isWasmInitialized) {
1961                         throw new Error("initializeWasm() must be awaited first!");
1962                 }
1963                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig);
1964                 return nativeResponseValue;
1965         }
1966         // void CVec_SignatureZ_free(struct LDKCVec_SignatureZ _res);
1967         export function CVec_SignatureZ_free(_res: Uint8Array[]): void {
1968                 if(!isWasmInitialized) {
1969                         throw new Error("initializeWasm() must be awaited first!");
1970                 }
1971                 const nativeResponseValue = wasm.CVec_SignatureZ_free(_res);
1972                 // debug statements here
1973         }
1974         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_ok(struct LDKHolderCommitmentTransaction o);
1975         export function CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o: number): number {
1976                 if(!isWasmInitialized) {
1977                         throw new Error("initializeWasm() must be awaited first!");
1978                 }
1979                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o);
1980                 return nativeResponseValue;
1981         }
1982         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
1983         export function CResult_HolderCommitmentTransactionDecodeErrorZ_err(e: number): number {
1984                 if(!isWasmInitialized) {
1985                         throw new Error("initializeWasm() must be awaited first!");
1986                 }
1987                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_err(e);
1988                 return nativeResponseValue;
1989         }
1990         // void CResult_HolderCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ _res);
1991         export function CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res: number): void {
1992                 if(!isWasmInitialized) {
1993                         throw new Error("initializeWasm() must be awaited first!");
1994                 }
1995                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res);
1996                 // debug statements here
1997         }
1998         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
1999         export function CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
2000                 if(!isWasmInitialized) {
2001                         throw new Error("initializeWasm() must be awaited first!");
2002                 }
2003                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig);
2004                 return nativeResponseValue;
2005         }
2006         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(struct LDKBuiltCommitmentTransaction o);
2007         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o: number): number {
2008                 if(!isWasmInitialized) {
2009                         throw new Error("initializeWasm() must be awaited first!");
2010                 }
2011                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o);
2012                 return nativeResponseValue;
2013         }
2014         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
2015         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e: number): number {
2016                 if(!isWasmInitialized) {
2017                         throw new Error("initializeWasm() must be awaited first!");
2018                 }
2019                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e);
2020                 return nativeResponseValue;
2021         }
2022         // void CResult_BuiltCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ _res);
2023         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res: number): void {
2024                 if(!isWasmInitialized) {
2025                         throw new Error("initializeWasm() must be awaited first!");
2026                 }
2027                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res);
2028                 // debug statements here
2029         }
2030         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
2031         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
2032                 if(!isWasmInitialized) {
2033                         throw new Error("initializeWasm() must be awaited first!");
2034                 }
2035                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig);
2036                 return nativeResponseValue;
2037         }
2038         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_ok(struct LDKCommitmentTransaction o);
2039         export function CResult_CommitmentTransactionDecodeErrorZ_ok(o: number): number {
2040                 if(!isWasmInitialized) {
2041                         throw new Error("initializeWasm() must be awaited first!");
2042                 }
2043                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_ok(o);
2044                 return nativeResponseValue;
2045         }
2046         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
2047         export function CResult_CommitmentTransactionDecodeErrorZ_err(e: number): number {
2048                 if(!isWasmInitialized) {
2049                         throw new Error("initializeWasm() must be awaited first!");
2050                 }
2051                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_err(e);
2052                 return nativeResponseValue;
2053         }
2054         // void CResult_CommitmentTransactionDecodeErrorZ_free(struct LDKCResult_CommitmentTransactionDecodeErrorZ _res);
2055         export function CResult_CommitmentTransactionDecodeErrorZ_free(_res: number): void {
2056                 if(!isWasmInitialized) {
2057                         throw new Error("initializeWasm() must be awaited first!");
2058                 }
2059                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_free(_res);
2060                 // debug statements here
2061         }
2062         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
2063         export function CResult_CommitmentTransactionDecodeErrorZ_clone(orig: number): number {
2064                 if(!isWasmInitialized) {
2065                         throw new Error("initializeWasm() must be awaited first!");
2066                 }
2067                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_clone(orig);
2068                 return nativeResponseValue;
2069         }
2070         // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_ok(struct LDKTrustedCommitmentTransaction o);
2071         export function CResult_TrustedCommitmentTransactionNoneZ_ok(o: number): number {
2072                 if(!isWasmInitialized) {
2073                         throw new Error("initializeWasm() must be awaited first!");
2074                 }
2075                 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_ok(o);
2076                 return nativeResponseValue;
2077         }
2078         // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_err(void);
2079         export function CResult_TrustedCommitmentTransactionNoneZ_err(): number {
2080                 if(!isWasmInitialized) {
2081                         throw new Error("initializeWasm() must be awaited first!");
2082                 }
2083                 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_err();
2084                 return nativeResponseValue;
2085         }
2086         // void CResult_TrustedCommitmentTransactionNoneZ_free(struct LDKCResult_TrustedCommitmentTransactionNoneZ _res);
2087         export function CResult_TrustedCommitmentTransactionNoneZ_free(_res: number): void {
2088                 if(!isWasmInitialized) {
2089                         throw new Error("initializeWasm() must be awaited first!");
2090                 }
2091                 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_free(_res);
2092                 // debug statements here
2093         }
2094         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_ok(struct LDKCVec_SignatureZ o);
2095         export function CResult_CVec_SignatureZNoneZ_ok(o: Uint8Array[]): number {
2096                 if(!isWasmInitialized) {
2097                         throw new Error("initializeWasm() must be awaited first!");
2098                 }
2099                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_ok(o);
2100                 return nativeResponseValue;
2101         }
2102         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_err(void);
2103         export function CResult_CVec_SignatureZNoneZ_err(): number {
2104                 if(!isWasmInitialized) {
2105                         throw new Error("initializeWasm() must be awaited first!");
2106                 }
2107                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_err();
2108                 return nativeResponseValue;
2109         }
2110         // void CResult_CVec_SignatureZNoneZ_free(struct LDKCResult_CVec_SignatureZNoneZ _res);
2111         export function CResult_CVec_SignatureZNoneZ_free(_res: number): void {
2112                 if(!isWasmInitialized) {
2113                         throw new Error("initializeWasm() must be awaited first!");
2114                 }
2115                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_free(_res);
2116                 // debug statements here
2117         }
2118         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_clone(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR orig);
2119         export function CResult_CVec_SignatureZNoneZ_clone(orig: number): number {
2120                 if(!isWasmInitialized) {
2121                         throw new Error("initializeWasm() must be awaited first!");
2122                 }
2123                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_clone(orig);
2124                 return nativeResponseValue;
2125         }
2126         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_ok(struct LDKChannelMonitorUpdate o);
2127         export function CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o: number): number {
2128                 if(!isWasmInitialized) {
2129                         throw new Error("initializeWasm() must be awaited first!");
2130                 }
2131                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o);
2132                 return nativeResponseValue;
2133         }
2134         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_err(struct LDKDecodeError e);
2135         export function CResult_ChannelMonitorUpdateDecodeErrorZ_err(e: number): number {
2136                 if(!isWasmInitialized) {
2137                         throw new Error("initializeWasm() must be awaited first!");
2138                 }
2139                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_err(e);
2140                 return nativeResponseValue;
2141         }
2142         // void CResult_ChannelMonitorUpdateDecodeErrorZ_free(struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ _res);
2143         export function CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res: number): void {
2144                 if(!isWasmInitialized) {
2145                         throw new Error("initializeWasm() must be awaited first!");
2146                 }
2147                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res);
2148                 // debug statements here
2149         }
2150         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR orig);
2151         export function CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig: number): number {
2152                 if(!isWasmInitialized) {
2153                         throw new Error("initializeWasm() must be awaited first!");
2154                 }
2155                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig);
2156                 return nativeResponseValue;
2157         }
2158         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_ok(struct LDKHTLCUpdate o);
2159         export function CResult_HTLCUpdateDecodeErrorZ_ok(o: number): number {
2160                 if(!isWasmInitialized) {
2161                         throw new Error("initializeWasm() must be awaited first!");
2162                 }
2163                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_ok(o);
2164                 return nativeResponseValue;
2165         }
2166         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_err(struct LDKDecodeError e);
2167         export function CResult_HTLCUpdateDecodeErrorZ_err(e: number): number {
2168                 if(!isWasmInitialized) {
2169                         throw new Error("initializeWasm() must be awaited first!");
2170                 }
2171                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_err(e);
2172                 return nativeResponseValue;
2173         }
2174         // void CResult_HTLCUpdateDecodeErrorZ_free(struct LDKCResult_HTLCUpdateDecodeErrorZ _res);
2175         export function CResult_HTLCUpdateDecodeErrorZ_free(_res: number): void {
2176                 if(!isWasmInitialized) {
2177                         throw new Error("initializeWasm() must be awaited first!");
2178                 }
2179                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_free(_res);
2180                 // debug statements here
2181         }
2182         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_clone(const struct LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR orig);
2183         export function CResult_HTLCUpdateDecodeErrorZ_clone(orig: number): number {
2184                 if(!isWasmInitialized) {
2185                         throw new Error("initializeWasm() must be awaited first!");
2186                 }
2187                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_clone(orig);
2188                 return nativeResponseValue;
2189         }
2190         // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_ok(void);
2191         export function CResult_NoneMonitorUpdateErrorZ_ok(): number {
2192                 if(!isWasmInitialized) {
2193                         throw new Error("initializeWasm() must be awaited first!");
2194                 }
2195                 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_ok();
2196                 return nativeResponseValue;
2197         }
2198         // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_err(struct LDKMonitorUpdateError e);
2199         export function CResult_NoneMonitorUpdateErrorZ_err(e: number): number {
2200                 if(!isWasmInitialized) {
2201                         throw new Error("initializeWasm() must be awaited first!");
2202                 }
2203                 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_err(e);
2204                 return nativeResponseValue;
2205         }
2206         // void CResult_NoneMonitorUpdateErrorZ_free(struct LDKCResult_NoneMonitorUpdateErrorZ _res);
2207         export function CResult_NoneMonitorUpdateErrorZ_free(_res: number): void {
2208                 if(!isWasmInitialized) {
2209                         throw new Error("initializeWasm() must be awaited first!");
2210                 }
2211                 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_free(_res);
2212                 // debug statements here
2213         }
2214         // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_clone(const struct LDKCResult_NoneMonitorUpdateErrorZ *NONNULL_PTR orig);
2215         export function CResult_NoneMonitorUpdateErrorZ_clone(orig: number): number {
2216                 if(!isWasmInitialized) {
2217                         throw new Error("initializeWasm() must be awaited first!");
2218                 }
2219                 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_clone(orig);
2220                 return nativeResponseValue;
2221         }
2222         // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_new(struct LDKOutPoint a, struct LDKCVec_u8Z b);
2223         export function C2Tuple_OutPointScriptZ_new(a: number, b: Uint8Array): number {
2224                 if(!isWasmInitialized) {
2225                         throw new Error("initializeWasm() must be awaited first!");
2226                 }
2227                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_new(a, encodeArray(b));
2228                 return nativeResponseValue;
2229         }
2230         // void C2Tuple_OutPointScriptZ_free(struct LDKC2Tuple_OutPointScriptZ _res);
2231         export function C2Tuple_OutPointScriptZ_free(_res: number): void {
2232                 if(!isWasmInitialized) {
2233                         throw new Error("initializeWasm() must be awaited first!");
2234                 }
2235                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_free(_res);
2236                 // debug statements here
2237         }
2238         // struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_new(uint32_t a, struct LDKCVec_u8Z b);
2239         export function C2Tuple_u32ScriptZ_new(a: number, b: Uint8Array): number {
2240                 if(!isWasmInitialized) {
2241                         throw new Error("initializeWasm() must be awaited first!");
2242                 }
2243                 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_new(a, encodeArray(b));
2244                 return nativeResponseValue;
2245         }
2246         // void C2Tuple_u32ScriptZ_free(struct LDKC2Tuple_u32ScriptZ _res);
2247         export function C2Tuple_u32ScriptZ_free(_res: number): void {
2248                 if(!isWasmInitialized) {
2249                         throw new Error("initializeWasm() must be awaited first!");
2250                 }
2251                 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_free(_res);
2252                 // debug statements here
2253         }
2254         // void CVec_C2Tuple_u32ScriptZZ_free(struct LDKCVec_C2Tuple_u32ScriptZZ _res);
2255         export function CVec_C2Tuple_u32ScriptZZ_free(_res: number[]): void {
2256                 if(!isWasmInitialized) {
2257                         throw new Error("initializeWasm() must be awaited first!");
2258                 }
2259                 const nativeResponseValue = wasm.CVec_C2Tuple_u32ScriptZZ_free(_res);
2260                 // debug statements here
2261         }
2262         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32ScriptZZ b);
2263         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(a: Uint8Array, b: number[]): number {
2264                 if(!isWasmInitialized) {
2265                         throw new Error("initializeWasm() must be awaited first!");
2266                 }
2267                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(encodeArray(a), b);
2268                 return nativeResponseValue;
2269         }
2270         // void C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ _res);
2271         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(_res: number): void {
2272                 if(!isWasmInitialized) {
2273                         throw new Error("initializeWasm() must be awaited first!");
2274                 }
2275                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(_res);
2276                 // debug statements here
2277         }
2278         // void CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ _res);
2279         export function CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res: number[]): void {
2280                 if(!isWasmInitialized) {
2281                         throw new Error("initializeWasm() must be awaited first!");
2282                 }
2283                 const nativeResponseValue = wasm.CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res);
2284                 // debug statements here
2285         }
2286         // void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res);
2287         export function CVec_MonitorEventZ_free(_res: number[]): void {
2288                 if(!isWasmInitialized) {
2289                         throw new Error("initializeWasm() must be awaited first!");
2290                 }
2291                 const nativeResponseValue = wasm.CVec_MonitorEventZ_free(_res);
2292                 // debug statements here
2293         }
2294         // void CVec_EventZ_free(struct LDKCVec_EventZ _res);
2295         export function CVec_EventZ_free(_res: number[]): void {
2296                 if(!isWasmInitialized) {
2297                         throw new Error("initializeWasm() must be awaited first!");
2298                 }
2299                 const nativeResponseValue = wasm.CVec_EventZ_free(_res);
2300                 // debug statements here
2301         }
2302         // void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res);
2303         export function CVec_TransactionZ_free(_res: Uint8Array[]): void {
2304                 if(!isWasmInitialized) {
2305                         throw new Error("initializeWasm() must be awaited first!");
2306                 }
2307                 const nativeResponseValue = wasm.CVec_TransactionZ_free(_res);
2308                 // debug statements here
2309         }
2310         // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, struct LDKTransaction b);
2311         export function C2Tuple_usizeTransactionZ_new(a: number, b: Uint8Array): number {
2312                 if(!isWasmInitialized) {
2313                         throw new Error("initializeWasm() must be awaited first!");
2314                 }
2315                 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_new(a, encodeArray(b));
2316                 return nativeResponseValue;
2317         }
2318         // void C2Tuple_usizeTransactionZ_free(struct LDKC2Tuple_usizeTransactionZ _res);
2319         export function C2Tuple_usizeTransactionZ_free(_res: number): void {
2320                 if(!isWasmInitialized) {
2321                         throw new Error("initializeWasm() must be awaited first!");
2322                 }
2323                 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_free(_res);
2324                 // debug statements here
2325         }
2326         // void CVec_C2Tuple_usizeTransactionZZ_free(struct LDKCVec_C2Tuple_usizeTransactionZZ _res);
2327         export function CVec_C2Tuple_usizeTransactionZZ_free(_res: number[]): void {
2328                 if(!isWasmInitialized) {
2329                         throw new Error("initializeWasm() must be awaited first!");
2330                 }
2331                 const nativeResponseValue = wasm.CVec_C2Tuple_usizeTransactionZZ_free(_res);
2332                 // debug statements here
2333         }
2334         // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_clone(const struct LDKC2Tuple_u32TxOutZ *NONNULL_PTR orig);
2335         export function C2Tuple_u32TxOutZ_clone(orig: number): number {
2336                 if(!isWasmInitialized) {
2337                         throw new Error("initializeWasm() must be awaited first!");
2338                 }
2339                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_clone(orig);
2340                 return nativeResponseValue;
2341         }
2342         // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_new(uint32_t a, struct LDKTxOut b);
2343         export function C2Tuple_u32TxOutZ_new(a: number, b: number): number {
2344                 if(!isWasmInitialized) {
2345                         throw new Error("initializeWasm() must be awaited first!");
2346                 }
2347                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_new(a, b);
2348                 return nativeResponseValue;
2349         }
2350         // void C2Tuple_u32TxOutZ_free(struct LDKC2Tuple_u32TxOutZ _res);
2351         export function C2Tuple_u32TxOutZ_free(_res: number): void {
2352                 if(!isWasmInitialized) {
2353                         throw new Error("initializeWasm() must be awaited first!");
2354                 }
2355                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_free(_res);
2356                 // debug statements here
2357         }
2358         // void CVec_C2Tuple_u32TxOutZZ_free(struct LDKCVec_C2Tuple_u32TxOutZZ _res);
2359         export function CVec_C2Tuple_u32TxOutZZ_free(_res: number[]): void {
2360                 if(!isWasmInitialized) {
2361                         throw new Error("initializeWasm() must be awaited first!");
2362                 }
2363                 const nativeResponseValue = wasm.CVec_C2Tuple_u32TxOutZZ_free(_res);
2364                 // debug statements here
2365         }
2366         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32TxOutZZ b);
2367         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a: Uint8Array, b: number[]): number {
2368                 if(!isWasmInitialized) {
2369                         throw new Error("initializeWasm() must be awaited first!");
2370                 }
2371                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(encodeArray(a), b);
2372                 return nativeResponseValue;
2373         }
2374         // void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res);
2375         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res: number): void {
2376                 if(!isWasmInitialized) {
2377                         throw new Error("initializeWasm() must be awaited first!");
2378                 }
2379                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res);
2380                 // debug statements here
2381         }
2382         // void CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ _res);
2383         export function CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res: number[]): void {
2384                 if(!isWasmInitialized) {
2385                         throw new Error("initializeWasm() must be awaited first!");
2386                 }
2387                 const nativeResponseValue = wasm.CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res);
2388                 // debug statements here
2389         }
2390         // void CVec_TxidZ_free(struct LDKCVec_TxidZ _res);
2391         export function CVec_TxidZ_free(_res: Uint8Array[]): void {
2392                 if(!isWasmInitialized) {
2393                         throw new Error("initializeWasm() must be awaited first!");
2394                 }
2395                 const nativeResponseValue = wasm.CVec_TxidZ_free(_res);
2396                 // debug statements here
2397         }
2398         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void);
2399         export function CResult_NoneChannelMonitorUpdateErrZ_ok(): number {
2400                 if(!isWasmInitialized) {
2401                         throw new Error("initializeWasm() must be awaited first!");
2402                 }
2403                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_ok();
2404                 return nativeResponseValue;
2405         }
2406         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_err(enum LDKChannelMonitorUpdateErr e);
2407         export function CResult_NoneChannelMonitorUpdateErrZ_err(e: LDKChannelMonitorUpdateErr): number {
2408                 if(!isWasmInitialized) {
2409                         throw new Error("initializeWasm() must be awaited first!");
2410                 }
2411                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_err(e);
2412                 return nativeResponseValue;
2413         }
2414         // void CResult_NoneChannelMonitorUpdateErrZ_free(struct LDKCResult_NoneChannelMonitorUpdateErrZ _res);
2415         export function CResult_NoneChannelMonitorUpdateErrZ_free(_res: number): void {
2416                 if(!isWasmInitialized) {
2417                         throw new Error("initializeWasm() must be awaited first!");
2418                 }
2419                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_free(_res);
2420                 // debug statements here
2421         }
2422         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_clone(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR orig);
2423         export function CResult_NoneChannelMonitorUpdateErrZ_clone(orig: number): number {
2424                 if(!isWasmInitialized) {
2425                         throw new Error("initializeWasm() must be awaited first!");
2426                 }
2427                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_clone(orig);
2428                 return nativeResponseValue;
2429         }
2430         // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b);
2431         export function C2Tuple_BlockHashChannelMonitorZ_new(a: Uint8Array, b: number): number {
2432                 if(!isWasmInitialized) {
2433                         throw new Error("initializeWasm() must be awaited first!");
2434                 }
2435                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_new(encodeArray(a), b);
2436                 return nativeResponseValue;
2437         }
2438         // void C2Tuple_BlockHashChannelMonitorZ_free(struct LDKC2Tuple_BlockHashChannelMonitorZ _res);
2439         export function C2Tuple_BlockHashChannelMonitorZ_free(_res: number): void {
2440                 if(!isWasmInitialized) {
2441                         throw new Error("initializeWasm() must be awaited first!");
2442                 }
2443                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_free(_res);
2444                 // debug statements here
2445         }
2446         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelMonitorZ o);
2447         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o: number): number {
2448                 if(!isWasmInitialized) {
2449                         throw new Error("initializeWasm() must be awaited first!");
2450                 }
2451                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o);
2452                 return nativeResponseValue;
2453         }
2454         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(struct LDKDecodeError e);
2455         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e: number): number {
2456                 if(!isWasmInitialized) {
2457                         throw new Error("initializeWasm() must be awaited first!");
2458                 }
2459                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e);
2460                 return nativeResponseValue;
2461         }
2462         // void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res);
2463         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res: number): void {
2464                 if(!isWasmInitialized) {
2465                         throw new Error("initializeWasm() must be awaited first!");
2466                 }
2467                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res);
2468                 // debug statements here
2469         }
2470         // void CVec_RouteHopZ_free(struct LDKCVec_RouteHopZ _res);
2471         export function CVec_RouteHopZ_free(_res: number[]): void {
2472                 if(!isWasmInitialized) {
2473                         throw new Error("initializeWasm() must be awaited first!");
2474                 }
2475                 const nativeResponseValue = wasm.CVec_RouteHopZ_free(_res);
2476                 // debug statements here
2477         }
2478         // void CVec_CVec_RouteHopZZ_free(struct LDKCVec_CVec_RouteHopZZ _res);
2479         export function CVec_CVec_RouteHopZZ_free(_res: number[][]): void {
2480                 if(!isWasmInitialized) {
2481                         throw new Error("initializeWasm() must be awaited first!");
2482                 }
2483                 const nativeResponseValue = wasm.CVec_CVec_RouteHopZZ_free(_res);
2484                 // debug statements here
2485         }
2486         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_ok(struct LDKRoute o);
2487         export function CResult_RouteDecodeErrorZ_ok(o: number): number {
2488                 if(!isWasmInitialized) {
2489                         throw new Error("initializeWasm() must be awaited first!");
2490                 }
2491                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_ok(o);
2492                 return nativeResponseValue;
2493         }
2494         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_err(struct LDKDecodeError e);
2495         export function CResult_RouteDecodeErrorZ_err(e: number): number {
2496                 if(!isWasmInitialized) {
2497                         throw new Error("initializeWasm() must be awaited first!");
2498                 }
2499                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_err(e);
2500                 return nativeResponseValue;
2501         }
2502         // void CResult_RouteDecodeErrorZ_free(struct LDKCResult_RouteDecodeErrorZ _res);
2503         export function CResult_RouteDecodeErrorZ_free(_res: number): void {
2504                 if(!isWasmInitialized) {
2505                         throw new Error("initializeWasm() must be awaited first!");
2506                 }
2507                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_free(_res);
2508                 // debug statements here
2509         }
2510         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_clone(const struct LDKCResult_RouteDecodeErrorZ *NONNULL_PTR orig);
2511         export function CResult_RouteDecodeErrorZ_clone(orig: number): number {
2512                 if(!isWasmInitialized) {
2513                         throw new Error("initializeWasm() must be awaited first!");
2514                 }
2515                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_clone(orig);
2516                 return nativeResponseValue;
2517         }
2518         // struct LDKCOption_u64Z COption_u64Z_some(uint64_t o);
2519         export function COption_u64Z_some(o: number): number {
2520                 if(!isWasmInitialized) {
2521                         throw new Error("initializeWasm() must be awaited first!");
2522                 }
2523                 const nativeResponseValue = wasm.COption_u64Z_some(o);
2524                 return nativeResponseValue;
2525         }
2526         // struct LDKCOption_u64Z COption_u64Z_none(void);
2527         export function COption_u64Z_none(): number {
2528                 if(!isWasmInitialized) {
2529                         throw new Error("initializeWasm() must be awaited first!");
2530                 }
2531                 const nativeResponseValue = wasm.COption_u64Z_none();
2532                 return nativeResponseValue;
2533         }
2534         // void COption_u64Z_free(struct LDKCOption_u64Z _res);
2535         export function COption_u64Z_free(_res: number): void {
2536                 if(!isWasmInitialized) {
2537                         throw new Error("initializeWasm() must be awaited first!");
2538                 }
2539                 const nativeResponseValue = wasm.COption_u64Z_free(_res);
2540                 // debug statements here
2541         }
2542         // struct LDKCOption_u64Z COption_u64Z_clone(const struct LDKCOption_u64Z *NONNULL_PTR orig);
2543         export function COption_u64Z_clone(orig: number): number {
2544                 if(!isWasmInitialized) {
2545                         throw new Error("initializeWasm() must be awaited first!");
2546                 }
2547                 const nativeResponseValue = wasm.COption_u64Z_clone(orig);
2548                 return nativeResponseValue;
2549         }
2550         // void CVec_ChannelDetailsZ_free(struct LDKCVec_ChannelDetailsZ _res);
2551         export function CVec_ChannelDetailsZ_free(_res: number[]): void {
2552                 if(!isWasmInitialized) {
2553                         throw new Error("initializeWasm() must be awaited first!");
2554                 }
2555                 const nativeResponseValue = wasm.CVec_ChannelDetailsZ_free(_res);
2556                 // debug statements here
2557         }
2558         // void CVec_RouteHintZ_free(struct LDKCVec_RouteHintZ _res);
2559         export function CVec_RouteHintZ_free(_res: number[]): void {
2560                 if(!isWasmInitialized) {
2561                         throw new Error("initializeWasm() must be awaited first!");
2562                 }
2563                 const nativeResponseValue = wasm.CVec_RouteHintZ_free(_res);
2564                 // debug statements here
2565         }
2566         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_ok(struct LDKRoute o);
2567         export function CResult_RouteLightningErrorZ_ok(o: number): number {
2568                 if(!isWasmInitialized) {
2569                         throw new Error("initializeWasm() must be awaited first!");
2570                 }
2571                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_ok(o);
2572                 return nativeResponseValue;
2573         }
2574         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_err(struct LDKLightningError e);
2575         export function CResult_RouteLightningErrorZ_err(e: number): number {
2576                 if(!isWasmInitialized) {
2577                         throw new Error("initializeWasm() must be awaited first!");
2578                 }
2579                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_err(e);
2580                 return nativeResponseValue;
2581         }
2582         // void CResult_RouteLightningErrorZ_free(struct LDKCResult_RouteLightningErrorZ _res);
2583         export function CResult_RouteLightningErrorZ_free(_res: number): void {
2584                 if(!isWasmInitialized) {
2585                         throw new Error("initializeWasm() must be awaited first!");
2586                 }
2587                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_free(_res);
2588                 // debug statements here
2589         }
2590         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_clone(const struct LDKCResult_RouteLightningErrorZ *NONNULL_PTR orig);
2591         export function CResult_RouteLightningErrorZ_clone(orig: number): number {
2592                 if(!isWasmInitialized) {
2593                         throw new Error("initializeWasm() must be awaited first!");
2594                 }
2595                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_clone(orig);
2596                 return nativeResponseValue;
2597         }
2598         // void CVec_MessageSendEventZ_free(struct LDKCVec_MessageSendEventZ _res);
2599         export function CVec_MessageSendEventZ_free(_res: number[]): void {
2600                 if(!isWasmInitialized) {
2601                         throw new Error("initializeWasm() must be awaited first!");
2602                 }
2603                 const nativeResponseValue = wasm.CVec_MessageSendEventZ_free(_res);
2604                 // debug statements here
2605         }
2606         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_ok(bool o);
2607         export function CResult_boolLightningErrorZ_ok(o: boolean): number {
2608                 if(!isWasmInitialized) {
2609                         throw new Error("initializeWasm() must be awaited first!");
2610                 }
2611                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_ok(o);
2612                 return nativeResponseValue;
2613         }
2614         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_err(struct LDKLightningError e);
2615         export function CResult_boolLightningErrorZ_err(e: number): number {
2616                 if(!isWasmInitialized) {
2617                         throw new Error("initializeWasm() must be awaited first!");
2618                 }
2619                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_err(e);
2620                 return nativeResponseValue;
2621         }
2622         // void CResult_boolLightningErrorZ_free(struct LDKCResult_boolLightningErrorZ _res);
2623         export function CResult_boolLightningErrorZ_free(_res: number): void {
2624                 if(!isWasmInitialized) {
2625                         throw new Error("initializeWasm() must be awaited first!");
2626                 }
2627                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_free(_res);
2628                 // debug statements here
2629         }
2630         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_clone(const struct LDKCResult_boolLightningErrorZ *NONNULL_PTR orig);
2631         export function CResult_boolLightningErrorZ_clone(orig: number): number {
2632                 if(!isWasmInitialized) {
2633                         throw new Error("initializeWasm() must be awaited first!");
2634                 }
2635                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_clone(orig);
2636                 return nativeResponseValue;
2637         }
2638         // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(const struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR orig);
2639         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig: number): number {
2640                 if(!isWasmInitialized) {
2641                         throw new Error("initializeWasm() must be awaited first!");
2642                 }
2643                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig);
2644                 return nativeResponseValue;
2645         }
2646         // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(struct LDKChannelAnnouncement a, struct LDKChannelUpdate b, struct LDKChannelUpdate c);
2647         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a: number, b: number, c: number): number {
2648                 if(!isWasmInitialized) {
2649                         throw new Error("initializeWasm() must be awaited first!");
2650                 }
2651                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a, b, c);
2652                 return nativeResponseValue;
2653         }
2654         // void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res);
2655         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res: number): void {
2656                 if(!isWasmInitialized) {
2657                         throw new Error("initializeWasm() must be awaited first!");
2658                 }
2659                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res);
2660                 // debug statements here
2661         }
2662         // void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res);
2663         export function CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res: number[]): void {
2664                 if(!isWasmInitialized) {
2665                         throw new Error("initializeWasm() must be awaited first!");
2666                 }
2667                 const nativeResponseValue = wasm.CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res);
2668                 // debug statements here
2669         }
2670         // void CVec_NodeAnnouncementZ_free(struct LDKCVec_NodeAnnouncementZ _res);
2671         export function CVec_NodeAnnouncementZ_free(_res: number[]): void {
2672                 if(!isWasmInitialized) {
2673                         throw new Error("initializeWasm() must be awaited first!");
2674                 }
2675                 const nativeResponseValue = wasm.CVec_NodeAnnouncementZ_free(_res);
2676                 // debug statements here
2677         }
2678         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_ok(void);
2679         export function CResult_NoneLightningErrorZ_ok(): number {
2680                 if(!isWasmInitialized) {
2681                         throw new Error("initializeWasm() must be awaited first!");
2682                 }
2683                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_ok();
2684                 return nativeResponseValue;
2685         }
2686         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_err(struct LDKLightningError e);
2687         export function CResult_NoneLightningErrorZ_err(e: number): number {
2688                 if(!isWasmInitialized) {
2689                         throw new Error("initializeWasm() must be awaited first!");
2690                 }
2691                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_err(e);
2692                 return nativeResponseValue;
2693         }
2694         // void CResult_NoneLightningErrorZ_free(struct LDKCResult_NoneLightningErrorZ _res);
2695         export function CResult_NoneLightningErrorZ_free(_res: number): void {
2696                 if(!isWasmInitialized) {
2697                         throw new Error("initializeWasm() must be awaited first!");
2698                 }
2699                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_free(_res);
2700                 // debug statements here
2701         }
2702         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_clone(const struct LDKCResult_NoneLightningErrorZ *NONNULL_PTR orig);
2703         export function CResult_NoneLightningErrorZ_clone(orig: number): number {
2704                 if(!isWasmInitialized) {
2705                         throw new Error("initializeWasm() must be awaited first!");
2706                 }
2707                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_clone(orig);
2708                 return nativeResponseValue;
2709         }
2710         // void CVec_PublicKeyZ_free(struct LDKCVec_PublicKeyZ _res);
2711         export function CVec_PublicKeyZ_free(_res: Uint8Array[]): void {
2712                 if(!isWasmInitialized) {
2713                         throw new Error("initializeWasm() must be awaited first!");
2714                 }
2715                 const nativeResponseValue = wasm.CVec_PublicKeyZ_free(_res);
2716                 // debug statements here
2717         }
2718         // void CVec_u8Z_free(struct LDKCVec_u8Z _res);
2719         export function CVec_u8Z_free(_res: Uint8Array): void {
2720                 if(!isWasmInitialized) {
2721                         throw new Error("initializeWasm() must be awaited first!");
2722                 }
2723                 const nativeResponseValue = wasm.CVec_u8Z_free(encodeArray(_res));
2724                 // debug statements here
2725         }
2726         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_ok(struct LDKCVec_u8Z o);
2727         export function CResult_CVec_u8ZPeerHandleErrorZ_ok(o: Uint8Array): number {
2728                 if(!isWasmInitialized) {
2729                         throw new Error("initializeWasm() must be awaited first!");
2730                 }
2731                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_ok(encodeArray(o));
2732                 return nativeResponseValue;
2733         }
2734         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_err(struct LDKPeerHandleError e);
2735         export function CResult_CVec_u8ZPeerHandleErrorZ_err(e: number): number {
2736                 if(!isWasmInitialized) {
2737                         throw new Error("initializeWasm() must be awaited first!");
2738                 }
2739                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_err(e);
2740                 return nativeResponseValue;
2741         }
2742         // void CResult_CVec_u8ZPeerHandleErrorZ_free(struct LDKCResult_CVec_u8ZPeerHandleErrorZ _res);
2743         export function CResult_CVec_u8ZPeerHandleErrorZ_free(_res: number): void {
2744                 if(!isWasmInitialized) {
2745                         throw new Error("initializeWasm() must be awaited first!");
2746                 }
2747                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_free(_res);
2748                 // debug statements here
2749         }
2750         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_clone(const struct LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR orig);
2751         export function CResult_CVec_u8ZPeerHandleErrorZ_clone(orig: number): number {
2752                 if(!isWasmInitialized) {
2753                         throw new Error("initializeWasm() must be awaited first!");
2754                 }
2755                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_clone(orig);
2756                 return nativeResponseValue;
2757         }
2758         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_ok(void);
2759         export function CResult_NonePeerHandleErrorZ_ok(): number {
2760                 if(!isWasmInitialized) {
2761                         throw new Error("initializeWasm() must be awaited first!");
2762                 }
2763                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_ok();
2764                 return nativeResponseValue;
2765         }
2766         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_err(struct LDKPeerHandleError e);
2767         export function CResult_NonePeerHandleErrorZ_err(e: number): number {
2768                 if(!isWasmInitialized) {
2769                         throw new Error("initializeWasm() must be awaited first!");
2770                 }
2771                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_err(e);
2772                 return nativeResponseValue;
2773         }
2774         // void CResult_NonePeerHandleErrorZ_free(struct LDKCResult_NonePeerHandleErrorZ _res);
2775         export function CResult_NonePeerHandleErrorZ_free(_res: number): void {
2776                 if(!isWasmInitialized) {
2777                         throw new Error("initializeWasm() must be awaited first!");
2778                 }
2779                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_free(_res);
2780                 // debug statements here
2781         }
2782         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_clone(const struct LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR orig);
2783         export function CResult_NonePeerHandleErrorZ_clone(orig: number): number {
2784                 if(!isWasmInitialized) {
2785                         throw new Error("initializeWasm() must be awaited first!");
2786                 }
2787                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_clone(orig);
2788                 return nativeResponseValue;
2789         }
2790         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_ok(bool o);
2791         export function CResult_boolPeerHandleErrorZ_ok(o: boolean): number {
2792                 if(!isWasmInitialized) {
2793                         throw new Error("initializeWasm() must be awaited first!");
2794                 }
2795                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_ok(o);
2796                 return nativeResponseValue;
2797         }
2798         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_err(struct LDKPeerHandleError e);
2799         export function CResult_boolPeerHandleErrorZ_err(e: number): number {
2800                 if(!isWasmInitialized) {
2801                         throw new Error("initializeWasm() must be awaited first!");
2802                 }
2803                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_err(e);
2804                 return nativeResponseValue;
2805         }
2806         // void CResult_boolPeerHandleErrorZ_free(struct LDKCResult_boolPeerHandleErrorZ _res);
2807         export function CResult_boolPeerHandleErrorZ_free(_res: number): void {
2808                 if(!isWasmInitialized) {
2809                         throw new Error("initializeWasm() must be awaited first!");
2810                 }
2811                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_free(_res);
2812                 // debug statements here
2813         }
2814         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_clone(const struct LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR orig);
2815         export function CResult_boolPeerHandleErrorZ_clone(orig: number): number {
2816                 if(!isWasmInitialized) {
2817                         throw new Error("initializeWasm() must be awaited first!");
2818                 }
2819                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_clone(orig);
2820                 return nativeResponseValue;
2821         }
2822         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_ok(struct LDKTxOut o);
2823         export function CResult_TxOutAccessErrorZ_ok(o: number): number {
2824                 if(!isWasmInitialized) {
2825                         throw new Error("initializeWasm() must be awaited first!");
2826                 }
2827                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_ok(o);
2828                 return nativeResponseValue;
2829         }
2830         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_err(enum LDKAccessError e);
2831         export function CResult_TxOutAccessErrorZ_err(e: LDKAccessError): number {
2832                 if(!isWasmInitialized) {
2833                         throw new Error("initializeWasm() must be awaited first!");
2834                 }
2835                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_err(e);
2836                 return nativeResponseValue;
2837         }
2838         // void CResult_TxOutAccessErrorZ_free(struct LDKCResult_TxOutAccessErrorZ _res);
2839         export function CResult_TxOutAccessErrorZ_free(_res: number): void {
2840                 if(!isWasmInitialized) {
2841                         throw new Error("initializeWasm() must be awaited first!");
2842                 }
2843                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_free(_res);
2844                 // debug statements here
2845         }
2846         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_clone(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR orig);
2847         export function CResult_TxOutAccessErrorZ_clone(orig: number): number {
2848                 if(!isWasmInitialized) {
2849                         throw new Error("initializeWasm() must be awaited first!");
2850                 }
2851                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_clone(orig);
2852                 return nativeResponseValue;
2853         }
2854         // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_some(struct LDKC2Tuple_usizeTransactionZ o);
2855         export function COption_C2Tuple_usizeTransactionZZ_some(o: number): number {
2856                 if(!isWasmInitialized) {
2857                         throw new Error("initializeWasm() must be awaited first!");
2858                 }
2859                 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_some(o);
2860                 return nativeResponseValue;
2861         }
2862         // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_none(void);
2863         export function COption_C2Tuple_usizeTransactionZZ_none(): number {
2864                 if(!isWasmInitialized) {
2865                         throw new Error("initializeWasm() must be awaited first!");
2866                 }
2867                 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_none();
2868                 return nativeResponseValue;
2869         }
2870         // void COption_C2Tuple_usizeTransactionZZ_free(struct LDKCOption_C2Tuple_usizeTransactionZZ _res);
2871         export function COption_C2Tuple_usizeTransactionZZ_free(_res: number): void {
2872                 if(!isWasmInitialized) {
2873                         throw new Error("initializeWasm() must be awaited first!");
2874                 }
2875                 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_free(_res);
2876                 // debug statements here
2877         }
2878         // void CVec_SpendableOutputDescriptorZ_free(struct LDKCVec_SpendableOutputDescriptorZ _res);
2879         export function CVec_SpendableOutputDescriptorZ_free(_res: number[]): void {
2880                 if(!isWasmInitialized) {
2881                         throw new Error("initializeWasm() must be awaited first!");
2882                 }
2883                 const nativeResponseValue = wasm.CVec_SpendableOutputDescriptorZ_free(_res);
2884                 // debug statements here
2885         }
2886         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_ok(struct LDKDirectionalChannelInfo o);
2887         export function CResult_DirectionalChannelInfoDecodeErrorZ_ok(o: number): number {
2888                 if(!isWasmInitialized) {
2889                         throw new Error("initializeWasm() must be awaited first!");
2890                 }
2891                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_ok(o);
2892                 return nativeResponseValue;
2893         }
2894         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
2895         export function CResult_DirectionalChannelInfoDecodeErrorZ_err(e: number): number {
2896                 if(!isWasmInitialized) {
2897                         throw new Error("initializeWasm() must be awaited first!");
2898                 }
2899                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_err(e);
2900                 return nativeResponseValue;
2901         }
2902         // void CResult_DirectionalChannelInfoDecodeErrorZ_free(struct LDKCResult_DirectionalChannelInfoDecodeErrorZ _res);
2903         export function CResult_DirectionalChannelInfoDecodeErrorZ_free(_res: number): void {
2904                 if(!isWasmInitialized) {
2905                         throw new Error("initializeWasm() must be awaited first!");
2906                 }
2907                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_free(_res);
2908                 // debug statements here
2909         }
2910         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_clone(const struct LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR orig);
2911         export function CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig: number): number {
2912                 if(!isWasmInitialized) {
2913                         throw new Error("initializeWasm() must be awaited first!");
2914                 }
2915                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig);
2916                 return nativeResponseValue;
2917         }
2918         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_ok(struct LDKChannelInfo o);
2919         export function CResult_ChannelInfoDecodeErrorZ_ok(o: number): number {
2920                 if(!isWasmInitialized) {
2921                         throw new Error("initializeWasm() must be awaited first!");
2922                 }
2923                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_ok(o);
2924                 return nativeResponseValue;
2925         }
2926         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
2927         export function CResult_ChannelInfoDecodeErrorZ_err(e: number): number {
2928                 if(!isWasmInitialized) {
2929                         throw new Error("initializeWasm() must be awaited first!");
2930                 }
2931                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_err(e);
2932                 return nativeResponseValue;
2933         }
2934         // void CResult_ChannelInfoDecodeErrorZ_free(struct LDKCResult_ChannelInfoDecodeErrorZ _res);
2935         export function CResult_ChannelInfoDecodeErrorZ_free(_res: number): void {
2936                 if(!isWasmInitialized) {
2937                         throw new Error("initializeWasm() must be awaited first!");
2938                 }
2939                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_free(_res);
2940                 // debug statements here
2941         }
2942         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_clone(const struct LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR orig);
2943         export function CResult_ChannelInfoDecodeErrorZ_clone(orig: number): number {
2944                 if(!isWasmInitialized) {
2945                         throw new Error("initializeWasm() must be awaited first!");
2946                 }
2947                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_clone(orig);
2948                 return nativeResponseValue;
2949         }
2950         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_ok(struct LDKRoutingFees o);
2951         export function CResult_RoutingFeesDecodeErrorZ_ok(o: number): number {
2952                 if(!isWasmInitialized) {
2953                         throw new Error("initializeWasm() must be awaited first!");
2954                 }
2955                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_ok(o);
2956                 return nativeResponseValue;
2957         }
2958         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_err(struct LDKDecodeError e);
2959         export function CResult_RoutingFeesDecodeErrorZ_err(e: number): number {
2960                 if(!isWasmInitialized) {
2961                         throw new Error("initializeWasm() must be awaited first!");
2962                 }
2963                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_err(e);
2964                 return nativeResponseValue;
2965         }
2966         // void CResult_RoutingFeesDecodeErrorZ_free(struct LDKCResult_RoutingFeesDecodeErrorZ _res);
2967         export function CResult_RoutingFeesDecodeErrorZ_free(_res: number): void {
2968                 if(!isWasmInitialized) {
2969                         throw new Error("initializeWasm() must be awaited first!");
2970                 }
2971                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_free(_res);
2972                 // debug statements here
2973         }
2974         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_clone(const struct LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR orig);
2975         export function CResult_RoutingFeesDecodeErrorZ_clone(orig: number): number {
2976                 if(!isWasmInitialized) {
2977                         throw new Error("initializeWasm() must be awaited first!");
2978                 }
2979                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_clone(orig);
2980                 return nativeResponseValue;
2981         }
2982         // void CVec_NetAddressZ_free(struct LDKCVec_NetAddressZ _res);
2983         export function CVec_NetAddressZ_free(_res: number[]): void {
2984                 if(!isWasmInitialized) {
2985                         throw new Error("initializeWasm() must be awaited first!");
2986                 }
2987                 const nativeResponseValue = wasm.CVec_NetAddressZ_free(_res);
2988                 // debug statements here
2989         }
2990         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_ok(struct LDKNodeAnnouncementInfo o);
2991         export function CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o: number): number {
2992                 if(!isWasmInitialized) {
2993                         throw new Error("initializeWasm() must be awaited first!");
2994                 }
2995                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o);
2996                 return nativeResponseValue;
2997         }
2998         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_err(struct LDKDecodeError e);
2999         export function CResult_NodeAnnouncementInfoDecodeErrorZ_err(e: number): number {
3000                 if(!isWasmInitialized) {
3001                         throw new Error("initializeWasm() must be awaited first!");
3002                 }
3003                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_err(e);
3004                 return nativeResponseValue;
3005         }
3006         // void CResult_NodeAnnouncementInfoDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res);
3007         export function CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res: number): void {
3008                 if(!isWasmInitialized) {
3009                         throw new Error("initializeWasm() must be awaited first!");
3010                 }
3011                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res);
3012                 // debug statements here
3013         }
3014         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR orig);
3015         export function CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig: number): number {
3016                 if(!isWasmInitialized) {
3017                         throw new Error("initializeWasm() must be awaited first!");
3018                 }
3019                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig);
3020                 return nativeResponseValue;
3021         }
3022         // void CVec_u64Z_free(struct LDKCVec_u64Z _res);
3023         export function CVec_u64Z_free(_res: number[]): void {
3024                 if(!isWasmInitialized) {
3025                         throw new Error("initializeWasm() must be awaited first!");
3026                 }
3027                 const nativeResponseValue = wasm.CVec_u64Z_free(_res);
3028                 // debug statements here
3029         }
3030         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_ok(struct LDKNodeInfo o);
3031         export function CResult_NodeInfoDecodeErrorZ_ok(o: number): number {
3032                 if(!isWasmInitialized) {
3033                         throw new Error("initializeWasm() must be awaited first!");
3034                 }
3035                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_ok(o);
3036                 return nativeResponseValue;
3037         }
3038         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_err(struct LDKDecodeError e);
3039         export function CResult_NodeInfoDecodeErrorZ_err(e: number): number {
3040                 if(!isWasmInitialized) {
3041                         throw new Error("initializeWasm() must be awaited first!");
3042                 }
3043                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_err(e);
3044                 return nativeResponseValue;
3045         }
3046         // void CResult_NodeInfoDecodeErrorZ_free(struct LDKCResult_NodeInfoDecodeErrorZ _res);
3047         export function CResult_NodeInfoDecodeErrorZ_free(_res: number): void {
3048                 if(!isWasmInitialized) {
3049                         throw new Error("initializeWasm() must be awaited first!");
3050                 }
3051                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_free(_res);
3052                 // debug statements here
3053         }
3054         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_clone(const struct LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR orig);
3055         export function CResult_NodeInfoDecodeErrorZ_clone(orig: number): number {
3056                 if(!isWasmInitialized) {
3057                         throw new Error("initializeWasm() must be awaited first!");
3058                 }
3059                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_clone(orig);
3060                 return nativeResponseValue;
3061         }
3062         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_ok(struct LDKNetworkGraph o);
3063         export function CResult_NetworkGraphDecodeErrorZ_ok(o: number): number {
3064                 if(!isWasmInitialized) {
3065                         throw new Error("initializeWasm() must be awaited first!");
3066                 }
3067                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_ok(o);
3068                 return nativeResponseValue;
3069         }
3070         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_err(struct LDKDecodeError e);
3071         export function CResult_NetworkGraphDecodeErrorZ_err(e: number): number {
3072                 if(!isWasmInitialized) {
3073                         throw new Error("initializeWasm() must be awaited first!");
3074                 }
3075                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_err(e);
3076                 return nativeResponseValue;
3077         }
3078         // void CResult_NetworkGraphDecodeErrorZ_free(struct LDKCResult_NetworkGraphDecodeErrorZ _res);
3079         export function CResult_NetworkGraphDecodeErrorZ_free(_res: number): void {
3080                 if(!isWasmInitialized) {
3081                         throw new Error("initializeWasm() must be awaited first!");
3082                 }
3083                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_free(_res);
3084                 // debug statements here
3085         }
3086         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_clone(const struct LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR orig);
3087         export function CResult_NetworkGraphDecodeErrorZ_clone(orig: number): number {
3088                 if(!isWasmInitialized) {
3089                         throw new Error("initializeWasm() must be awaited first!");
3090                 }
3091                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_clone(orig);
3092                 return nativeResponseValue;
3093         }
3094         // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_ok(struct LDKInitFeatures o);
3095         export function CResult_InitFeaturesDecodeErrorZ_ok(o: number): number {
3096                 if(!isWasmInitialized) {
3097                         throw new Error("initializeWasm() must be awaited first!");
3098                 }
3099                 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_ok(o);
3100                 return nativeResponseValue;
3101         }
3102         // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
3103         export function CResult_InitFeaturesDecodeErrorZ_err(e: number): number {
3104                 if(!isWasmInitialized) {
3105                         throw new Error("initializeWasm() must be awaited first!");
3106                 }
3107                 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_err(e);
3108                 return nativeResponseValue;
3109         }
3110         // void CResult_InitFeaturesDecodeErrorZ_free(struct LDKCResult_InitFeaturesDecodeErrorZ _res);
3111         export function CResult_InitFeaturesDecodeErrorZ_free(_res: number): void {
3112                 if(!isWasmInitialized) {
3113                         throw new Error("initializeWasm() must be awaited first!");
3114                 }
3115                 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_free(_res);
3116                 // debug statements here
3117         }
3118         // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_ok(struct LDKNodeFeatures o);
3119         export function CResult_NodeFeaturesDecodeErrorZ_ok(o: number): number {
3120                 if(!isWasmInitialized) {
3121                         throw new Error("initializeWasm() must be awaited first!");
3122                 }
3123                 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_ok(o);
3124                 return nativeResponseValue;
3125         }
3126         // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
3127         export function CResult_NodeFeaturesDecodeErrorZ_err(e: number): number {
3128                 if(!isWasmInitialized) {
3129                         throw new Error("initializeWasm() must be awaited first!");
3130                 }
3131                 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_err(e);
3132                 return nativeResponseValue;
3133         }
3134         // void CResult_NodeFeaturesDecodeErrorZ_free(struct LDKCResult_NodeFeaturesDecodeErrorZ _res);
3135         export function CResult_NodeFeaturesDecodeErrorZ_free(_res: number): void {
3136                 if(!isWasmInitialized) {
3137                         throw new Error("initializeWasm() must be awaited first!");
3138                 }
3139                 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_free(_res);
3140                 // debug statements here
3141         }
3142         // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_ok(struct LDKChannelFeatures o);
3143         export function CResult_ChannelFeaturesDecodeErrorZ_ok(o: number): number {
3144                 if(!isWasmInitialized) {
3145                         throw new Error("initializeWasm() must be awaited first!");
3146                 }
3147                 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_ok(o);
3148                 return nativeResponseValue;
3149         }
3150         // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
3151         export function CResult_ChannelFeaturesDecodeErrorZ_err(e: number): number {
3152                 if(!isWasmInitialized) {
3153                         throw new Error("initializeWasm() must be awaited first!");
3154                 }
3155                 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_err(e);
3156                 return nativeResponseValue;
3157         }
3158         // void CResult_ChannelFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelFeaturesDecodeErrorZ _res);
3159         export function CResult_ChannelFeaturesDecodeErrorZ_free(_res: number): void {
3160                 if(!isWasmInitialized) {
3161                         throw new Error("initializeWasm() must be awaited first!");
3162                 }
3163                 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_free(_res);
3164                 // debug statements here
3165         }
3166         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_ok(struct LDKInvoiceFeatures o);
3167         export function CResult_InvoiceFeaturesDecodeErrorZ_ok(o: number): number {
3168                 if(!isWasmInitialized) {
3169                         throw new Error("initializeWasm() must be awaited first!");
3170                 }
3171                 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_ok(o);
3172                 return nativeResponseValue;
3173         }
3174         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
3175         export function CResult_InvoiceFeaturesDecodeErrorZ_err(e: number): number {
3176                 if(!isWasmInitialized) {
3177                         throw new Error("initializeWasm() must be awaited first!");
3178                 }
3179                 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_err(e);
3180                 return nativeResponseValue;
3181         }
3182         // void CResult_InvoiceFeaturesDecodeErrorZ_free(struct LDKCResult_InvoiceFeaturesDecodeErrorZ _res);
3183         export function CResult_InvoiceFeaturesDecodeErrorZ_free(_res: number): void {
3184                 if(!isWasmInitialized) {
3185                         throw new Error("initializeWasm() must be awaited first!");
3186                 }
3187                 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_free(_res);
3188                 // debug statements here
3189         }
3190         // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_ok(struct LDKNetAddress o);
3191         export function CResult_NetAddressu8Z_ok(o: number): number {
3192                 if(!isWasmInitialized) {
3193                         throw new Error("initializeWasm() must be awaited first!");
3194                 }
3195                 const nativeResponseValue = wasm.CResult_NetAddressu8Z_ok(o);
3196                 return nativeResponseValue;
3197         }
3198         // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_err(uint8_t e);
3199         export function CResult_NetAddressu8Z_err(e: number): number {
3200                 if(!isWasmInitialized) {
3201                         throw new Error("initializeWasm() must be awaited first!");
3202                 }
3203                 const nativeResponseValue = wasm.CResult_NetAddressu8Z_err(e);
3204                 return nativeResponseValue;
3205         }
3206         // void CResult_NetAddressu8Z_free(struct LDKCResult_NetAddressu8Z _res);
3207         export function CResult_NetAddressu8Z_free(_res: number): void {
3208                 if(!isWasmInitialized) {
3209                         throw new Error("initializeWasm() must be awaited first!");
3210                 }
3211                 const nativeResponseValue = wasm.CResult_NetAddressu8Z_free(_res);
3212                 // debug statements here
3213         }
3214         // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_clone(const struct LDKCResult_NetAddressu8Z *NONNULL_PTR orig);
3215         export function CResult_NetAddressu8Z_clone(orig: number): number {
3216                 if(!isWasmInitialized) {
3217                         throw new Error("initializeWasm() must be awaited first!");
3218                 }
3219                 const nativeResponseValue = wasm.CResult_NetAddressu8Z_clone(orig);
3220                 return nativeResponseValue;
3221         }
3222         // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(struct LDKCResult_NetAddressu8Z o);
3223         export function CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o: number): number {
3224                 if(!isWasmInitialized) {
3225                         throw new Error("initializeWasm() must be awaited first!");
3226                 }
3227                 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o);
3228                 return nativeResponseValue;
3229         }
3230         // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_err(struct LDKDecodeError e);
3231         export function CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e: number): number {
3232                 if(!isWasmInitialized) {
3233                         throw new Error("initializeWasm() must be awaited first!");
3234                 }
3235                 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e);
3236                 return nativeResponseValue;
3237         }
3238         // void CResult_CResult_NetAddressu8ZDecodeErrorZ_free(struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ _res);
3239         export function CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res: number): void {
3240                 if(!isWasmInitialized) {
3241                         throw new Error("initializeWasm() must be awaited first!");
3242                 }
3243                 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res);
3244                 // debug statements here
3245         }
3246         // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(const struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ *NONNULL_PTR orig);
3247         export function CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(orig: number): number {
3248                 if(!isWasmInitialized) {
3249                         throw new Error("initializeWasm() must be awaited first!");
3250                 }
3251                 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(orig);
3252                 return nativeResponseValue;
3253         }
3254         // void CVec_UpdateAddHTLCZ_free(struct LDKCVec_UpdateAddHTLCZ _res);
3255         export function CVec_UpdateAddHTLCZ_free(_res: number[]): void {
3256                 if(!isWasmInitialized) {
3257                         throw new Error("initializeWasm() must be awaited first!");
3258                 }
3259                 const nativeResponseValue = wasm.CVec_UpdateAddHTLCZ_free(_res);
3260                 // debug statements here
3261         }
3262         // void CVec_UpdateFulfillHTLCZ_free(struct LDKCVec_UpdateFulfillHTLCZ _res);
3263         export function CVec_UpdateFulfillHTLCZ_free(_res: number[]): void {
3264                 if(!isWasmInitialized) {
3265                         throw new Error("initializeWasm() must be awaited first!");
3266                 }
3267                 const nativeResponseValue = wasm.CVec_UpdateFulfillHTLCZ_free(_res);
3268                 // debug statements here
3269         }
3270         // void CVec_UpdateFailHTLCZ_free(struct LDKCVec_UpdateFailHTLCZ _res);
3271         export function CVec_UpdateFailHTLCZ_free(_res: number[]): void {
3272                 if(!isWasmInitialized) {
3273                         throw new Error("initializeWasm() must be awaited first!");
3274                 }
3275                 const nativeResponseValue = wasm.CVec_UpdateFailHTLCZ_free(_res);
3276                 // debug statements here
3277         }
3278         // void CVec_UpdateFailMalformedHTLCZ_free(struct LDKCVec_UpdateFailMalformedHTLCZ _res);
3279         export function CVec_UpdateFailMalformedHTLCZ_free(_res: number[]): void {
3280                 if(!isWasmInitialized) {
3281                         throw new Error("initializeWasm() must be awaited first!");
3282                 }
3283                 const nativeResponseValue = wasm.CVec_UpdateFailMalformedHTLCZ_free(_res);
3284                 // debug statements here
3285         }
3286         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_ok(struct LDKAcceptChannel o);
3287         export function CResult_AcceptChannelDecodeErrorZ_ok(o: number): number {
3288                 if(!isWasmInitialized) {
3289                         throw new Error("initializeWasm() must be awaited first!");
3290                 }
3291                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_ok(o);
3292                 return nativeResponseValue;
3293         }
3294         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_err(struct LDKDecodeError e);
3295         export function CResult_AcceptChannelDecodeErrorZ_err(e: number): number {
3296                 if(!isWasmInitialized) {
3297                         throw new Error("initializeWasm() must be awaited first!");
3298                 }
3299                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_err(e);
3300                 return nativeResponseValue;
3301         }
3302         // void CResult_AcceptChannelDecodeErrorZ_free(struct LDKCResult_AcceptChannelDecodeErrorZ _res);
3303         export function CResult_AcceptChannelDecodeErrorZ_free(_res: number): void {
3304                 if(!isWasmInitialized) {
3305                         throw new Error("initializeWasm() must be awaited first!");
3306                 }
3307                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_free(_res);
3308                 // debug statements here
3309         }
3310         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_clone(const struct LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR orig);
3311         export function CResult_AcceptChannelDecodeErrorZ_clone(orig: number): number {
3312                 if(!isWasmInitialized) {
3313                         throw new Error("initializeWasm() must be awaited first!");
3314                 }
3315                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_clone(orig);
3316                 return nativeResponseValue;
3317         }
3318         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_ok(struct LDKAnnouncementSignatures o);
3319         export function CResult_AnnouncementSignaturesDecodeErrorZ_ok(o: number): number {
3320                 if(!isWasmInitialized) {
3321                         throw new Error("initializeWasm() must be awaited first!");
3322                 }
3323                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_ok(o);
3324                 return nativeResponseValue;
3325         }
3326         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_err(struct LDKDecodeError e);
3327         export function CResult_AnnouncementSignaturesDecodeErrorZ_err(e: number): number {
3328                 if(!isWasmInitialized) {
3329                         throw new Error("initializeWasm() must be awaited first!");
3330                 }
3331                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_err(e);
3332                 return nativeResponseValue;
3333         }
3334         // void CResult_AnnouncementSignaturesDecodeErrorZ_free(struct LDKCResult_AnnouncementSignaturesDecodeErrorZ _res);
3335         export function CResult_AnnouncementSignaturesDecodeErrorZ_free(_res: number): void {
3336                 if(!isWasmInitialized) {
3337                         throw new Error("initializeWasm() must be awaited first!");
3338                 }
3339                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_free(_res);
3340                 // debug statements here
3341         }
3342         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_clone(const struct LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR orig);
3343         export function CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig: number): number {
3344                 if(!isWasmInitialized) {
3345                         throw new Error("initializeWasm() must be awaited first!");
3346                 }
3347                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig);
3348                 return nativeResponseValue;
3349         }
3350         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_ok(struct LDKChannelReestablish o);
3351         export function CResult_ChannelReestablishDecodeErrorZ_ok(o: number): number {
3352                 if(!isWasmInitialized) {
3353                         throw new Error("initializeWasm() must be awaited first!");
3354                 }
3355                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_ok(o);
3356                 return nativeResponseValue;
3357         }
3358         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_err(struct LDKDecodeError e);
3359         export function CResult_ChannelReestablishDecodeErrorZ_err(e: number): number {
3360                 if(!isWasmInitialized) {
3361                         throw new Error("initializeWasm() must be awaited first!");
3362                 }
3363                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_err(e);
3364                 return nativeResponseValue;
3365         }
3366         // void CResult_ChannelReestablishDecodeErrorZ_free(struct LDKCResult_ChannelReestablishDecodeErrorZ _res);
3367         export function CResult_ChannelReestablishDecodeErrorZ_free(_res: number): void {
3368                 if(!isWasmInitialized) {
3369                         throw new Error("initializeWasm() must be awaited first!");
3370                 }
3371                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_free(_res);
3372                 // debug statements here
3373         }
3374         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_clone(const struct LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR orig);
3375         export function CResult_ChannelReestablishDecodeErrorZ_clone(orig: number): number {
3376                 if(!isWasmInitialized) {
3377                         throw new Error("initializeWasm() must be awaited first!");
3378                 }
3379                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_clone(orig);
3380                 return nativeResponseValue;
3381         }
3382         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_ok(struct LDKClosingSigned o);
3383         export function CResult_ClosingSignedDecodeErrorZ_ok(o: number): number {
3384                 if(!isWasmInitialized) {
3385                         throw new Error("initializeWasm() must be awaited first!");
3386                 }
3387                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_ok(o);
3388                 return nativeResponseValue;
3389         }
3390         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_err(struct LDKDecodeError e);
3391         export function CResult_ClosingSignedDecodeErrorZ_err(e: number): number {
3392                 if(!isWasmInitialized) {
3393                         throw new Error("initializeWasm() must be awaited first!");
3394                 }
3395                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_err(e);
3396                 return nativeResponseValue;
3397         }
3398         // void CResult_ClosingSignedDecodeErrorZ_free(struct LDKCResult_ClosingSignedDecodeErrorZ _res);
3399         export function CResult_ClosingSignedDecodeErrorZ_free(_res: number): void {
3400                 if(!isWasmInitialized) {
3401                         throw new Error("initializeWasm() must be awaited first!");
3402                 }
3403                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_free(_res);
3404                 // debug statements here
3405         }
3406         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR orig);
3407         export function CResult_ClosingSignedDecodeErrorZ_clone(orig: number): number {
3408                 if(!isWasmInitialized) {
3409                         throw new Error("initializeWasm() must be awaited first!");
3410                 }
3411                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_clone(orig);
3412                 return nativeResponseValue;
3413         }
3414         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_ok(struct LDKCommitmentSigned o);
3415         export function CResult_CommitmentSignedDecodeErrorZ_ok(o: number): number {
3416                 if(!isWasmInitialized) {
3417                         throw new Error("initializeWasm() must be awaited first!");
3418                 }
3419                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_ok(o);
3420                 return nativeResponseValue;
3421         }
3422         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_err(struct LDKDecodeError e);
3423         export function CResult_CommitmentSignedDecodeErrorZ_err(e: number): number {
3424                 if(!isWasmInitialized) {
3425                         throw new Error("initializeWasm() must be awaited first!");
3426                 }
3427                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_err(e);
3428                 return nativeResponseValue;
3429         }
3430         // void CResult_CommitmentSignedDecodeErrorZ_free(struct LDKCResult_CommitmentSignedDecodeErrorZ _res);
3431         export function CResult_CommitmentSignedDecodeErrorZ_free(_res: number): void {
3432                 if(!isWasmInitialized) {
3433                         throw new Error("initializeWasm() must be awaited first!");
3434                 }
3435                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_free(_res);
3436                 // debug statements here
3437         }
3438         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_clone(const struct LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR orig);
3439         export function CResult_CommitmentSignedDecodeErrorZ_clone(orig: number): number {
3440                 if(!isWasmInitialized) {
3441                         throw new Error("initializeWasm() must be awaited first!");
3442                 }
3443                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_clone(orig);
3444                 return nativeResponseValue;
3445         }
3446         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_ok(struct LDKFundingCreated o);
3447         export function CResult_FundingCreatedDecodeErrorZ_ok(o: number): number {
3448                 if(!isWasmInitialized) {
3449                         throw new Error("initializeWasm() must be awaited first!");
3450                 }
3451                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_ok(o);
3452                 return nativeResponseValue;
3453         }
3454         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_err(struct LDKDecodeError e);
3455         export function CResult_FundingCreatedDecodeErrorZ_err(e: number): number {
3456                 if(!isWasmInitialized) {
3457                         throw new Error("initializeWasm() must be awaited first!");
3458                 }
3459                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_err(e);
3460                 return nativeResponseValue;
3461         }
3462         // void CResult_FundingCreatedDecodeErrorZ_free(struct LDKCResult_FundingCreatedDecodeErrorZ _res);
3463         export function CResult_FundingCreatedDecodeErrorZ_free(_res: number): void {
3464                 if(!isWasmInitialized) {
3465                         throw new Error("initializeWasm() must be awaited first!");
3466                 }
3467                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_free(_res);
3468                 // debug statements here
3469         }
3470         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_clone(const struct LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR orig);
3471         export function CResult_FundingCreatedDecodeErrorZ_clone(orig: number): number {
3472                 if(!isWasmInitialized) {
3473                         throw new Error("initializeWasm() must be awaited first!");
3474                 }
3475                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_clone(orig);
3476                 return nativeResponseValue;
3477         }
3478         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_ok(struct LDKFundingSigned o);
3479         export function CResult_FundingSignedDecodeErrorZ_ok(o: number): number {
3480                 if(!isWasmInitialized) {
3481                         throw new Error("initializeWasm() must be awaited first!");
3482                 }
3483                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_ok(o);
3484                 return nativeResponseValue;
3485         }
3486         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_err(struct LDKDecodeError e);
3487         export function CResult_FundingSignedDecodeErrorZ_err(e: number): number {
3488                 if(!isWasmInitialized) {
3489                         throw new Error("initializeWasm() must be awaited first!");
3490                 }
3491                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_err(e);
3492                 return nativeResponseValue;
3493         }
3494         // void CResult_FundingSignedDecodeErrorZ_free(struct LDKCResult_FundingSignedDecodeErrorZ _res);
3495         export function CResult_FundingSignedDecodeErrorZ_free(_res: number): void {
3496                 if(!isWasmInitialized) {
3497                         throw new Error("initializeWasm() must be awaited first!");
3498                 }
3499                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_free(_res);
3500                 // debug statements here
3501         }
3502         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_clone(const struct LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR orig);
3503         export function CResult_FundingSignedDecodeErrorZ_clone(orig: number): number {
3504                 if(!isWasmInitialized) {
3505                         throw new Error("initializeWasm() must be awaited first!");
3506                 }
3507                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_clone(orig);
3508                 return nativeResponseValue;
3509         }
3510         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_ok(struct LDKFundingLocked o);
3511         export function CResult_FundingLockedDecodeErrorZ_ok(o: number): number {
3512                 if(!isWasmInitialized) {
3513                         throw new Error("initializeWasm() must be awaited first!");
3514                 }
3515                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_ok(o);
3516                 return nativeResponseValue;
3517         }
3518         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_err(struct LDKDecodeError e);
3519         export function CResult_FundingLockedDecodeErrorZ_err(e: number): number {
3520                 if(!isWasmInitialized) {
3521                         throw new Error("initializeWasm() must be awaited first!");
3522                 }
3523                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_err(e);
3524                 return nativeResponseValue;
3525         }
3526         // void CResult_FundingLockedDecodeErrorZ_free(struct LDKCResult_FundingLockedDecodeErrorZ _res);
3527         export function CResult_FundingLockedDecodeErrorZ_free(_res: number): void {
3528                 if(!isWasmInitialized) {
3529                         throw new Error("initializeWasm() must be awaited first!");
3530                 }
3531                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_free(_res);
3532                 // debug statements here
3533         }
3534         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_clone(const struct LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR orig);
3535         export function CResult_FundingLockedDecodeErrorZ_clone(orig: number): number {
3536                 if(!isWasmInitialized) {
3537                         throw new Error("initializeWasm() must be awaited first!");
3538                 }
3539                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_clone(orig);
3540                 return nativeResponseValue;
3541         }
3542         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_ok(struct LDKInit o);
3543         export function CResult_InitDecodeErrorZ_ok(o: number): number {
3544                 if(!isWasmInitialized) {
3545                         throw new Error("initializeWasm() must be awaited first!");
3546                 }
3547                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_ok(o);
3548                 return nativeResponseValue;
3549         }
3550         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_err(struct LDKDecodeError e);
3551         export function CResult_InitDecodeErrorZ_err(e: number): number {
3552                 if(!isWasmInitialized) {
3553                         throw new Error("initializeWasm() must be awaited first!");
3554                 }
3555                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_err(e);
3556                 return nativeResponseValue;
3557         }
3558         // void CResult_InitDecodeErrorZ_free(struct LDKCResult_InitDecodeErrorZ _res);
3559         export function CResult_InitDecodeErrorZ_free(_res: number): void {
3560                 if(!isWasmInitialized) {
3561                         throw new Error("initializeWasm() must be awaited first!");
3562                 }
3563                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_free(_res);
3564                 // debug statements here
3565         }
3566         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_clone(const struct LDKCResult_InitDecodeErrorZ *NONNULL_PTR orig);
3567         export function CResult_InitDecodeErrorZ_clone(orig: number): number {
3568                 if(!isWasmInitialized) {
3569                         throw new Error("initializeWasm() must be awaited first!");
3570                 }
3571                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_clone(orig);
3572                 return nativeResponseValue;
3573         }
3574         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_ok(struct LDKOpenChannel o);
3575         export function CResult_OpenChannelDecodeErrorZ_ok(o: number): number {
3576                 if(!isWasmInitialized) {
3577                         throw new Error("initializeWasm() must be awaited first!");
3578                 }
3579                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_ok(o);
3580                 return nativeResponseValue;
3581         }
3582         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_err(struct LDKDecodeError e);
3583         export function CResult_OpenChannelDecodeErrorZ_err(e: number): number {
3584                 if(!isWasmInitialized) {
3585                         throw new Error("initializeWasm() must be awaited first!");
3586                 }
3587                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_err(e);
3588                 return nativeResponseValue;
3589         }
3590         // void CResult_OpenChannelDecodeErrorZ_free(struct LDKCResult_OpenChannelDecodeErrorZ _res);
3591         export function CResult_OpenChannelDecodeErrorZ_free(_res: number): void {
3592                 if(!isWasmInitialized) {
3593                         throw new Error("initializeWasm() must be awaited first!");
3594                 }
3595                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_free(_res);
3596                 // debug statements here
3597         }
3598         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_clone(const struct LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR orig);
3599         export function CResult_OpenChannelDecodeErrorZ_clone(orig: number): number {
3600                 if(!isWasmInitialized) {
3601                         throw new Error("initializeWasm() must be awaited first!");
3602                 }
3603                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_clone(orig);
3604                 return nativeResponseValue;
3605         }
3606         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_ok(struct LDKRevokeAndACK o);
3607         export function CResult_RevokeAndACKDecodeErrorZ_ok(o: number): number {
3608                 if(!isWasmInitialized) {
3609                         throw new Error("initializeWasm() must be awaited first!");
3610                 }
3611                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_ok(o);
3612                 return nativeResponseValue;
3613         }
3614         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_err(struct LDKDecodeError e);
3615         export function CResult_RevokeAndACKDecodeErrorZ_err(e: number): number {
3616                 if(!isWasmInitialized) {
3617                         throw new Error("initializeWasm() must be awaited first!");
3618                 }
3619                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_err(e);
3620                 return nativeResponseValue;
3621         }
3622         // void CResult_RevokeAndACKDecodeErrorZ_free(struct LDKCResult_RevokeAndACKDecodeErrorZ _res);
3623         export function CResult_RevokeAndACKDecodeErrorZ_free(_res: number): void {
3624                 if(!isWasmInitialized) {
3625                         throw new Error("initializeWasm() must be awaited first!");
3626                 }
3627                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_free(_res);
3628                 // debug statements here
3629         }
3630         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_clone(const struct LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR orig);
3631         export function CResult_RevokeAndACKDecodeErrorZ_clone(orig: number): number {
3632                 if(!isWasmInitialized) {
3633                         throw new Error("initializeWasm() must be awaited first!");
3634                 }
3635                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_clone(orig);
3636                 return nativeResponseValue;
3637         }
3638         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_ok(struct LDKShutdown o);
3639         export function CResult_ShutdownDecodeErrorZ_ok(o: number): number {
3640                 if(!isWasmInitialized) {
3641                         throw new Error("initializeWasm() must be awaited first!");
3642                 }
3643                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_ok(o);
3644                 return nativeResponseValue;
3645         }
3646         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_err(struct LDKDecodeError e);
3647         export function CResult_ShutdownDecodeErrorZ_err(e: number): number {
3648                 if(!isWasmInitialized) {
3649                         throw new Error("initializeWasm() must be awaited first!");
3650                 }
3651                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_err(e);
3652                 return nativeResponseValue;
3653         }
3654         // void CResult_ShutdownDecodeErrorZ_free(struct LDKCResult_ShutdownDecodeErrorZ _res);
3655         export function CResult_ShutdownDecodeErrorZ_free(_res: number): void {
3656                 if(!isWasmInitialized) {
3657                         throw new Error("initializeWasm() must be awaited first!");
3658                 }
3659                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_free(_res);
3660                 // debug statements here
3661         }
3662         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_clone(const struct LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR orig);
3663         export function CResult_ShutdownDecodeErrorZ_clone(orig: number): number {
3664                 if(!isWasmInitialized) {
3665                         throw new Error("initializeWasm() must be awaited first!");
3666                 }
3667                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_clone(orig);
3668                 return nativeResponseValue;
3669         }
3670         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_ok(struct LDKUpdateFailHTLC o);
3671         export function CResult_UpdateFailHTLCDecodeErrorZ_ok(o: number): number {
3672                 if(!isWasmInitialized) {
3673                         throw new Error("initializeWasm() must be awaited first!");
3674                 }
3675                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_ok(o);
3676                 return nativeResponseValue;
3677         }
3678         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_err(struct LDKDecodeError e);
3679         export function CResult_UpdateFailHTLCDecodeErrorZ_err(e: number): number {
3680                 if(!isWasmInitialized) {
3681                         throw new Error("initializeWasm() must be awaited first!");
3682                 }
3683                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_err(e);
3684                 return nativeResponseValue;
3685         }
3686         // void CResult_UpdateFailHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailHTLCDecodeErrorZ _res);
3687         export function CResult_UpdateFailHTLCDecodeErrorZ_free(_res: number): void {
3688                 if(!isWasmInitialized) {
3689                         throw new Error("initializeWasm() must be awaited first!");
3690                 }
3691                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_free(_res);
3692                 // debug statements here
3693         }
3694         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR orig);
3695         export function CResult_UpdateFailHTLCDecodeErrorZ_clone(orig: number): number {
3696                 if(!isWasmInitialized) {
3697                         throw new Error("initializeWasm() must be awaited first!");
3698                 }
3699                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_clone(orig);
3700                 return nativeResponseValue;
3701         }
3702         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(struct LDKUpdateFailMalformedHTLC o);
3703         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o: number): number {
3704                 if(!isWasmInitialized) {
3705                         throw new Error("initializeWasm() must be awaited first!");
3706                 }
3707                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o);
3708                 return nativeResponseValue;
3709         }
3710         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(struct LDKDecodeError e);
3711         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e: number): number {
3712                 if(!isWasmInitialized) {
3713                         throw new Error("initializeWasm() must be awaited first!");
3714                 }
3715                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e);
3716                 return nativeResponseValue;
3717         }
3718         // void CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ _res);
3719         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res: number): void {
3720                 if(!isWasmInitialized) {
3721                         throw new Error("initializeWasm() must be awaited first!");
3722                 }
3723                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res);
3724                 // debug statements here
3725         }
3726         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR orig);
3727         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig: number): number {
3728                 if(!isWasmInitialized) {
3729                         throw new Error("initializeWasm() must be awaited first!");
3730                 }
3731                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig);
3732                 return nativeResponseValue;
3733         }
3734         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_ok(struct LDKUpdateFee o);
3735         export function CResult_UpdateFeeDecodeErrorZ_ok(o: number): number {
3736                 if(!isWasmInitialized) {
3737                         throw new Error("initializeWasm() must be awaited first!");
3738                 }
3739                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_ok(o);
3740                 return nativeResponseValue;
3741         }
3742         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_err(struct LDKDecodeError e);
3743         export function CResult_UpdateFeeDecodeErrorZ_err(e: number): number {
3744                 if(!isWasmInitialized) {
3745                         throw new Error("initializeWasm() must be awaited first!");
3746                 }
3747                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_err(e);
3748                 return nativeResponseValue;
3749         }
3750         // void CResult_UpdateFeeDecodeErrorZ_free(struct LDKCResult_UpdateFeeDecodeErrorZ _res);
3751         export function CResult_UpdateFeeDecodeErrorZ_free(_res: number): void {
3752                 if(!isWasmInitialized) {
3753                         throw new Error("initializeWasm() must be awaited first!");
3754                 }
3755                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_free(_res);
3756                 // debug statements here
3757         }
3758         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_clone(const struct LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR orig);
3759         export function CResult_UpdateFeeDecodeErrorZ_clone(orig: number): number {
3760                 if(!isWasmInitialized) {
3761                         throw new Error("initializeWasm() must be awaited first!");
3762                 }
3763                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_clone(orig);
3764                 return nativeResponseValue;
3765         }
3766         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_ok(struct LDKUpdateFulfillHTLC o);
3767         export function CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o: number): number {
3768                 if(!isWasmInitialized) {
3769                         throw new Error("initializeWasm() must be awaited first!");
3770                 }
3771                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o);
3772                 return nativeResponseValue;
3773         }
3774         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_err(struct LDKDecodeError e);
3775         export function CResult_UpdateFulfillHTLCDecodeErrorZ_err(e: number): number {
3776                 if(!isWasmInitialized) {
3777                         throw new Error("initializeWasm() must be awaited first!");
3778                 }
3779                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_err(e);
3780                 return nativeResponseValue;
3781         }
3782         // void CResult_UpdateFulfillHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ _res);
3783         export function CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res: number): void {
3784                 if(!isWasmInitialized) {
3785                         throw new Error("initializeWasm() must be awaited first!");
3786                 }
3787                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res);
3788                 // debug statements here
3789         }
3790         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR orig);
3791         export function CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig: number): number {
3792                 if(!isWasmInitialized) {
3793                         throw new Error("initializeWasm() must be awaited first!");
3794                 }
3795                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig);
3796                 return nativeResponseValue;
3797         }
3798         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_ok(struct LDKUpdateAddHTLC o);
3799         export function CResult_UpdateAddHTLCDecodeErrorZ_ok(o: number): number {
3800                 if(!isWasmInitialized) {
3801                         throw new Error("initializeWasm() must be awaited first!");
3802                 }
3803                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_ok(o);
3804                 return nativeResponseValue;
3805         }
3806         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_err(struct LDKDecodeError e);
3807         export function CResult_UpdateAddHTLCDecodeErrorZ_err(e: number): number {
3808                 if(!isWasmInitialized) {
3809                         throw new Error("initializeWasm() must be awaited first!");
3810                 }
3811                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_err(e);
3812                 return nativeResponseValue;
3813         }
3814         // void CResult_UpdateAddHTLCDecodeErrorZ_free(struct LDKCResult_UpdateAddHTLCDecodeErrorZ _res);
3815         export function CResult_UpdateAddHTLCDecodeErrorZ_free(_res: number): void {
3816                 if(!isWasmInitialized) {
3817                         throw new Error("initializeWasm() must be awaited first!");
3818                 }
3819                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_free(_res);
3820                 // debug statements here
3821         }
3822         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR orig);
3823         export function CResult_UpdateAddHTLCDecodeErrorZ_clone(orig: number): number {
3824                 if(!isWasmInitialized) {
3825                         throw new Error("initializeWasm() must be awaited first!");
3826                 }
3827                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_clone(orig);
3828                 return nativeResponseValue;
3829         }
3830         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_ok(struct LDKPing o);
3831         export function CResult_PingDecodeErrorZ_ok(o: number): number {
3832                 if(!isWasmInitialized) {
3833                         throw new Error("initializeWasm() must be awaited first!");
3834                 }
3835                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_ok(o);
3836                 return nativeResponseValue;
3837         }
3838         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_err(struct LDKDecodeError e);
3839         export function CResult_PingDecodeErrorZ_err(e: number): number {
3840                 if(!isWasmInitialized) {
3841                         throw new Error("initializeWasm() must be awaited first!");
3842                 }
3843                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_err(e);
3844                 return nativeResponseValue;
3845         }
3846         // void CResult_PingDecodeErrorZ_free(struct LDKCResult_PingDecodeErrorZ _res);
3847         export function CResult_PingDecodeErrorZ_free(_res: number): void {
3848                 if(!isWasmInitialized) {
3849                         throw new Error("initializeWasm() must be awaited first!");
3850                 }
3851                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_free(_res);
3852                 // debug statements here
3853         }
3854         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_clone(const struct LDKCResult_PingDecodeErrorZ *NONNULL_PTR orig);
3855         export function CResult_PingDecodeErrorZ_clone(orig: number): number {
3856                 if(!isWasmInitialized) {
3857                         throw new Error("initializeWasm() must be awaited first!");
3858                 }
3859                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_clone(orig);
3860                 return nativeResponseValue;
3861         }
3862         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_ok(struct LDKPong o);
3863         export function CResult_PongDecodeErrorZ_ok(o: number): number {
3864                 if(!isWasmInitialized) {
3865                         throw new Error("initializeWasm() must be awaited first!");
3866                 }
3867                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_ok(o);
3868                 return nativeResponseValue;
3869         }
3870         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_err(struct LDKDecodeError e);
3871         export function CResult_PongDecodeErrorZ_err(e: number): number {
3872                 if(!isWasmInitialized) {
3873                         throw new Error("initializeWasm() must be awaited first!");
3874                 }
3875                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_err(e);
3876                 return nativeResponseValue;
3877         }
3878         // void CResult_PongDecodeErrorZ_free(struct LDKCResult_PongDecodeErrorZ _res);
3879         export function CResult_PongDecodeErrorZ_free(_res: number): void {
3880                 if(!isWasmInitialized) {
3881                         throw new Error("initializeWasm() must be awaited first!");
3882                 }
3883                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_free(_res);
3884                 // debug statements here
3885         }
3886         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_clone(const struct LDKCResult_PongDecodeErrorZ *NONNULL_PTR orig);
3887         export function CResult_PongDecodeErrorZ_clone(orig: number): number {
3888                 if(!isWasmInitialized) {
3889                         throw new Error("initializeWasm() must be awaited first!");
3890                 }
3891                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_clone(orig);
3892                 return nativeResponseValue;
3893         }
3894         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(struct LDKUnsignedChannelAnnouncement o);
3895         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o: number): number {
3896                 if(!isWasmInitialized) {
3897                         throw new Error("initializeWasm() must be awaited first!");
3898                 }
3899                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o);
3900                 return nativeResponseValue;
3901         }
3902         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
3903         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e: number): number {
3904                 if(!isWasmInitialized) {
3905                         throw new Error("initializeWasm() must be awaited first!");
3906                 }
3907                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e);
3908                 return nativeResponseValue;
3909         }
3910         // void CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ _res);
3911         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res: number): void {
3912                 if(!isWasmInitialized) {
3913                         throw new Error("initializeWasm() must be awaited first!");
3914                 }
3915                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res);
3916                 // debug statements here
3917         }
3918         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
3919         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
3920                 if(!isWasmInitialized) {
3921                         throw new Error("initializeWasm() must be awaited first!");
3922                 }
3923                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig);
3924                 return nativeResponseValue;
3925         }
3926         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_ok(struct LDKChannelAnnouncement o);
3927         export function CResult_ChannelAnnouncementDecodeErrorZ_ok(o: number): number {
3928                 if(!isWasmInitialized) {
3929                         throw new Error("initializeWasm() must be awaited first!");
3930                 }
3931                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_ok(o);
3932                 return nativeResponseValue;
3933         }
3934         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
3935         export function CResult_ChannelAnnouncementDecodeErrorZ_err(e: number): number {
3936                 if(!isWasmInitialized) {
3937                         throw new Error("initializeWasm() must be awaited first!");
3938                 }
3939                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_err(e);
3940                 return nativeResponseValue;
3941         }
3942         // void CResult_ChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_ChannelAnnouncementDecodeErrorZ _res);
3943         export function CResult_ChannelAnnouncementDecodeErrorZ_free(_res: number): void {
3944                 if(!isWasmInitialized) {
3945                         throw new Error("initializeWasm() must be awaited first!");
3946                 }
3947                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_free(_res);
3948                 // debug statements here
3949         }
3950         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
3951         export function CResult_ChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
3952                 if(!isWasmInitialized) {
3953                         throw new Error("initializeWasm() must be awaited first!");
3954                 }
3955                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_clone(orig);
3956                 return nativeResponseValue;
3957         }
3958         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_ok(struct LDKUnsignedChannelUpdate o);
3959         export function CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o: number): number {
3960                 if(!isWasmInitialized) {
3961                         throw new Error("initializeWasm() must be awaited first!");
3962                 }
3963                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o);
3964                 return nativeResponseValue;
3965         }
3966         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
3967         export function CResult_UnsignedChannelUpdateDecodeErrorZ_err(e: number): number {
3968                 if(!isWasmInitialized) {
3969                         throw new Error("initializeWasm() must be awaited first!");
3970                 }
3971                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_err(e);
3972                 return nativeResponseValue;
3973         }
3974         // void CResult_UnsignedChannelUpdateDecodeErrorZ_free(struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ _res);
3975         export function CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res: number): void {
3976                 if(!isWasmInitialized) {
3977                         throw new Error("initializeWasm() must be awaited first!");
3978                 }
3979                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res);
3980                 // debug statements here
3981         }
3982         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
3983         export function CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig: number): number {
3984                 if(!isWasmInitialized) {
3985                         throw new Error("initializeWasm() must be awaited first!");
3986                 }
3987                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig);
3988                 return nativeResponseValue;
3989         }
3990         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_ok(struct LDKChannelUpdate o);
3991         export function CResult_ChannelUpdateDecodeErrorZ_ok(o: number): number {
3992                 if(!isWasmInitialized) {
3993                         throw new Error("initializeWasm() must be awaited first!");
3994                 }
3995                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_ok(o);
3996                 return nativeResponseValue;
3997         }
3998         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
3999         export function CResult_ChannelUpdateDecodeErrorZ_err(e: number): number {
4000                 if(!isWasmInitialized) {
4001                         throw new Error("initializeWasm() must be awaited first!");
4002                 }
4003                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_err(e);
4004                 return nativeResponseValue;
4005         }
4006         // void CResult_ChannelUpdateDecodeErrorZ_free(struct LDKCResult_ChannelUpdateDecodeErrorZ _res);
4007         export function CResult_ChannelUpdateDecodeErrorZ_free(_res: number): void {
4008                 if(!isWasmInitialized) {
4009                         throw new Error("initializeWasm() must be awaited first!");
4010                 }
4011                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_free(_res);
4012                 // debug statements here
4013         }
4014         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
4015         export function CResult_ChannelUpdateDecodeErrorZ_clone(orig: number): number {
4016                 if(!isWasmInitialized) {
4017                         throw new Error("initializeWasm() must be awaited first!");
4018                 }
4019                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_clone(orig);
4020                 return nativeResponseValue;
4021         }
4022         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_ok(struct LDKErrorMessage o);
4023         export function CResult_ErrorMessageDecodeErrorZ_ok(o: number): number {
4024                 if(!isWasmInitialized) {
4025                         throw new Error("initializeWasm() must be awaited first!");
4026                 }
4027                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_ok(o);
4028                 return nativeResponseValue;
4029         }
4030         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_err(struct LDKDecodeError e);
4031         export function CResult_ErrorMessageDecodeErrorZ_err(e: number): number {
4032                 if(!isWasmInitialized) {
4033                         throw new Error("initializeWasm() must be awaited first!");
4034                 }
4035                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_err(e);
4036                 return nativeResponseValue;
4037         }
4038         // void CResult_ErrorMessageDecodeErrorZ_free(struct LDKCResult_ErrorMessageDecodeErrorZ _res);
4039         export function CResult_ErrorMessageDecodeErrorZ_free(_res: number): void {
4040                 if(!isWasmInitialized) {
4041                         throw new Error("initializeWasm() must be awaited first!");
4042                 }
4043                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_free(_res);
4044                 // debug statements here
4045         }
4046         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_clone(const struct LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR orig);
4047         export function CResult_ErrorMessageDecodeErrorZ_clone(orig: number): number {
4048                 if(!isWasmInitialized) {
4049                         throw new Error("initializeWasm() must be awaited first!");
4050                 }
4051                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_clone(orig);
4052                 return nativeResponseValue;
4053         }
4054         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(struct LDKUnsignedNodeAnnouncement o);
4055         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o: number): number {
4056                 if(!isWasmInitialized) {
4057                         throw new Error("initializeWasm() must be awaited first!");
4058                 }
4059                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o);
4060                 return nativeResponseValue;
4061         }
4062         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
4063         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e: number): number {
4064                 if(!isWasmInitialized) {
4065                         throw new Error("initializeWasm() must be awaited first!");
4066                 }
4067                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e);
4068                 return nativeResponseValue;
4069         }
4070         // void CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res);
4071         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res: number): void {
4072                 if(!isWasmInitialized) {
4073                         throw new Error("initializeWasm() must be awaited first!");
4074                 }
4075                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res);
4076                 // debug statements here
4077         }
4078         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
4079         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig: number): number {
4080                 if(!isWasmInitialized) {
4081                         throw new Error("initializeWasm() must be awaited first!");
4082                 }
4083                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig);
4084                 return nativeResponseValue;
4085         }
4086         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_ok(struct LDKNodeAnnouncement o);
4087         export function CResult_NodeAnnouncementDecodeErrorZ_ok(o: number): number {
4088                 if(!isWasmInitialized) {
4089                         throw new Error("initializeWasm() must be awaited first!");
4090                 }
4091                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_ok(o);
4092                 return nativeResponseValue;
4093         }
4094         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
4095         export function CResult_NodeAnnouncementDecodeErrorZ_err(e: number): number {
4096                 if(!isWasmInitialized) {
4097                         throw new Error("initializeWasm() must be awaited first!");
4098                 }
4099                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_err(e);
4100                 return nativeResponseValue;
4101         }
4102         // void CResult_NodeAnnouncementDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementDecodeErrorZ _res);
4103         export function CResult_NodeAnnouncementDecodeErrorZ_free(_res: number): void {
4104                 if(!isWasmInitialized) {
4105                         throw new Error("initializeWasm() must be awaited first!");
4106                 }
4107                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_free(_res);
4108                 // debug statements here
4109         }
4110         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
4111         export function CResult_NodeAnnouncementDecodeErrorZ_clone(orig: number): number {
4112                 if(!isWasmInitialized) {
4113                         throw new Error("initializeWasm() must be awaited first!");
4114                 }
4115                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_clone(orig);
4116                 return nativeResponseValue;
4117         }
4118         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_ok(struct LDKQueryShortChannelIds o);
4119         export function CResult_QueryShortChannelIdsDecodeErrorZ_ok(o: number): number {
4120                 if(!isWasmInitialized) {
4121                         throw new Error("initializeWasm() must be awaited first!");
4122                 }
4123                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_ok(o);
4124                 return nativeResponseValue;
4125         }
4126         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_err(struct LDKDecodeError e);
4127         export function CResult_QueryShortChannelIdsDecodeErrorZ_err(e: number): number {
4128                 if(!isWasmInitialized) {
4129                         throw new Error("initializeWasm() must be awaited first!");
4130                 }
4131                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_err(e);
4132                 return nativeResponseValue;
4133         }
4134         // void CResult_QueryShortChannelIdsDecodeErrorZ_free(struct LDKCResult_QueryShortChannelIdsDecodeErrorZ _res);
4135         export function CResult_QueryShortChannelIdsDecodeErrorZ_free(_res: number): void {
4136                 if(!isWasmInitialized) {
4137                         throw new Error("initializeWasm() must be awaited first!");
4138                 }
4139                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_free(_res);
4140                 // debug statements here
4141         }
4142         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_clone(const struct LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR orig);
4143         export function CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig: number): number {
4144                 if(!isWasmInitialized) {
4145                         throw new Error("initializeWasm() must be awaited first!");
4146                 }
4147                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig);
4148                 return nativeResponseValue;
4149         }
4150         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(struct LDKReplyShortChannelIdsEnd o);
4151         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o: number): number {
4152                 if(!isWasmInitialized) {
4153                         throw new Error("initializeWasm() must be awaited first!");
4154                 }
4155                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o);
4156                 return nativeResponseValue;
4157         }
4158         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(struct LDKDecodeError e);
4159         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e: number): number {
4160                 if(!isWasmInitialized) {
4161                         throw new Error("initializeWasm() must be awaited first!");
4162                 }
4163                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e);
4164                 return nativeResponseValue;
4165         }
4166         // void CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res);
4167         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res: number): void {
4168                 if(!isWasmInitialized) {
4169                         throw new Error("initializeWasm() must be awaited first!");
4170                 }
4171                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res);
4172                 // debug statements here
4173         }
4174         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(const struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR orig);
4175         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig: number): number {
4176                 if(!isWasmInitialized) {
4177                         throw new Error("initializeWasm() must be awaited first!");
4178                 }
4179                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig);
4180                 return nativeResponseValue;
4181         }
4182         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_ok(struct LDKQueryChannelRange o);
4183         export function CResult_QueryChannelRangeDecodeErrorZ_ok(o: number): number {
4184                 if(!isWasmInitialized) {
4185                         throw new Error("initializeWasm() must be awaited first!");
4186                 }
4187                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_ok(o);
4188                 return nativeResponseValue;
4189         }
4190         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
4191         export function CResult_QueryChannelRangeDecodeErrorZ_err(e: number): number {
4192                 if(!isWasmInitialized) {
4193                         throw new Error("initializeWasm() must be awaited first!");
4194                 }
4195                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_err(e);
4196                 return nativeResponseValue;
4197         }
4198         // void CResult_QueryChannelRangeDecodeErrorZ_free(struct LDKCResult_QueryChannelRangeDecodeErrorZ _res);
4199         export function CResult_QueryChannelRangeDecodeErrorZ_free(_res: number): void {
4200                 if(!isWasmInitialized) {
4201                         throw new Error("initializeWasm() must be awaited first!");
4202                 }
4203                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_free(_res);
4204                 // debug statements here
4205         }
4206         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_clone(const struct LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR orig);
4207         export function CResult_QueryChannelRangeDecodeErrorZ_clone(orig: number): number {
4208                 if(!isWasmInitialized) {
4209                         throw new Error("initializeWasm() must be awaited first!");
4210                 }
4211                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_clone(orig);
4212                 return nativeResponseValue;
4213         }
4214         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_ok(struct LDKReplyChannelRange o);
4215         export function CResult_ReplyChannelRangeDecodeErrorZ_ok(o: number): number {
4216                 if(!isWasmInitialized) {
4217                         throw new Error("initializeWasm() must be awaited first!");
4218                 }
4219                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_ok(o);
4220                 return nativeResponseValue;
4221         }
4222         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
4223         export function CResult_ReplyChannelRangeDecodeErrorZ_err(e: number): number {
4224                 if(!isWasmInitialized) {
4225                         throw new Error("initializeWasm() must be awaited first!");
4226                 }
4227                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_err(e);
4228                 return nativeResponseValue;
4229         }
4230         // void CResult_ReplyChannelRangeDecodeErrorZ_free(struct LDKCResult_ReplyChannelRangeDecodeErrorZ _res);
4231         export function CResult_ReplyChannelRangeDecodeErrorZ_free(_res: number): void {
4232                 if(!isWasmInitialized) {
4233                         throw new Error("initializeWasm() must be awaited first!");
4234                 }
4235                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_free(_res);
4236                 // debug statements here
4237         }
4238         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_clone(const struct LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR orig);
4239         export function CResult_ReplyChannelRangeDecodeErrorZ_clone(orig: number): number {
4240                 if(!isWasmInitialized) {
4241                         throw new Error("initializeWasm() must be awaited first!");
4242                 }
4243                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_clone(orig);
4244                 return nativeResponseValue;
4245         }
4246         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_ok(struct LDKGossipTimestampFilter o);
4247         export function CResult_GossipTimestampFilterDecodeErrorZ_ok(o: number): number {
4248                 if(!isWasmInitialized) {
4249                         throw new Error("initializeWasm() must be awaited first!");
4250                 }
4251                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_ok(o);
4252                 return nativeResponseValue;
4253         }
4254         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_err(struct LDKDecodeError e);
4255         export function CResult_GossipTimestampFilterDecodeErrorZ_err(e: number): number {
4256                 if(!isWasmInitialized) {
4257                         throw new Error("initializeWasm() must be awaited first!");
4258                 }
4259                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_err(e);
4260                 return nativeResponseValue;
4261         }
4262         // void CResult_GossipTimestampFilterDecodeErrorZ_free(struct LDKCResult_GossipTimestampFilterDecodeErrorZ _res);
4263         export function CResult_GossipTimestampFilterDecodeErrorZ_free(_res: number): void {
4264                 if(!isWasmInitialized) {
4265                         throw new Error("initializeWasm() must be awaited first!");
4266                 }
4267                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_free(_res);
4268                 // debug statements here
4269         }
4270         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_clone(const struct LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR orig);
4271         export function CResult_GossipTimestampFilterDecodeErrorZ_clone(orig: number): number {
4272                 if(!isWasmInitialized) {
4273                         throw new Error("initializeWasm() must be awaited first!");
4274                 }
4275                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_clone(orig);
4276                 return nativeResponseValue;
4277         }
4278         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_ok(struct LDKSpendableOutputDescriptor o);
4279         export function CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o: number): number {
4280                 if(!isWasmInitialized) {
4281                         throw new Error("initializeWasm() must be awaited first!");
4282                 }
4283                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o);
4284                 return nativeResponseValue;
4285         }
4286         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
4287         export function CResult_SpendableOutputDescriptorDecodeErrorZ_err(e: number): number {
4288                 if(!isWasmInitialized) {
4289                         throw new Error("initializeWasm() must be awaited first!");
4290                 }
4291                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_err(e);
4292                 return nativeResponseValue;
4293         }
4294         // void CResult_SpendableOutputDescriptorDecodeErrorZ_free(struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ _res);
4295         export function CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res: number): void {
4296                 if(!isWasmInitialized) {
4297                         throw new Error("initializeWasm() must be awaited first!");
4298                 }
4299                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res);
4300                 // debug statements here
4301         }
4302         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
4303         export function CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig: number): number {
4304                 if(!isWasmInitialized) {
4305                         throw new Error("initializeWasm() must be awaited first!");
4306                 }
4307                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig);
4308                 return nativeResponseValue;
4309         }
4310         // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_clone(const struct LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR orig);
4311         export function C2Tuple_SignatureCVec_SignatureZZ_clone(orig: number): number {
4312                 if(!isWasmInitialized) {
4313                         throw new Error("initializeWasm() must be awaited first!");
4314                 }
4315                 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_clone(orig);
4316                 return nativeResponseValue;
4317         }
4318         // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(struct LDKSignature a, struct LDKCVec_SignatureZ b);
4319         export function C2Tuple_SignatureCVec_SignatureZZ_new(a: Uint8Array, b: Uint8Array[]): number {
4320                 if(!isWasmInitialized) {
4321                         throw new Error("initializeWasm() must be awaited first!");
4322                 }
4323                 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_new(encodeArray(a), b);
4324                 return nativeResponseValue;
4325         }
4326         // void C2Tuple_SignatureCVec_SignatureZZ_free(struct LDKC2Tuple_SignatureCVec_SignatureZZ _res);
4327         export function C2Tuple_SignatureCVec_SignatureZZ_free(_res: number): void {
4328                 if(!isWasmInitialized) {
4329                         throw new Error("initializeWasm() must be awaited first!");
4330                 }
4331                 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_free(_res);
4332                 // debug statements here
4333         }
4334         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(struct LDKC2Tuple_SignatureCVec_SignatureZZ o);
4335         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o: number): number {
4336                 if(!isWasmInitialized) {
4337                         throw new Error("initializeWasm() must be awaited first!");
4338                 }
4339                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o);
4340                 return nativeResponseValue;
4341         }
4342         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(void);
4343         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(): number {
4344                 if(!isWasmInitialized) {
4345                         throw new Error("initializeWasm() must be awaited first!");
4346                 }
4347                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err();
4348                 return nativeResponseValue;
4349         }
4350         // void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ _res);
4351         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res: number): void {
4352                 if(!isWasmInitialized) {
4353                         throw new Error("initializeWasm() must be awaited first!");
4354                 }
4355                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res);
4356                 // debug statements here
4357         }
4358         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR orig);
4359         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig: number): number {
4360                 if(!isWasmInitialized) {
4361                         throw new Error("initializeWasm() must be awaited first!");
4362                 }
4363                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig);
4364                 return nativeResponseValue;
4365         }
4366         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_ok(struct LDKSignature o);
4367         export function CResult_SignatureNoneZ_ok(o: Uint8Array): number {
4368                 if(!isWasmInitialized) {
4369                         throw new Error("initializeWasm() must be awaited first!");
4370                 }
4371                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_ok(encodeArray(o));
4372                 return nativeResponseValue;
4373         }
4374         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_err(void);
4375         export function CResult_SignatureNoneZ_err(): number {
4376                 if(!isWasmInitialized) {
4377                         throw new Error("initializeWasm() must be awaited first!");
4378                 }
4379                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_err();
4380                 return nativeResponseValue;
4381         }
4382         // void CResult_SignatureNoneZ_free(struct LDKCResult_SignatureNoneZ _res);
4383         export function CResult_SignatureNoneZ_free(_res: number): void {
4384                 if(!isWasmInitialized) {
4385                         throw new Error("initializeWasm() must be awaited first!");
4386                 }
4387                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_free(_res);
4388                 // debug statements here
4389         }
4390         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_clone(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR orig);
4391         export function CResult_SignatureNoneZ_clone(orig: number): number {
4392                 if(!isWasmInitialized) {
4393                         throw new Error("initializeWasm() must be awaited first!");
4394                 }
4395                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_clone(orig);
4396                 return nativeResponseValue;
4397         }
4398         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_ok(struct LDKSign o);
4399         export function CResult_SignDecodeErrorZ_ok(o: number): number {
4400                 if(!isWasmInitialized) {
4401                         throw new Error("initializeWasm() must be awaited first!");
4402                 }
4403                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_ok(o);
4404                 return nativeResponseValue;
4405         }
4406         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_err(struct LDKDecodeError e);
4407         export function CResult_SignDecodeErrorZ_err(e: number): number {
4408                 if(!isWasmInitialized) {
4409                         throw new Error("initializeWasm() must be awaited first!");
4410                 }
4411                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_err(e);
4412                 return nativeResponseValue;
4413         }
4414         // void CResult_SignDecodeErrorZ_free(struct LDKCResult_SignDecodeErrorZ _res);
4415         export function CResult_SignDecodeErrorZ_free(_res: number): void {
4416                 if(!isWasmInitialized) {
4417                         throw new Error("initializeWasm() must be awaited first!");
4418                 }
4419                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_free(_res);
4420                 // debug statements here
4421         }
4422         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_clone(const struct LDKCResult_SignDecodeErrorZ *NONNULL_PTR orig);
4423         export function CResult_SignDecodeErrorZ_clone(orig: number): number {
4424                 if(!isWasmInitialized) {
4425                         throw new Error("initializeWasm() must be awaited first!");
4426                 }
4427                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_clone(orig);
4428                 return nativeResponseValue;
4429         }
4430         // void CVec_CVec_u8ZZ_free(struct LDKCVec_CVec_u8ZZ _res);
4431         export function CVec_CVec_u8ZZ_free(_res: Uint8Array[]): void {
4432                 if(!isWasmInitialized) {
4433                         throw new Error("initializeWasm() must be awaited first!");
4434                 }
4435                 const nativeResponseValue = wasm.CVec_CVec_u8ZZ_free(_res);
4436                 // debug statements here
4437         }
4438         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_ok(struct LDKCVec_CVec_u8ZZ o);
4439         export function CResult_CVec_CVec_u8ZZNoneZ_ok(o: Uint8Array[]): number {
4440                 if(!isWasmInitialized) {
4441                         throw new Error("initializeWasm() must be awaited first!");
4442                 }
4443                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_ok(o);
4444                 return nativeResponseValue;
4445         }
4446         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_err(void);
4447         export function CResult_CVec_CVec_u8ZZNoneZ_err(): number {
4448                 if(!isWasmInitialized) {
4449                         throw new Error("initializeWasm() must be awaited first!");
4450                 }
4451                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_err();
4452                 return nativeResponseValue;
4453         }
4454         // void CResult_CVec_CVec_u8ZZNoneZ_free(struct LDKCResult_CVec_CVec_u8ZZNoneZ _res);
4455         export function CResult_CVec_CVec_u8ZZNoneZ_free(_res: number): void {
4456                 if(!isWasmInitialized) {
4457                         throw new Error("initializeWasm() must be awaited first!");
4458                 }
4459                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_free(_res);
4460                 // debug statements here
4461         }
4462         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_clone(const struct LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR orig);
4463         export function CResult_CVec_CVec_u8ZZNoneZ_clone(orig: number): number {
4464                 if(!isWasmInitialized) {
4465                         throw new Error("initializeWasm() must be awaited first!");
4466                 }
4467                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_clone(orig);
4468                 return nativeResponseValue;
4469         }
4470         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_ok(struct LDKInMemorySigner o);
4471         export function CResult_InMemorySignerDecodeErrorZ_ok(o: number): number {
4472                 if(!isWasmInitialized) {
4473                         throw new Error("initializeWasm() must be awaited first!");
4474                 }
4475                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_ok(o);
4476                 return nativeResponseValue;
4477         }
4478         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_err(struct LDKDecodeError e);
4479         export function CResult_InMemorySignerDecodeErrorZ_err(e: number): number {
4480                 if(!isWasmInitialized) {
4481                         throw new Error("initializeWasm() must be awaited first!");
4482                 }
4483                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_err(e);
4484                 return nativeResponseValue;
4485         }
4486         // void CResult_InMemorySignerDecodeErrorZ_free(struct LDKCResult_InMemorySignerDecodeErrorZ _res);
4487         export function CResult_InMemorySignerDecodeErrorZ_free(_res: number): void {
4488                 if(!isWasmInitialized) {
4489                         throw new Error("initializeWasm() must be awaited first!");
4490                 }
4491                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_free(_res);
4492                 // debug statements here
4493         }
4494         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_clone(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR orig);
4495         export function CResult_InMemorySignerDecodeErrorZ_clone(orig: number): number {
4496                 if(!isWasmInitialized) {
4497                         throw new Error("initializeWasm() must be awaited first!");
4498                 }
4499                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_clone(orig);
4500                 return nativeResponseValue;
4501         }
4502         // void CVec_TxOutZ_free(struct LDKCVec_TxOutZ _res);
4503         export function CVec_TxOutZ_free(_res: number[]): void {
4504                 if(!isWasmInitialized) {
4505                         throw new Error("initializeWasm() must be awaited first!");
4506                 }
4507                 const nativeResponseValue = wasm.CVec_TxOutZ_free(_res);
4508                 // debug statements here
4509         }
4510         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_ok(struct LDKTransaction o);
4511         export function CResult_TransactionNoneZ_ok(o: Uint8Array): number {
4512                 if(!isWasmInitialized) {
4513                         throw new Error("initializeWasm() must be awaited first!");
4514                 }
4515                 const nativeResponseValue = wasm.CResult_TransactionNoneZ_ok(encodeArray(o));
4516                 return nativeResponseValue;
4517         }
4518         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_err(void);
4519         export function CResult_TransactionNoneZ_err(): number {
4520                 if(!isWasmInitialized) {
4521                         throw new Error("initializeWasm() must be awaited first!");
4522                 }
4523                 const nativeResponseValue = wasm.CResult_TransactionNoneZ_err();
4524                 return nativeResponseValue;
4525         }
4526         // void CResult_TransactionNoneZ_free(struct LDKCResult_TransactionNoneZ _res);
4527         export function CResult_TransactionNoneZ_free(_res: number): void {
4528                 if(!isWasmInitialized) {
4529                         throw new Error("initializeWasm() must be awaited first!");
4530                 }
4531                 const nativeResponseValue = wasm.CResult_TransactionNoneZ_free(_res);
4532                 // debug statements here
4533         }
4534         // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_ok(void);
4535         export function CResult_NoneErrorZ_ok(): number {
4536                 if(!isWasmInitialized) {
4537                         throw new Error("initializeWasm() must be awaited first!");
4538                 }
4539                 const nativeResponseValue = wasm.CResult_NoneErrorZ_ok();
4540                 return nativeResponseValue;
4541         }
4542         // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_err(enum LDKIOError e);
4543         export function CResult_NoneErrorZ_err(e: LDKIOError): number {
4544                 if(!isWasmInitialized) {
4545                         throw new Error("initializeWasm() must be awaited first!");
4546                 }
4547                 const nativeResponseValue = wasm.CResult_NoneErrorZ_err(e);
4548                 return nativeResponseValue;
4549         }
4550         // void CResult_NoneErrorZ_free(struct LDKCResult_NoneErrorZ _res);
4551         export function CResult_NoneErrorZ_free(_res: number): void {
4552                 if(!isWasmInitialized) {
4553                         throw new Error("initializeWasm() must be awaited first!");
4554                 }
4555                 const nativeResponseValue = wasm.CResult_NoneErrorZ_free(_res);
4556                 // debug statements here
4557         }
4558         // void CVec_C2Tuple_BlockHashChannelMonitorZZ_free(struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ _res);
4559         export function CVec_C2Tuple_BlockHashChannelMonitorZZ_free(_res: number[]): void {
4560                 if(!isWasmInitialized) {
4561                         throw new Error("initializeWasm() must be awaited first!");
4562                 }
4563                 const nativeResponseValue = wasm.CVec_C2Tuple_BlockHashChannelMonitorZZ_free(_res);
4564                 // debug statements here
4565         }
4566         // struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ o);
4567         export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(o: number[]): number {
4568                 if(!isWasmInitialized) {
4569                         throw new Error("initializeWasm() must be awaited first!");
4570                 }
4571                 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(o);
4572                 return nativeResponseValue;
4573         }
4574         // struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(enum LDKIOError e);
4575         export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(e: LDKIOError): number {
4576                 if(!isWasmInitialized) {
4577                         throw new Error("initializeWasm() must be awaited first!");
4578                 }
4579                 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(e);
4580                 return nativeResponseValue;
4581         }
4582         // void CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ _res);
4583         export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(_res: number): void {
4584                 if(!isWasmInitialized) {
4585                         throw new Error("initializeWasm() must be awaited first!");
4586                 }
4587                 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(_res);
4588                 // debug statements here
4589         }
4590         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void);
4591         export function CResult_NoneAPIErrorZ_ok(): number {
4592                 if(!isWasmInitialized) {
4593                         throw new Error("initializeWasm() must be awaited first!");
4594                 }
4595                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_ok();
4596                 return nativeResponseValue;
4597         }
4598         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_err(struct LDKAPIError e);
4599         export function CResult_NoneAPIErrorZ_err(e: number): number {
4600                 if(!isWasmInitialized) {
4601                         throw new Error("initializeWasm() must be awaited first!");
4602                 }
4603                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_err(e);
4604                 return nativeResponseValue;
4605         }
4606         // void CResult_NoneAPIErrorZ_free(struct LDKCResult_NoneAPIErrorZ _res);
4607         export function CResult_NoneAPIErrorZ_free(_res: number): void {
4608                 if(!isWasmInitialized) {
4609                         throw new Error("initializeWasm() must be awaited first!");
4610                 }
4611                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_free(_res);
4612                 // debug statements here
4613         }
4614         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_clone(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR orig);
4615         export function CResult_NoneAPIErrorZ_clone(orig: number): number {
4616                 if(!isWasmInitialized) {
4617                         throw new Error("initializeWasm() must be awaited first!");
4618                 }
4619                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_clone(orig);
4620                 return nativeResponseValue;
4621         }
4622         // void CVec_CResult_NoneAPIErrorZZ_free(struct LDKCVec_CResult_NoneAPIErrorZZ _res);
4623         export function CVec_CResult_NoneAPIErrorZZ_free(_res: number[]): void {
4624                 if(!isWasmInitialized) {
4625                         throw new Error("initializeWasm() must be awaited first!");
4626                 }
4627                 const nativeResponseValue = wasm.CVec_CResult_NoneAPIErrorZZ_free(_res);
4628                 // debug statements here
4629         }
4630         // void CVec_APIErrorZ_free(struct LDKCVec_APIErrorZ _res);
4631         export function CVec_APIErrorZ_free(_res: number[]): void {
4632                 if(!isWasmInitialized) {
4633                         throw new Error("initializeWasm() must be awaited first!");
4634                 }
4635                 const nativeResponseValue = wasm.CVec_APIErrorZ_free(_res);
4636                 // debug statements here
4637         }
4638         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void);
4639         export function CResult_NonePaymentSendFailureZ_ok(): number {
4640                 if(!isWasmInitialized) {
4641                         throw new Error("initializeWasm() must be awaited first!");
4642                 }
4643                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_ok();
4644                 return nativeResponseValue;
4645         }
4646         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
4647         export function CResult_NonePaymentSendFailureZ_err(e: number): number {
4648                 if(!isWasmInitialized) {
4649                         throw new Error("initializeWasm() must be awaited first!");
4650                 }
4651                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_err(e);
4652                 return nativeResponseValue;
4653         }
4654         // void CResult_NonePaymentSendFailureZ_free(struct LDKCResult_NonePaymentSendFailureZ _res);
4655         export function CResult_NonePaymentSendFailureZ_free(_res: number): void {
4656                 if(!isWasmInitialized) {
4657                         throw new Error("initializeWasm() must be awaited first!");
4658                 }
4659                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_free(_res);
4660                 // debug statements here
4661         }
4662         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_clone(const struct LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR orig);
4663         export function CResult_NonePaymentSendFailureZ_clone(orig: number): number {
4664                 if(!isWasmInitialized) {
4665                         throw new Error("initializeWasm() must be awaited first!");
4666                 }
4667                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_clone(orig);
4668                 return nativeResponseValue;
4669         }
4670         // void CVec_ChannelMonitorZ_free(struct LDKCVec_ChannelMonitorZ _res);
4671         export function CVec_ChannelMonitorZ_free(_res: number[]): void {
4672                 if(!isWasmInitialized) {
4673                         throw new Error("initializeWasm() must be awaited first!");
4674                 }
4675                 const nativeResponseValue = wasm.CVec_ChannelMonitorZ_free(_res);
4676                 // debug statements here
4677         }
4678         // struct LDKC2Tuple_BlockHashChannelManagerZ C2Tuple_BlockHashChannelManagerZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelManager b);
4679         export function C2Tuple_BlockHashChannelManagerZ_new(a: Uint8Array, b: number): number {
4680                 if(!isWasmInitialized) {
4681                         throw new Error("initializeWasm() must be awaited first!");
4682                 }
4683                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_new(encodeArray(a), b);
4684                 return nativeResponseValue;
4685         }
4686         // void C2Tuple_BlockHashChannelManagerZ_free(struct LDKC2Tuple_BlockHashChannelManagerZ _res);
4687         export function C2Tuple_BlockHashChannelManagerZ_free(_res: number): void {
4688                 if(!isWasmInitialized) {
4689                         throw new Error("initializeWasm() must be awaited first!");
4690                 }
4691                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_free(_res);
4692                 // debug statements here
4693         }
4694         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelManagerZ o);
4695         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o: number): number {
4696                 if(!isWasmInitialized) {
4697                         throw new Error("initializeWasm() must be awaited first!");
4698                 }
4699                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o);
4700                 return nativeResponseValue;
4701         }
4702         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(struct LDKDecodeError e);
4703         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e: number): number {
4704                 if(!isWasmInitialized) {
4705                         throw new Error("initializeWasm() must be awaited first!");
4706                 }
4707                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e);
4708                 return nativeResponseValue;
4709         }
4710         // void CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res);
4711         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res: number): void {
4712                 if(!isWasmInitialized) {
4713                         throw new Error("initializeWasm() must be awaited first!");
4714                 }
4715                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res);
4716                 // debug statements here
4717         }
4718         // void Event_free(struct LDKEvent this_ptr);
4719         export function Event_free(this_ptr: number): void {
4720                 if(!isWasmInitialized) {
4721                         throw new Error("initializeWasm() must be awaited first!");
4722                 }
4723                 const nativeResponseValue = wasm.Event_free(this_ptr);
4724                 // debug statements here
4725         }
4726         // struct LDKEvent Event_clone(const struct LDKEvent *NONNULL_PTR orig);
4727         export function Event_clone(orig: number): number {
4728                 if(!isWasmInitialized) {
4729                         throw new Error("initializeWasm() must be awaited first!");
4730                 }
4731                 const nativeResponseValue = wasm.Event_clone(orig);
4732                 return nativeResponseValue;
4733         }
4734         // struct LDKCVec_u8Z Event_write(const struct LDKEvent *NONNULL_PTR obj);
4735         export function Event_write(obj: number): Uint8Array {
4736                 if(!isWasmInitialized) {
4737                         throw new Error("initializeWasm() must be awaited first!");
4738                 }
4739                 const nativeResponseValue = wasm.Event_write(obj);
4740                 return decodeArray(nativeResponseValue);
4741         }
4742         // void MessageSendEvent_free(struct LDKMessageSendEvent this_ptr);
4743         export function MessageSendEvent_free(this_ptr: number): void {
4744                 if(!isWasmInitialized) {
4745                         throw new Error("initializeWasm() must be awaited first!");
4746                 }
4747                 const nativeResponseValue = wasm.MessageSendEvent_free(this_ptr);
4748                 // debug statements here
4749         }
4750         // struct LDKMessageSendEvent MessageSendEvent_clone(const struct LDKMessageSendEvent *NONNULL_PTR orig);
4751         export function MessageSendEvent_clone(orig: number): number {
4752                 if(!isWasmInitialized) {
4753                         throw new Error("initializeWasm() must be awaited first!");
4754                 }
4755                 const nativeResponseValue = wasm.MessageSendEvent_clone(orig);
4756                 return nativeResponseValue;
4757         }
4758         // void MessageSendEventsProvider_free(struct LDKMessageSendEventsProvider this_ptr);
4759         export function MessageSendEventsProvider_free(this_ptr: number): void {
4760                 if(!isWasmInitialized) {
4761                         throw new Error("initializeWasm() must be awaited first!");
4762                 }
4763                 const nativeResponseValue = wasm.MessageSendEventsProvider_free(this_ptr);
4764                 // debug statements here
4765         }
4766         // void EventsProvider_free(struct LDKEventsProvider this_ptr);
4767         export function EventsProvider_free(this_ptr: number): void {
4768                 if(!isWasmInitialized) {
4769                         throw new Error("initializeWasm() must be awaited first!");
4770                 }
4771                 const nativeResponseValue = wasm.EventsProvider_free(this_ptr);
4772                 // debug statements here
4773         }
4774         // void APIError_free(struct LDKAPIError this_ptr);
4775         export function APIError_free(this_ptr: number): void {
4776                 if(!isWasmInitialized) {
4777                         throw new Error("initializeWasm() must be awaited first!");
4778                 }
4779                 const nativeResponseValue = wasm.APIError_free(this_ptr);
4780                 // debug statements here
4781         }
4782         // struct LDKAPIError APIError_clone(const struct LDKAPIError *NONNULL_PTR orig);
4783         export function APIError_clone(orig: number): number {
4784                 if(!isWasmInitialized) {
4785                         throw new Error("initializeWasm() must be awaited first!");
4786                 }
4787                 const nativeResponseValue = wasm.APIError_clone(orig);
4788                 return nativeResponseValue;
4789         }
4790         // enum LDKLevel Level_clone(const enum LDKLevel *NONNULL_PTR orig);
4791         export function Level_clone(orig: number): LDKLevel {
4792                 if(!isWasmInitialized) {
4793                         throw new Error("initializeWasm() must be awaited first!");
4794                 }
4795                 const nativeResponseValue = wasm.Level_clone(orig);
4796                 return nativeResponseValue;
4797         }
4798         // MUST_USE_RES enum LDKLevel Level_max(void);
4799         export function Level_max(): LDKLevel {
4800                 if(!isWasmInitialized) {
4801                         throw new Error("initializeWasm() must be awaited first!");
4802                 }
4803                 const nativeResponseValue = wasm.Level_max();
4804                 return nativeResponseValue;
4805         }
4806         // void Logger_free(struct LDKLogger this_ptr);
4807         export function Logger_free(this_ptr: number): void {
4808                 if(!isWasmInitialized) {
4809                         throw new Error("initializeWasm() must be awaited first!");
4810                 }
4811                 const nativeResponseValue = wasm.Logger_free(this_ptr);
4812                 // debug statements here
4813         }
4814         // void ChannelHandshakeConfig_free(struct LDKChannelHandshakeConfig this_obj);
4815         export function ChannelHandshakeConfig_free(this_obj: number): void {
4816                 if(!isWasmInitialized) {
4817                         throw new Error("initializeWasm() must be awaited first!");
4818                 }
4819                 const nativeResponseValue = wasm.ChannelHandshakeConfig_free(this_obj);
4820                 // debug statements here
4821         }
4822         // uint32_t ChannelHandshakeConfig_get_minimum_depth(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
4823         export function ChannelHandshakeConfig_get_minimum_depth(this_ptr: number): number {
4824                 if(!isWasmInitialized) {
4825                         throw new Error("initializeWasm() must be awaited first!");
4826                 }
4827                 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_minimum_depth(this_ptr);
4828                 return nativeResponseValue;
4829         }
4830         // void ChannelHandshakeConfig_set_minimum_depth(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint32_t val);
4831         export function ChannelHandshakeConfig_set_minimum_depth(this_ptr: number, val: number): void {
4832                 if(!isWasmInitialized) {
4833                         throw new Error("initializeWasm() must be awaited first!");
4834                 }
4835                 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_minimum_depth(this_ptr, val);
4836                 // debug statements here
4837         }
4838         // uint16_t ChannelHandshakeConfig_get_our_to_self_delay(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
4839         export function ChannelHandshakeConfig_get_our_to_self_delay(this_ptr: number): number {
4840                 if(!isWasmInitialized) {
4841                         throw new Error("initializeWasm() must be awaited first!");
4842                 }
4843                 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_to_self_delay(this_ptr);
4844                 return nativeResponseValue;
4845         }
4846         // void ChannelHandshakeConfig_set_our_to_self_delay(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint16_t val);
4847         export function ChannelHandshakeConfig_set_our_to_self_delay(this_ptr: number, val: number): void {
4848                 if(!isWasmInitialized) {
4849                         throw new Error("initializeWasm() must be awaited first!");
4850                 }
4851                 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_to_self_delay(this_ptr, val);
4852                 // debug statements here
4853         }
4854         // uint64_t ChannelHandshakeConfig_get_our_htlc_minimum_msat(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
4855         export function ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr: number): number {
4856                 if(!isWasmInitialized) {
4857                         throw new Error("initializeWasm() must be awaited first!");
4858                 }
4859                 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr);
4860                 return nativeResponseValue;
4861         }
4862         // void ChannelHandshakeConfig_set_our_htlc_minimum_msat(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint64_t val);
4863         export function ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr: number, val: number): void {
4864                 if(!isWasmInitialized) {
4865                         throw new Error("initializeWasm() must be awaited first!");
4866                 }
4867                 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr, val);
4868                 // debug statements here
4869         }
4870         // 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);
4871         export function ChannelHandshakeConfig_new(minimum_depth_arg: number, our_to_self_delay_arg: number, our_htlc_minimum_msat_arg: number): number {
4872                 if(!isWasmInitialized) {
4873                         throw new Error("initializeWasm() must be awaited first!");
4874                 }
4875                 const nativeResponseValue = wasm.ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg, our_htlc_minimum_msat_arg);
4876                 return nativeResponseValue;
4877         }
4878         // struct LDKChannelHandshakeConfig ChannelHandshakeConfig_clone(const struct LDKChannelHandshakeConfig *NONNULL_PTR orig);
4879         export function ChannelHandshakeConfig_clone(orig: number): number {
4880                 if(!isWasmInitialized) {
4881                         throw new Error("initializeWasm() must be awaited first!");
4882                 }
4883                 const nativeResponseValue = wasm.ChannelHandshakeConfig_clone(orig);
4884                 return nativeResponseValue;
4885         }
4886         // MUST_USE_RES struct LDKChannelHandshakeConfig ChannelHandshakeConfig_default(void);
4887         export function ChannelHandshakeConfig_default(): number {
4888                 if(!isWasmInitialized) {
4889                         throw new Error("initializeWasm() must be awaited first!");
4890                 }
4891                 const nativeResponseValue = wasm.ChannelHandshakeConfig_default();
4892                 return nativeResponseValue;
4893         }
4894         // void ChannelHandshakeLimits_free(struct LDKChannelHandshakeLimits this_obj);
4895         export function ChannelHandshakeLimits_free(this_obj: number): void {
4896                 if(!isWasmInitialized) {
4897                         throw new Error("initializeWasm() must be awaited first!");
4898                 }
4899                 const nativeResponseValue = wasm.ChannelHandshakeLimits_free(this_obj);
4900                 // debug statements here
4901         }
4902         // uint64_t ChannelHandshakeLimits_get_min_funding_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4903         export function ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr: number): number {
4904                 if(!isWasmInitialized) {
4905                         throw new Error("initializeWasm() must be awaited first!");
4906                 }
4907                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr);
4908                 return nativeResponseValue;
4909         }
4910         // void ChannelHandshakeLimits_set_min_funding_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4911         export function ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr: number, val: number): void {
4912                 if(!isWasmInitialized) {
4913                         throw new Error("initializeWasm() must be awaited first!");
4914                 }
4915                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr, val);
4916                 // debug statements here
4917         }
4918         // uint64_t ChannelHandshakeLimits_get_max_htlc_minimum_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4919         export function ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr: number): number {
4920                 if(!isWasmInitialized) {
4921                         throw new Error("initializeWasm() must be awaited first!");
4922                 }
4923                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr);
4924                 return nativeResponseValue;
4925         }
4926         // void ChannelHandshakeLimits_set_max_htlc_minimum_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4927         export function ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr: number, val: number): void {
4928                 if(!isWasmInitialized) {
4929                         throw new Error("initializeWasm() must be awaited first!");
4930                 }
4931                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr, val);
4932                 // debug statements here
4933         }
4934         // uint64_t ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4935         export function ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr: number): number {
4936                 if(!isWasmInitialized) {
4937                         throw new Error("initializeWasm() must be awaited first!");
4938                 }
4939                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr);
4940                 return nativeResponseValue;
4941         }
4942         // void ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4943         export function ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
4944                 if(!isWasmInitialized) {
4945                         throw new Error("initializeWasm() must be awaited first!");
4946                 }
4947                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr, val);
4948                 // debug statements here
4949         }
4950         // uint64_t ChannelHandshakeLimits_get_max_channel_reserve_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4951         export function ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr: number): number {
4952                 if(!isWasmInitialized) {
4953                         throw new Error("initializeWasm() must be awaited first!");
4954                 }
4955                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr);
4956                 return nativeResponseValue;
4957         }
4958         // void ChannelHandshakeLimits_set_max_channel_reserve_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4959         export function ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr: number, val: number): void {
4960                 if(!isWasmInitialized) {
4961                         throw new Error("initializeWasm() must be awaited first!");
4962                 }
4963                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr, val);
4964                 // debug statements here
4965         }
4966         // uint16_t ChannelHandshakeLimits_get_min_max_accepted_htlcs(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4967         export function ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr: number): number {
4968                 if(!isWasmInitialized) {
4969                         throw new Error("initializeWasm() must be awaited first!");
4970                 }
4971                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr);
4972                 return nativeResponseValue;
4973         }
4974         // void ChannelHandshakeLimits_set_min_max_accepted_htlcs(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
4975         export function ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr: number, val: number): void {
4976                 if(!isWasmInitialized) {
4977                         throw new Error("initializeWasm() must be awaited first!");
4978                 }
4979                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr, val);
4980                 // debug statements here
4981         }
4982         // uint64_t ChannelHandshakeLimits_get_min_dust_limit_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4983         export function ChannelHandshakeLimits_get_min_dust_limit_satoshis(this_ptr: number): number {
4984                 if(!isWasmInitialized) {
4985                         throw new Error("initializeWasm() must be awaited first!");
4986                 }
4987                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_dust_limit_satoshis(this_ptr);
4988                 return nativeResponseValue;
4989         }
4990         // void ChannelHandshakeLimits_set_min_dust_limit_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4991         export function ChannelHandshakeLimits_set_min_dust_limit_satoshis(this_ptr: number, val: number): void {
4992                 if(!isWasmInitialized) {
4993                         throw new Error("initializeWasm() must be awaited first!");
4994                 }
4995                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_dust_limit_satoshis(this_ptr, val);
4996                 // debug statements here
4997         }
4998         // uint64_t ChannelHandshakeLimits_get_max_dust_limit_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4999         export function ChannelHandshakeLimits_get_max_dust_limit_satoshis(this_ptr: number): number {
5000                 if(!isWasmInitialized) {
5001                         throw new Error("initializeWasm() must be awaited first!");
5002                 }
5003                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_dust_limit_satoshis(this_ptr);
5004                 return nativeResponseValue;
5005         }
5006         // void ChannelHandshakeLimits_set_max_dust_limit_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
5007         export function ChannelHandshakeLimits_set_max_dust_limit_satoshis(this_ptr: number, val: number): void {
5008                 if(!isWasmInitialized) {
5009                         throw new Error("initializeWasm() must be awaited first!");
5010                 }
5011                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_dust_limit_satoshis(this_ptr, val);
5012                 // debug statements here
5013         }
5014         // uint32_t ChannelHandshakeLimits_get_max_minimum_depth(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
5015         export function ChannelHandshakeLimits_get_max_minimum_depth(this_ptr: number): number {
5016                 if(!isWasmInitialized) {
5017                         throw new Error("initializeWasm() must be awaited first!");
5018                 }
5019                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_minimum_depth(this_ptr);
5020                 return nativeResponseValue;
5021         }
5022         // void ChannelHandshakeLimits_set_max_minimum_depth(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint32_t val);
5023         export function ChannelHandshakeLimits_set_max_minimum_depth(this_ptr: number, val: number): void {
5024                 if(!isWasmInitialized) {
5025                         throw new Error("initializeWasm() must be awaited first!");
5026                 }
5027                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_minimum_depth(this_ptr, val);
5028                 // debug statements here
5029         }
5030         // bool ChannelHandshakeLimits_get_force_announced_channel_preference(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
5031         export function ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr: number): boolean {
5032                 if(!isWasmInitialized) {
5033                         throw new Error("initializeWasm() must be awaited first!");
5034                 }
5035                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr);
5036                 return nativeResponseValue;
5037         }
5038         // void ChannelHandshakeLimits_set_force_announced_channel_preference(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, bool val);
5039         export function ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr: number, val: boolean): void {
5040                 if(!isWasmInitialized) {
5041                         throw new Error("initializeWasm() must be awaited first!");
5042                 }
5043                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr, val);
5044                 // debug statements here
5045         }
5046         // uint16_t ChannelHandshakeLimits_get_their_to_self_delay(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
5047         export function ChannelHandshakeLimits_get_their_to_self_delay(this_ptr: number): number {
5048                 if(!isWasmInitialized) {
5049                         throw new Error("initializeWasm() must be awaited first!");
5050                 }
5051                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_their_to_self_delay(this_ptr);
5052                 return nativeResponseValue;
5053         }
5054         // void ChannelHandshakeLimits_set_their_to_self_delay(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
5055         export function ChannelHandshakeLimits_set_their_to_self_delay(this_ptr: number, val: number): void {
5056                 if(!isWasmInitialized) {
5057                         throw new Error("initializeWasm() must be awaited first!");
5058                 }
5059                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_their_to_self_delay(this_ptr, val);
5060                 // debug statements here
5061         }
5062         // MUST_USE_RES struct LDKChannelHandshakeLimits ChannelHandshakeLimits_new(uint64_t min_funding_satoshis_arg, uint64_t max_htlc_minimum_msat_arg, uint64_t min_max_htlc_value_in_flight_msat_arg, uint64_t max_channel_reserve_satoshis_arg, uint16_t min_max_accepted_htlcs_arg, uint64_t min_dust_limit_satoshis_arg, uint64_t max_dust_limit_satoshis_arg, uint32_t max_minimum_depth_arg, bool force_announced_channel_preference_arg, uint16_t their_to_self_delay_arg);
5063         export function ChannelHandshakeLimits_new(min_funding_satoshis_arg: number, max_htlc_minimum_msat_arg: number, min_max_htlc_value_in_flight_msat_arg: number, max_channel_reserve_satoshis_arg: number, min_max_accepted_htlcs_arg: number, min_dust_limit_satoshis_arg: number, max_dust_limit_satoshis_arg: number, max_minimum_depth_arg: number, force_announced_channel_preference_arg: boolean, their_to_self_delay_arg: number): number {
5064                 if(!isWasmInitialized) {
5065                         throw new Error("initializeWasm() must be awaited first!");
5066                 }
5067                 const nativeResponseValue = wasm.ChannelHandshakeLimits_new(min_funding_satoshis_arg, max_htlc_minimum_msat_arg, min_max_htlc_value_in_flight_msat_arg, max_channel_reserve_satoshis_arg, min_max_accepted_htlcs_arg, min_dust_limit_satoshis_arg, max_dust_limit_satoshis_arg, max_minimum_depth_arg, force_announced_channel_preference_arg, their_to_self_delay_arg);
5068                 return nativeResponseValue;
5069         }
5070         // struct LDKChannelHandshakeLimits ChannelHandshakeLimits_clone(const struct LDKChannelHandshakeLimits *NONNULL_PTR orig);
5071         export function ChannelHandshakeLimits_clone(orig: number): number {
5072                 if(!isWasmInitialized) {
5073                         throw new Error("initializeWasm() must be awaited first!");
5074                 }
5075                 const nativeResponseValue = wasm.ChannelHandshakeLimits_clone(orig);
5076                 return nativeResponseValue;
5077         }
5078         // MUST_USE_RES struct LDKChannelHandshakeLimits ChannelHandshakeLimits_default(void);
5079         export function ChannelHandshakeLimits_default(): number {
5080                 if(!isWasmInitialized) {
5081                         throw new Error("initializeWasm() must be awaited first!");
5082                 }
5083                 const nativeResponseValue = wasm.ChannelHandshakeLimits_default();
5084                 return nativeResponseValue;
5085         }
5086         // void ChannelConfig_free(struct LDKChannelConfig this_obj);
5087         export function ChannelConfig_free(this_obj: number): void {
5088                 if(!isWasmInitialized) {
5089                         throw new Error("initializeWasm() must be awaited first!");
5090                 }
5091                 const nativeResponseValue = wasm.ChannelConfig_free(this_obj);
5092                 // debug statements here
5093         }
5094         // uint32_t ChannelConfig_get_fee_proportional_millionths(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
5095         export function ChannelConfig_get_fee_proportional_millionths(this_ptr: number): number {
5096                 if(!isWasmInitialized) {
5097                         throw new Error("initializeWasm() must be awaited first!");
5098                 }
5099                 const nativeResponseValue = wasm.ChannelConfig_get_fee_proportional_millionths(this_ptr);
5100                 return nativeResponseValue;
5101         }
5102         // void ChannelConfig_set_fee_proportional_millionths(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
5103         export function ChannelConfig_set_fee_proportional_millionths(this_ptr: number, val: number): void {
5104                 if(!isWasmInitialized) {
5105                         throw new Error("initializeWasm() must be awaited first!");
5106                 }
5107                 const nativeResponseValue = wasm.ChannelConfig_set_fee_proportional_millionths(this_ptr, val);
5108                 // debug statements here
5109         }
5110         // uint16_t ChannelConfig_get_cltv_expiry_delta(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
5111         export function ChannelConfig_get_cltv_expiry_delta(this_ptr: number): number {
5112                 if(!isWasmInitialized) {
5113                         throw new Error("initializeWasm() must be awaited first!");
5114                 }
5115                 const nativeResponseValue = wasm.ChannelConfig_get_cltv_expiry_delta(this_ptr);
5116                 return nativeResponseValue;
5117         }
5118         // void ChannelConfig_set_cltv_expiry_delta(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint16_t val);
5119         export function ChannelConfig_set_cltv_expiry_delta(this_ptr: number, val: number): void {
5120                 if(!isWasmInitialized) {
5121                         throw new Error("initializeWasm() must be awaited first!");
5122                 }
5123                 const nativeResponseValue = wasm.ChannelConfig_set_cltv_expiry_delta(this_ptr, val);
5124                 // debug statements here
5125         }
5126         // bool ChannelConfig_get_announced_channel(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
5127         export function ChannelConfig_get_announced_channel(this_ptr: number): boolean {
5128                 if(!isWasmInitialized) {
5129                         throw new Error("initializeWasm() must be awaited first!");
5130                 }
5131                 const nativeResponseValue = wasm.ChannelConfig_get_announced_channel(this_ptr);
5132                 return nativeResponseValue;
5133         }
5134         // void ChannelConfig_set_announced_channel(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
5135         export function ChannelConfig_set_announced_channel(this_ptr: number, val: boolean): void {
5136                 if(!isWasmInitialized) {
5137                         throw new Error("initializeWasm() must be awaited first!");
5138                 }
5139                 const nativeResponseValue = wasm.ChannelConfig_set_announced_channel(this_ptr, val);
5140                 // debug statements here
5141         }
5142         // bool ChannelConfig_get_commit_upfront_shutdown_pubkey(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
5143         export function ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr: number): boolean {
5144                 if(!isWasmInitialized) {
5145                         throw new Error("initializeWasm() must be awaited first!");
5146                 }
5147                 const nativeResponseValue = wasm.ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr);
5148                 return nativeResponseValue;
5149         }
5150         // void ChannelConfig_set_commit_upfront_shutdown_pubkey(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
5151         export function ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr: number, val: boolean): void {
5152                 if(!isWasmInitialized) {
5153                         throw new Error("initializeWasm() must be awaited first!");
5154                 }
5155                 const nativeResponseValue = wasm.ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr, val);
5156                 // debug statements here
5157         }
5158         // MUST_USE_RES struct LDKChannelConfig ChannelConfig_new(uint32_t fee_proportional_millionths_arg, uint16_t cltv_expiry_delta_arg, bool announced_channel_arg, bool commit_upfront_shutdown_pubkey_arg);
5159         export function ChannelConfig_new(fee_proportional_millionths_arg: number, cltv_expiry_delta_arg: number, announced_channel_arg: boolean, commit_upfront_shutdown_pubkey_arg: boolean): number {
5160                 if(!isWasmInitialized) {
5161                         throw new Error("initializeWasm() must be awaited first!");
5162                 }
5163                 const nativeResponseValue = wasm.ChannelConfig_new(fee_proportional_millionths_arg, cltv_expiry_delta_arg, announced_channel_arg, commit_upfront_shutdown_pubkey_arg);
5164                 return nativeResponseValue;
5165         }
5166         // struct LDKChannelConfig ChannelConfig_clone(const struct LDKChannelConfig *NONNULL_PTR orig);
5167         export function ChannelConfig_clone(orig: number): number {
5168                 if(!isWasmInitialized) {
5169                         throw new Error("initializeWasm() must be awaited first!");
5170                 }
5171                 const nativeResponseValue = wasm.ChannelConfig_clone(orig);
5172                 return nativeResponseValue;
5173         }
5174         // MUST_USE_RES struct LDKChannelConfig ChannelConfig_default(void);
5175         export function ChannelConfig_default(): number {
5176                 if(!isWasmInitialized) {
5177                         throw new Error("initializeWasm() must be awaited first!");
5178                 }
5179                 const nativeResponseValue = wasm.ChannelConfig_default();
5180                 return nativeResponseValue;
5181         }
5182         // struct LDKCVec_u8Z ChannelConfig_write(const struct LDKChannelConfig *NONNULL_PTR obj);
5183         export function ChannelConfig_write(obj: number): Uint8Array {
5184                 if(!isWasmInitialized) {
5185                         throw new Error("initializeWasm() must be awaited first!");
5186                 }
5187                 const nativeResponseValue = wasm.ChannelConfig_write(obj);
5188                 return decodeArray(nativeResponseValue);
5189         }
5190         // struct LDKCResult_ChannelConfigDecodeErrorZ ChannelConfig_read(struct LDKu8slice ser);
5191         export function ChannelConfig_read(ser: Uint8Array): number {
5192                 if(!isWasmInitialized) {
5193                         throw new Error("initializeWasm() must be awaited first!");
5194                 }
5195                 const nativeResponseValue = wasm.ChannelConfig_read(encodeArray(ser));
5196                 return nativeResponseValue;
5197         }
5198         // void UserConfig_free(struct LDKUserConfig this_obj);
5199         export function UserConfig_free(this_obj: number): void {
5200                 if(!isWasmInitialized) {
5201                         throw new Error("initializeWasm() must be awaited first!");
5202                 }
5203                 const nativeResponseValue = wasm.UserConfig_free(this_obj);
5204                 // debug statements here
5205         }
5206         // struct LDKChannelHandshakeConfig UserConfig_get_own_channel_config(const struct LDKUserConfig *NONNULL_PTR this_ptr);
5207         export function UserConfig_get_own_channel_config(this_ptr: number): number {
5208                 if(!isWasmInitialized) {
5209                         throw new Error("initializeWasm() must be awaited first!");
5210                 }
5211                 const nativeResponseValue = wasm.UserConfig_get_own_channel_config(this_ptr);
5212                 return nativeResponseValue;
5213         }
5214         // void UserConfig_set_own_channel_config(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeConfig val);
5215         export function UserConfig_set_own_channel_config(this_ptr: number, val: number): void {
5216                 if(!isWasmInitialized) {
5217                         throw new Error("initializeWasm() must be awaited first!");
5218                 }
5219                 const nativeResponseValue = wasm.UserConfig_set_own_channel_config(this_ptr, val);
5220                 // debug statements here
5221         }
5222         // struct LDKChannelHandshakeLimits UserConfig_get_peer_channel_config_limits(const struct LDKUserConfig *NONNULL_PTR this_ptr);
5223         export function UserConfig_get_peer_channel_config_limits(this_ptr: number): number {
5224                 if(!isWasmInitialized) {
5225                         throw new Error("initializeWasm() must be awaited first!");
5226                 }
5227                 const nativeResponseValue = wasm.UserConfig_get_peer_channel_config_limits(this_ptr);
5228                 return nativeResponseValue;
5229         }
5230         // void UserConfig_set_peer_channel_config_limits(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeLimits val);
5231         export function UserConfig_set_peer_channel_config_limits(this_ptr: number, val: number): void {
5232                 if(!isWasmInitialized) {
5233                         throw new Error("initializeWasm() must be awaited first!");
5234                 }
5235                 const nativeResponseValue = wasm.UserConfig_set_peer_channel_config_limits(this_ptr, val);
5236                 // debug statements here
5237         }
5238         // struct LDKChannelConfig UserConfig_get_channel_options(const struct LDKUserConfig *NONNULL_PTR this_ptr);
5239         export function UserConfig_get_channel_options(this_ptr: number): number {
5240                 if(!isWasmInitialized) {
5241                         throw new Error("initializeWasm() must be awaited first!");
5242                 }
5243                 const nativeResponseValue = wasm.UserConfig_get_channel_options(this_ptr);
5244                 return nativeResponseValue;
5245         }
5246         // void UserConfig_set_channel_options(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelConfig val);
5247         export function UserConfig_set_channel_options(this_ptr: number, val: number): void {
5248                 if(!isWasmInitialized) {
5249                         throw new Error("initializeWasm() must be awaited first!");
5250                 }
5251                 const nativeResponseValue = wasm.UserConfig_set_channel_options(this_ptr, val);
5252                 // debug statements here
5253         }
5254         // 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);
5255         export function UserConfig_new(own_channel_config_arg: number, peer_channel_config_limits_arg: number, channel_options_arg: number): number {
5256                 if(!isWasmInitialized) {
5257                         throw new Error("initializeWasm() must be awaited first!");
5258                 }
5259                 const nativeResponseValue = wasm.UserConfig_new(own_channel_config_arg, peer_channel_config_limits_arg, channel_options_arg);
5260                 return nativeResponseValue;
5261         }
5262         // struct LDKUserConfig UserConfig_clone(const struct LDKUserConfig *NONNULL_PTR orig);
5263         export function UserConfig_clone(orig: number): number {
5264                 if(!isWasmInitialized) {
5265                         throw new Error("initializeWasm() must be awaited first!");
5266                 }
5267                 const nativeResponseValue = wasm.UserConfig_clone(orig);
5268                 return nativeResponseValue;
5269         }
5270         // MUST_USE_RES struct LDKUserConfig UserConfig_default(void);
5271         export function UserConfig_default(): number {
5272                 if(!isWasmInitialized) {
5273                         throw new Error("initializeWasm() must be awaited first!");
5274                 }
5275                 const nativeResponseValue = wasm.UserConfig_default();
5276                 return nativeResponseValue;
5277         }
5278         // enum LDKAccessError AccessError_clone(const enum LDKAccessError *NONNULL_PTR orig);
5279         export function AccessError_clone(orig: number): LDKAccessError {
5280                 if(!isWasmInitialized) {
5281                         throw new Error("initializeWasm() must be awaited first!");
5282                 }
5283                 const nativeResponseValue = wasm.AccessError_clone(orig);
5284                 return nativeResponseValue;
5285         }
5286         // void Access_free(struct LDKAccess this_ptr);
5287         export function Access_free(this_ptr: number): void {
5288                 if(!isWasmInitialized) {
5289                         throw new Error("initializeWasm() must be awaited first!");
5290                 }
5291                 const nativeResponseValue = wasm.Access_free(this_ptr);
5292                 // debug statements here
5293         }
5294         // void Listen_free(struct LDKListen this_ptr);
5295         export function Listen_free(this_ptr: number): void {
5296                 if(!isWasmInitialized) {
5297                         throw new Error("initializeWasm() must be awaited first!");
5298                 }
5299                 const nativeResponseValue = wasm.Listen_free(this_ptr);
5300                 // debug statements here
5301         }
5302         // void Watch_free(struct LDKWatch this_ptr);
5303         export function Watch_free(this_ptr: number): void {
5304                 if(!isWasmInitialized) {
5305                         throw new Error("initializeWasm() must be awaited first!");
5306                 }
5307                 const nativeResponseValue = wasm.Watch_free(this_ptr);
5308                 // debug statements here
5309         }
5310         // void Filter_free(struct LDKFilter this_ptr);
5311         export function Filter_free(this_ptr: number): void {
5312                 if(!isWasmInitialized) {
5313                         throw new Error("initializeWasm() must be awaited first!");
5314                 }
5315                 const nativeResponseValue = wasm.Filter_free(this_ptr);
5316                 // debug statements here
5317         }
5318         // void WatchedOutput_free(struct LDKWatchedOutput this_obj);
5319         export function WatchedOutput_free(this_obj: number): void {
5320                 if(!isWasmInitialized) {
5321                         throw new Error("initializeWasm() must be awaited first!");
5322                 }
5323                 const nativeResponseValue = wasm.WatchedOutput_free(this_obj);
5324                 // debug statements here
5325         }
5326         // struct LDKThirtyTwoBytes WatchedOutput_get_block_hash(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
5327         export function WatchedOutput_get_block_hash(this_ptr: number): Uint8Array {
5328                 if(!isWasmInitialized) {
5329                         throw new Error("initializeWasm() must be awaited first!");
5330                 }
5331                 const nativeResponseValue = wasm.WatchedOutput_get_block_hash(this_ptr);
5332                 return decodeArray(nativeResponseValue);
5333         }
5334         // void WatchedOutput_set_block_hash(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5335         export function WatchedOutput_set_block_hash(this_ptr: number, val: Uint8Array): void {
5336                 if(!isWasmInitialized) {
5337                         throw new Error("initializeWasm() must be awaited first!");
5338                 }
5339                 const nativeResponseValue = wasm.WatchedOutput_set_block_hash(this_ptr, encodeArray(val));
5340                 // debug statements here
5341         }
5342         // struct LDKOutPoint WatchedOutput_get_outpoint(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
5343         export function WatchedOutput_get_outpoint(this_ptr: number): number {
5344                 if(!isWasmInitialized) {
5345                         throw new Error("initializeWasm() must be awaited first!");
5346                 }
5347                 const nativeResponseValue = wasm.WatchedOutput_get_outpoint(this_ptr);
5348                 return nativeResponseValue;
5349         }
5350         // void WatchedOutput_set_outpoint(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKOutPoint val);
5351         export function WatchedOutput_set_outpoint(this_ptr: number, val: number): void {
5352                 if(!isWasmInitialized) {
5353                         throw new Error("initializeWasm() must be awaited first!");
5354                 }
5355                 const nativeResponseValue = wasm.WatchedOutput_set_outpoint(this_ptr, val);
5356                 // debug statements here
5357         }
5358         // struct LDKu8slice WatchedOutput_get_script_pubkey(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
5359         export function WatchedOutput_get_script_pubkey(this_ptr: number): Uint8Array {
5360                 if(!isWasmInitialized) {
5361                         throw new Error("initializeWasm() must be awaited first!");
5362                 }
5363                 const nativeResponseValue = wasm.WatchedOutput_get_script_pubkey(this_ptr);
5364                 return decodeArray(nativeResponseValue);
5365         }
5366         // void WatchedOutput_set_script_pubkey(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
5367         export function WatchedOutput_set_script_pubkey(this_ptr: number, val: Uint8Array): void {
5368                 if(!isWasmInitialized) {
5369                         throw new Error("initializeWasm() must be awaited first!");
5370                 }
5371                 const nativeResponseValue = wasm.WatchedOutput_set_script_pubkey(this_ptr, encodeArray(val));
5372                 // debug statements here
5373         }
5374         // MUST_USE_RES struct LDKWatchedOutput WatchedOutput_new(struct LDKThirtyTwoBytes block_hash_arg, struct LDKOutPoint outpoint_arg, struct LDKCVec_u8Z script_pubkey_arg);
5375         export function WatchedOutput_new(block_hash_arg: Uint8Array, outpoint_arg: number, script_pubkey_arg: Uint8Array): number {
5376                 if(!isWasmInitialized) {
5377                         throw new Error("initializeWasm() must be awaited first!");
5378                 }
5379                 const nativeResponseValue = wasm.WatchedOutput_new(encodeArray(block_hash_arg), outpoint_arg, encodeArray(script_pubkey_arg));
5380                 return nativeResponseValue;
5381         }
5382         // void BroadcasterInterface_free(struct LDKBroadcasterInterface this_ptr);
5383         export function BroadcasterInterface_free(this_ptr: number): void {
5384                 if(!isWasmInitialized) {
5385                         throw new Error("initializeWasm() must be awaited first!");
5386                 }
5387                 const nativeResponseValue = wasm.BroadcasterInterface_free(this_ptr);
5388                 // debug statements here
5389         }
5390         // enum LDKConfirmationTarget ConfirmationTarget_clone(const enum LDKConfirmationTarget *NONNULL_PTR orig);
5391         export function ConfirmationTarget_clone(orig: number): LDKConfirmationTarget {
5392                 if(!isWasmInitialized) {
5393                         throw new Error("initializeWasm() must be awaited first!");
5394                 }
5395                 const nativeResponseValue = wasm.ConfirmationTarget_clone(orig);
5396                 return nativeResponseValue;
5397         }
5398         // void FeeEstimator_free(struct LDKFeeEstimator this_ptr);
5399         export function FeeEstimator_free(this_ptr: number): void {
5400                 if(!isWasmInitialized) {
5401                         throw new Error("initializeWasm() must be awaited first!");
5402                 }
5403                 const nativeResponseValue = wasm.FeeEstimator_free(this_ptr);
5404                 // debug statements here
5405         }
5406         // void ChainMonitor_free(struct LDKChainMonitor this_obj);
5407         export function ChainMonitor_free(this_obj: number): void {
5408                 if(!isWasmInitialized) {
5409                         throw new Error("initializeWasm() must be awaited first!");
5410                 }
5411                 const nativeResponseValue = wasm.ChainMonitor_free(this_obj);
5412                 // debug statements here
5413         }
5414         // void ChainMonitor_block_connected(const struct LDKChainMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height);
5415         export function ChainMonitor_block_connected(this_arg: number, header: Uint8Array, txdata: number[], height: number): void {
5416                 if(!isWasmInitialized) {
5417                         throw new Error("initializeWasm() must be awaited first!");
5418                 }
5419                 const nativeResponseValue = wasm.ChainMonitor_block_connected(this_arg, encodeArray(header), txdata, height);
5420                 // debug statements here
5421         }
5422         // void ChainMonitor_transactions_confirmed(const struct LDKChainMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height);
5423         export function ChainMonitor_transactions_confirmed(this_arg: number, header: Uint8Array, txdata: number[], height: number): void {
5424                 if(!isWasmInitialized) {
5425                         throw new Error("initializeWasm() must be awaited first!");
5426                 }
5427                 const nativeResponseValue = wasm.ChainMonitor_transactions_confirmed(this_arg, encodeArray(header), txdata, height);
5428                 // debug statements here
5429         }
5430         // void ChainMonitor_update_best_block(const struct LDKChainMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height);
5431         export function ChainMonitor_update_best_block(this_arg: number, header: Uint8Array, height: number): void {
5432                 if(!isWasmInitialized) {
5433                         throw new Error("initializeWasm() must be awaited first!");
5434                 }
5435                 const nativeResponseValue = wasm.ChainMonitor_update_best_block(this_arg, encodeArray(header), height);
5436                 // debug statements here
5437         }
5438         // void ChainMonitor_block_disconnected(const struct LDKChainMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t disconnected_height);
5439         export function ChainMonitor_block_disconnected(this_arg: number, header: Uint8Array, disconnected_height: number): void {
5440                 if(!isWasmInitialized) {
5441                         throw new Error("initializeWasm() must be awaited first!");
5442                 }
5443                 const nativeResponseValue = wasm.ChainMonitor_block_disconnected(this_arg, encodeArray(header), disconnected_height);
5444                 // debug statements here
5445         }
5446         // void ChainMonitor_transaction_unconfirmed(const struct LDKChainMonitor *NONNULL_PTR this_arg, const uint8_t (*txid)[32]);
5447         export function ChainMonitor_transaction_unconfirmed(this_arg: number, txid: Uint8Array): void {
5448                 if(!isWasmInitialized) {
5449                         throw new Error("initializeWasm() must be awaited first!");
5450                 }
5451                 const nativeResponseValue = wasm.ChainMonitor_transaction_unconfirmed(this_arg, encodeArray(txid));
5452                 // debug statements here
5453         }
5454         // MUST_USE_RES struct LDKCVec_TxidZ ChainMonitor_get_relevant_txids(const struct LDKChainMonitor *NONNULL_PTR this_arg);
5455         export function ChainMonitor_get_relevant_txids(this_arg: number): Uint8Array[] {
5456                 if(!isWasmInitialized) {
5457                         throw new Error("initializeWasm() must be awaited first!");
5458                 }
5459                 const nativeResponseValue = wasm.ChainMonitor_get_relevant_txids(this_arg);
5460                 return nativeResponseValue;
5461         }
5462         // MUST_USE_RES struct LDKChainMonitor ChainMonitor_new(struct LDKFilter *chain_source, struct LDKBroadcasterInterface broadcaster, struct LDKLogger logger, struct LDKFeeEstimator feeest, struct LDKPersist persister);
5463         export function ChainMonitor_new(chain_source: number, broadcaster: number, logger: number, feeest: number, persister: number): number {
5464                 if(!isWasmInitialized) {
5465                         throw new Error("initializeWasm() must be awaited first!");
5466                 }
5467                 const nativeResponseValue = wasm.ChainMonitor_new(chain_source, broadcaster, logger, feeest, persister);
5468                 return nativeResponseValue;
5469         }
5470         // struct LDKWatch ChainMonitor_as_Watch(const struct LDKChainMonitor *NONNULL_PTR this_arg);
5471         export function ChainMonitor_as_Watch(this_arg: number): number {
5472                 if(!isWasmInitialized) {
5473                         throw new Error("initializeWasm() must be awaited first!");
5474                 }
5475                 const nativeResponseValue = wasm.ChainMonitor_as_Watch(this_arg);
5476                 return nativeResponseValue;
5477         }
5478         // struct LDKEventsProvider ChainMonitor_as_EventsProvider(const struct LDKChainMonitor *NONNULL_PTR this_arg);
5479         export function ChainMonitor_as_EventsProvider(this_arg: number): number {
5480                 if(!isWasmInitialized) {
5481                         throw new Error("initializeWasm() must be awaited first!");
5482                 }
5483                 const nativeResponseValue = wasm.ChainMonitor_as_EventsProvider(this_arg);
5484                 return nativeResponseValue;
5485         }
5486         // void ChannelMonitorUpdate_free(struct LDKChannelMonitorUpdate this_obj);
5487         export function ChannelMonitorUpdate_free(this_obj: number): void {
5488                 if(!isWasmInitialized) {
5489                         throw new Error("initializeWasm() must be awaited first!");
5490                 }
5491                 const nativeResponseValue = wasm.ChannelMonitorUpdate_free(this_obj);
5492                 // debug statements here
5493         }
5494         // uint64_t ChannelMonitorUpdate_get_update_id(const struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr);
5495         export function ChannelMonitorUpdate_get_update_id(this_ptr: number): number {
5496                 if(!isWasmInitialized) {
5497                         throw new Error("initializeWasm() must be awaited first!");
5498                 }
5499                 const nativeResponseValue = wasm.ChannelMonitorUpdate_get_update_id(this_ptr);
5500                 return nativeResponseValue;
5501         }
5502         // void ChannelMonitorUpdate_set_update_id(struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr, uint64_t val);
5503         export function ChannelMonitorUpdate_set_update_id(this_ptr: number, val: number): void {
5504                 if(!isWasmInitialized) {
5505                         throw new Error("initializeWasm() must be awaited first!");
5506                 }
5507                 const nativeResponseValue = wasm.ChannelMonitorUpdate_set_update_id(this_ptr, val);
5508                 // debug statements here
5509         }
5510         // struct LDKChannelMonitorUpdate ChannelMonitorUpdate_clone(const struct LDKChannelMonitorUpdate *NONNULL_PTR orig);
5511         export function ChannelMonitorUpdate_clone(orig: number): number {
5512                 if(!isWasmInitialized) {
5513                         throw new Error("initializeWasm() must be awaited first!");
5514                 }
5515                 const nativeResponseValue = wasm.ChannelMonitorUpdate_clone(orig);
5516                 return nativeResponseValue;
5517         }
5518         // struct LDKCVec_u8Z ChannelMonitorUpdate_write(const struct LDKChannelMonitorUpdate *NONNULL_PTR obj);
5519         export function ChannelMonitorUpdate_write(obj: number): Uint8Array {
5520                 if(!isWasmInitialized) {
5521                         throw new Error("initializeWasm() must be awaited first!");
5522                 }
5523                 const nativeResponseValue = wasm.ChannelMonitorUpdate_write(obj);
5524                 return decodeArray(nativeResponseValue);
5525         }
5526         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ ChannelMonitorUpdate_read(struct LDKu8slice ser);
5527         export function ChannelMonitorUpdate_read(ser: Uint8Array): number {
5528                 if(!isWasmInitialized) {
5529                         throw new Error("initializeWasm() must be awaited first!");
5530                 }
5531                 const nativeResponseValue = wasm.ChannelMonitorUpdate_read(encodeArray(ser));
5532                 return nativeResponseValue;
5533         }
5534         // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_clone(const enum LDKChannelMonitorUpdateErr *NONNULL_PTR orig);
5535         export function ChannelMonitorUpdateErr_clone(orig: number): LDKChannelMonitorUpdateErr {
5536                 if(!isWasmInitialized) {
5537                         throw new Error("initializeWasm() must be awaited first!");
5538                 }
5539                 const nativeResponseValue = wasm.ChannelMonitorUpdateErr_clone(orig);
5540                 return nativeResponseValue;
5541         }
5542         // void MonitorUpdateError_free(struct LDKMonitorUpdateError this_obj);
5543         export function MonitorUpdateError_free(this_obj: number): void {
5544                 if(!isWasmInitialized) {
5545                         throw new Error("initializeWasm() must be awaited first!");
5546                 }
5547                 const nativeResponseValue = wasm.MonitorUpdateError_free(this_obj);
5548                 // debug statements here
5549         }
5550         // struct LDKMonitorUpdateError MonitorUpdateError_clone(const struct LDKMonitorUpdateError *NONNULL_PTR orig);
5551         export function MonitorUpdateError_clone(orig: number): number {
5552                 if(!isWasmInitialized) {
5553                         throw new Error("initializeWasm() must be awaited first!");
5554                 }
5555                 const nativeResponseValue = wasm.MonitorUpdateError_clone(orig);
5556                 return nativeResponseValue;
5557         }
5558         // void MonitorEvent_free(struct LDKMonitorEvent this_ptr);
5559         export function MonitorEvent_free(this_ptr: number): void {
5560                 if(!isWasmInitialized) {
5561                         throw new Error("initializeWasm() must be awaited first!");
5562                 }
5563                 const nativeResponseValue = wasm.MonitorEvent_free(this_ptr);
5564                 // debug statements here
5565         }
5566         // struct LDKMonitorEvent MonitorEvent_clone(const struct LDKMonitorEvent *NONNULL_PTR orig);
5567         export function MonitorEvent_clone(orig: number): number {
5568                 if(!isWasmInitialized) {
5569                         throw new Error("initializeWasm() must be awaited first!");
5570                 }
5571                 const nativeResponseValue = wasm.MonitorEvent_clone(orig);
5572                 return nativeResponseValue;
5573         }
5574         // void HTLCUpdate_free(struct LDKHTLCUpdate this_obj);
5575         export function HTLCUpdate_free(this_obj: number): void {
5576                 if(!isWasmInitialized) {
5577                         throw new Error("initializeWasm() must be awaited first!");
5578                 }
5579                 const nativeResponseValue = wasm.HTLCUpdate_free(this_obj);
5580                 // debug statements here
5581         }
5582         // struct LDKHTLCUpdate HTLCUpdate_clone(const struct LDKHTLCUpdate *NONNULL_PTR orig);
5583         export function HTLCUpdate_clone(orig: number): number {
5584                 if(!isWasmInitialized) {
5585                         throw new Error("initializeWasm() must be awaited first!");
5586                 }
5587                 const nativeResponseValue = wasm.HTLCUpdate_clone(orig);
5588                 return nativeResponseValue;
5589         }
5590         // struct LDKCVec_u8Z HTLCUpdate_write(const struct LDKHTLCUpdate *NONNULL_PTR obj);
5591         export function HTLCUpdate_write(obj: number): Uint8Array {
5592                 if(!isWasmInitialized) {
5593                         throw new Error("initializeWasm() must be awaited first!");
5594                 }
5595                 const nativeResponseValue = wasm.HTLCUpdate_write(obj);
5596                 return decodeArray(nativeResponseValue);
5597         }
5598         // struct LDKCResult_HTLCUpdateDecodeErrorZ HTLCUpdate_read(struct LDKu8slice ser);
5599         export function HTLCUpdate_read(ser: Uint8Array): number {
5600                 if(!isWasmInitialized) {
5601                         throw new Error("initializeWasm() must be awaited first!");
5602                 }
5603                 const nativeResponseValue = wasm.HTLCUpdate_read(encodeArray(ser));
5604                 return nativeResponseValue;
5605         }
5606         // void ChannelMonitor_free(struct LDKChannelMonitor this_obj);
5607         export function ChannelMonitor_free(this_obj: number): void {
5608                 if(!isWasmInitialized) {
5609                         throw new Error("initializeWasm() must be awaited first!");
5610                 }
5611                 const nativeResponseValue = wasm.ChannelMonitor_free(this_obj);
5612                 // debug statements here
5613         }
5614         // struct LDKChannelMonitor ChannelMonitor_clone(const struct LDKChannelMonitor *NONNULL_PTR orig);
5615         export function ChannelMonitor_clone(orig: number): number {
5616                 if(!isWasmInitialized) {
5617                         throw new Error("initializeWasm() must be awaited first!");
5618                 }
5619                 const nativeResponseValue = wasm.ChannelMonitor_clone(orig);
5620                 return nativeResponseValue;
5621         }
5622         // struct LDKCVec_u8Z ChannelMonitor_write(const struct LDKChannelMonitor *NONNULL_PTR obj);
5623         export function ChannelMonitor_write(obj: number): Uint8Array {
5624                 if(!isWasmInitialized) {
5625                         throw new Error("initializeWasm() must be awaited first!");
5626                 }
5627                 const nativeResponseValue = wasm.ChannelMonitor_write(obj);
5628                 return decodeArray(nativeResponseValue);
5629         }
5630         // MUST_USE_RES struct LDKCResult_NoneMonitorUpdateErrorZ ChannelMonitor_update_monitor(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKChannelMonitorUpdate *NONNULL_PTR updates, const struct LDKBroadcasterInterface *NONNULL_PTR broadcaster, const struct LDKFeeEstimator *NONNULL_PTR fee_estimator, const struct LDKLogger *NONNULL_PTR logger);
5631         export function ChannelMonitor_update_monitor(this_arg: number, updates: number, broadcaster: number, fee_estimator: number, logger: number): number {
5632                 if(!isWasmInitialized) {
5633                         throw new Error("initializeWasm() must be awaited first!");
5634                 }
5635                 const nativeResponseValue = wasm.ChannelMonitor_update_monitor(this_arg, updates, broadcaster, fee_estimator, logger);
5636                 return nativeResponseValue;
5637         }
5638         // MUST_USE_RES uint64_t ChannelMonitor_get_latest_update_id(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
5639         export function ChannelMonitor_get_latest_update_id(this_arg: number): number {
5640                 if(!isWasmInitialized) {
5641                         throw new Error("initializeWasm() must be awaited first!");
5642                 }
5643                 const nativeResponseValue = wasm.ChannelMonitor_get_latest_update_id(this_arg);
5644                 return nativeResponseValue;
5645         }
5646         // MUST_USE_RES struct LDKC2Tuple_OutPointScriptZ ChannelMonitor_get_funding_txo(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
5647         export function ChannelMonitor_get_funding_txo(this_arg: number): number {
5648                 if(!isWasmInitialized) {
5649                         throw new Error("initializeWasm() must be awaited first!");
5650                 }
5651                 const nativeResponseValue = wasm.ChannelMonitor_get_funding_txo(this_arg);
5652                 return nativeResponseValue;
5653         }
5654         // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ ChannelMonitor_get_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
5655         export function ChannelMonitor_get_outputs_to_watch(this_arg: number): number[] {
5656                 if(!isWasmInitialized) {
5657                         throw new Error("initializeWasm() must be awaited first!");
5658                 }
5659                 const nativeResponseValue = wasm.ChannelMonitor_get_outputs_to_watch(this_arg);
5660                 return nativeResponseValue;
5661         }
5662         // void ChannelMonitor_load_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKFilter *NONNULL_PTR filter);
5663         export function ChannelMonitor_load_outputs_to_watch(this_arg: number, filter: number): void {
5664                 if(!isWasmInitialized) {
5665                         throw new Error("initializeWasm() must be awaited first!");
5666                 }
5667                 const nativeResponseValue = wasm.ChannelMonitor_load_outputs_to_watch(this_arg, filter);
5668                 // debug statements here
5669         }
5670         // MUST_USE_RES struct LDKCVec_MonitorEventZ ChannelMonitor_get_and_clear_pending_monitor_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
5671         export function ChannelMonitor_get_and_clear_pending_monitor_events(this_arg: number): number[] {
5672                 if(!isWasmInitialized) {
5673                         throw new Error("initializeWasm() must be awaited first!");
5674                 }
5675                 const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_monitor_events(this_arg);
5676                 return nativeResponseValue;
5677         }
5678         // MUST_USE_RES struct LDKCVec_EventZ ChannelMonitor_get_and_clear_pending_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
5679         export function ChannelMonitor_get_and_clear_pending_events(this_arg: number): number[] {
5680                 if(!isWasmInitialized) {
5681                         throw new Error("initializeWasm() must be awaited first!");
5682                 }
5683                 const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_events(this_arg);
5684                 return nativeResponseValue;
5685         }
5686         // 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);
5687         export function ChannelMonitor_get_latest_holder_commitment_txn(this_arg: number, logger: number): Uint8Array[] {
5688                 if(!isWasmInitialized) {
5689                         throw new Error("initializeWasm() must be awaited first!");
5690                 }
5691                 const nativeResponseValue = wasm.ChannelMonitor_get_latest_holder_commitment_txn(this_arg, logger);
5692                 return nativeResponseValue;
5693         }
5694         // 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);
5695         export function ChannelMonitor_block_connected(this_arg: number, header: Uint8Array, txdata: number[], height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
5696                 if(!isWasmInitialized) {
5697                         throw new Error("initializeWasm() must be awaited first!");
5698                 }
5699                 const nativeResponseValue = wasm.ChannelMonitor_block_connected(this_arg, encodeArray(header), txdata, height, broadcaster, fee_estimator, logger);
5700                 return nativeResponseValue;
5701         }
5702         // 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);
5703         export function ChannelMonitor_block_disconnected(this_arg: number, header: Uint8Array, height: number, broadcaster: number, fee_estimator: number, logger: number): void {
5704                 if(!isWasmInitialized) {
5705                         throw new Error("initializeWasm() must be awaited first!");
5706                 }
5707                 const nativeResponseValue = wasm.ChannelMonitor_block_disconnected(this_arg, encodeArray(header), height, broadcaster, fee_estimator, logger);
5708                 // debug statements here
5709         }
5710         // 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);
5711         export function ChannelMonitor_transactions_confirmed(this_arg: number, header: Uint8Array, txdata: number[], height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
5712                 if(!isWasmInitialized) {
5713                         throw new Error("initializeWasm() must be awaited first!");
5714                 }
5715                 const nativeResponseValue = wasm.ChannelMonitor_transactions_confirmed(this_arg, encodeArray(header), txdata, height, broadcaster, fee_estimator, logger);
5716                 return nativeResponseValue;
5717         }
5718         // 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);
5719         export function ChannelMonitor_transaction_unconfirmed(this_arg: number, txid: Uint8Array, broadcaster: number, fee_estimator: number, logger: number): void {
5720                 if(!isWasmInitialized) {
5721                         throw new Error("initializeWasm() must be awaited first!");
5722                 }
5723                 const nativeResponseValue = wasm.ChannelMonitor_transaction_unconfirmed(this_arg, encodeArray(txid), broadcaster, fee_estimator, logger);
5724                 // debug statements here
5725         }
5726         // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ChannelMonitor_update_best_block(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);
5727         export function ChannelMonitor_update_best_block(this_arg: number, header: Uint8Array, height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
5728                 if(!isWasmInitialized) {
5729                         throw new Error("initializeWasm() must be awaited first!");
5730                 }
5731                 const nativeResponseValue = wasm.ChannelMonitor_update_best_block(this_arg, encodeArray(header), height, broadcaster, fee_estimator, logger);
5732                 return nativeResponseValue;
5733         }
5734         // MUST_USE_RES struct LDKCVec_TxidZ ChannelMonitor_get_relevant_txids(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
5735         export function ChannelMonitor_get_relevant_txids(this_arg: number): Uint8Array[] {
5736                 if(!isWasmInitialized) {
5737                         throw new Error("initializeWasm() must be awaited first!");
5738                 }
5739                 const nativeResponseValue = wasm.ChannelMonitor_get_relevant_txids(this_arg);
5740                 return nativeResponseValue;
5741         }
5742         // void Persist_free(struct LDKPersist this_ptr);
5743         export function Persist_free(this_ptr: number): void {
5744                 if(!isWasmInitialized) {
5745                         throw new Error("initializeWasm() must be awaited first!");
5746                 }
5747                 const nativeResponseValue = wasm.Persist_free(this_ptr);
5748                 // debug statements here
5749         }
5750         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ C2Tuple_BlockHashChannelMonitorZ_read(struct LDKu8slice ser, const struct LDKKeysInterface *NONNULL_PTR arg);
5751         export function C2Tuple_BlockHashChannelMonitorZ_read(ser: Uint8Array, arg: number): number {
5752                 if(!isWasmInitialized) {
5753                         throw new Error("initializeWasm() must be awaited first!");
5754                 }
5755                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_read(encodeArray(ser), arg);
5756                 return nativeResponseValue;
5757         }
5758         // void OutPoint_free(struct LDKOutPoint this_obj);
5759         export function OutPoint_free(this_obj: number): void {
5760                 if(!isWasmInitialized) {
5761                         throw new Error("initializeWasm() must be awaited first!");
5762                 }
5763                 const nativeResponseValue = wasm.OutPoint_free(this_obj);
5764                 // debug statements here
5765         }
5766         // const uint8_t (*OutPoint_get_txid(const struct LDKOutPoint *NONNULL_PTR this_ptr))[32];
5767         export function OutPoint_get_txid(this_ptr: number): Uint8Array {
5768                 if(!isWasmInitialized) {
5769                         throw new Error("initializeWasm() must be awaited first!");
5770                 }
5771                 const nativeResponseValue = wasm.OutPoint_get_txid(this_ptr);
5772                 return decodeArray(nativeResponseValue);
5773         }
5774         // void OutPoint_set_txid(struct LDKOutPoint *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5775         export function OutPoint_set_txid(this_ptr: number, val: Uint8Array): void {
5776                 if(!isWasmInitialized) {
5777                         throw new Error("initializeWasm() must be awaited first!");
5778                 }
5779                 const nativeResponseValue = wasm.OutPoint_set_txid(this_ptr, encodeArray(val));
5780                 // debug statements here
5781         }
5782         // uint16_t OutPoint_get_index(const struct LDKOutPoint *NONNULL_PTR this_ptr);
5783         export function OutPoint_get_index(this_ptr: number): number {
5784                 if(!isWasmInitialized) {
5785                         throw new Error("initializeWasm() must be awaited first!");
5786                 }
5787                 const nativeResponseValue = wasm.OutPoint_get_index(this_ptr);
5788                 return nativeResponseValue;
5789         }
5790         // void OutPoint_set_index(struct LDKOutPoint *NONNULL_PTR this_ptr, uint16_t val);
5791         export function OutPoint_set_index(this_ptr: number, val: number): void {
5792                 if(!isWasmInitialized) {
5793                         throw new Error("initializeWasm() must be awaited first!");
5794                 }
5795                 const nativeResponseValue = wasm.OutPoint_set_index(this_ptr, val);
5796                 // debug statements here
5797         }
5798         // MUST_USE_RES struct LDKOutPoint OutPoint_new(struct LDKThirtyTwoBytes txid_arg, uint16_t index_arg);
5799         export function OutPoint_new(txid_arg: Uint8Array, index_arg: number): number {
5800                 if(!isWasmInitialized) {
5801                         throw new Error("initializeWasm() must be awaited first!");
5802                 }
5803                 const nativeResponseValue = wasm.OutPoint_new(encodeArray(txid_arg), index_arg);
5804                 return nativeResponseValue;
5805         }
5806         // struct LDKOutPoint OutPoint_clone(const struct LDKOutPoint *NONNULL_PTR orig);
5807         export function OutPoint_clone(orig: number): number {
5808                 if(!isWasmInitialized) {
5809                         throw new Error("initializeWasm() must be awaited first!");
5810                 }
5811                 const nativeResponseValue = wasm.OutPoint_clone(orig);
5812                 return nativeResponseValue;
5813         }
5814         // MUST_USE_RES struct LDKThirtyTwoBytes OutPoint_to_channel_id(const struct LDKOutPoint *NONNULL_PTR this_arg);
5815         export function OutPoint_to_channel_id(this_arg: number): Uint8Array {
5816                 if(!isWasmInitialized) {
5817                         throw new Error("initializeWasm() must be awaited first!");
5818                 }
5819                 const nativeResponseValue = wasm.OutPoint_to_channel_id(this_arg);
5820                 return decodeArray(nativeResponseValue);
5821         }
5822         // struct LDKCVec_u8Z OutPoint_write(const struct LDKOutPoint *NONNULL_PTR obj);
5823         export function OutPoint_write(obj: number): Uint8Array {
5824                 if(!isWasmInitialized) {
5825                         throw new Error("initializeWasm() must be awaited first!");
5826                 }
5827                 const nativeResponseValue = wasm.OutPoint_write(obj);
5828                 return decodeArray(nativeResponseValue);
5829         }
5830         // struct LDKCResult_OutPointDecodeErrorZ OutPoint_read(struct LDKu8slice ser);
5831         export function OutPoint_read(ser: Uint8Array): number {
5832                 if(!isWasmInitialized) {
5833                         throw new Error("initializeWasm() must be awaited first!");
5834                 }
5835                 const nativeResponseValue = wasm.OutPoint_read(encodeArray(ser));
5836                 return nativeResponseValue;
5837         }
5838         // void DelayedPaymentOutputDescriptor_free(struct LDKDelayedPaymentOutputDescriptor this_obj);
5839         export function DelayedPaymentOutputDescriptor_free(this_obj: number): void {
5840                 if(!isWasmInitialized) {
5841                         throw new Error("initializeWasm() must be awaited first!");
5842                 }
5843                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_free(this_obj);
5844                 // debug statements here
5845         }
5846         // struct LDKOutPoint DelayedPaymentOutputDescriptor_get_outpoint(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5847         export function DelayedPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
5848                 if(!isWasmInitialized) {
5849                         throw new Error("initializeWasm() must be awaited first!");
5850                 }
5851                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_outpoint(this_ptr);
5852                 return nativeResponseValue;
5853         }
5854         // void DelayedPaymentOutputDescriptor_set_outpoint(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
5855         export function DelayedPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
5856                 if(!isWasmInitialized) {
5857                         throw new Error("initializeWasm() must be awaited first!");
5858                 }
5859                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_outpoint(this_ptr, val);
5860                 // debug statements here
5861         }
5862         // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_per_commitment_point(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5863         export function DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr: number): Uint8Array {
5864                 if(!isWasmInitialized) {
5865                         throw new Error("initializeWasm() must be awaited first!");
5866                 }
5867                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr);
5868                 return decodeArray(nativeResponseValue);
5869         }
5870         // void DelayedPaymentOutputDescriptor_set_per_commitment_point(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
5871         export function DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
5872                 if(!isWasmInitialized) {
5873                         throw new Error("initializeWasm() must be awaited first!");
5874                 }
5875                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr, encodeArray(val));
5876                 // debug statements here
5877         }
5878         // uint16_t DelayedPaymentOutputDescriptor_get_to_self_delay(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5879         export function DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr: number): number {
5880                 if(!isWasmInitialized) {
5881                         throw new Error("initializeWasm() must be awaited first!");
5882                 }
5883                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr);
5884                 return nativeResponseValue;
5885         }
5886         // void DelayedPaymentOutputDescriptor_set_to_self_delay(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint16_t val);
5887         export function DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr: number, val: number): void {
5888                 if(!isWasmInitialized) {
5889                         throw new Error("initializeWasm() must be awaited first!");
5890                 }
5891                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr, val);
5892                 // debug statements here
5893         }
5894         // void DelayedPaymentOutputDescriptor_set_output(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
5895         export function DelayedPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
5896                 if(!isWasmInitialized) {
5897                         throw new Error("initializeWasm() must be awaited first!");
5898                 }
5899                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_output(this_ptr, val);
5900                 // debug statements here
5901         }
5902         // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_revocation_pubkey(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5903         export function DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr: number): Uint8Array {
5904                 if(!isWasmInitialized) {
5905                         throw new Error("initializeWasm() must be awaited first!");
5906                 }
5907                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr);
5908                 return decodeArray(nativeResponseValue);
5909         }
5910         // void DelayedPaymentOutputDescriptor_set_revocation_pubkey(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
5911         export function DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr: number, val: Uint8Array): void {
5912                 if(!isWasmInitialized) {
5913                         throw new Error("initializeWasm() must be awaited first!");
5914                 }
5915                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr, encodeArray(val));
5916                 // debug statements here
5917         }
5918         // const uint8_t (*DelayedPaymentOutputDescriptor_get_channel_keys_id(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
5919         export function DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): Uint8Array {
5920                 if(!isWasmInitialized) {
5921                         throw new Error("initializeWasm() must be awaited first!");
5922                 }
5923                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
5924                 return decodeArray(nativeResponseValue);
5925         }
5926         // void DelayedPaymentOutputDescriptor_set_channel_keys_id(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5927         export function DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: Uint8Array): void {
5928                 if(!isWasmInitialized) {
5929                         throw new Error("initializeWasm() must be awaited first!");
5930                 }
5931                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr, encodeArray(val));
5932                 // debug statements here
5933         }
5934         // uint64_t DelayedPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5935         export function DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): number {
5936                 if(!isWasmInitialized) {
5937                         throw new Error("initializeWasm() must be awaited first!");
5938                 }
5939                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
5940                 return nativeResponseValue;
5941         }
5942         // void DelayedPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
5943         export function DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: number): void {
5944                 if(!isWasmInitialized) {
5945                         throw new Error("initializeWasm() must be awaited first!");
5946                 }
5947                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
5948                 // debug statements here
5949         }
5950         // 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);
5951         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 {
5952                 if(!isWasmInitialized) {
5953                         throw new Error("initializeWasm() must be awaited first!");
5954                 }
5955                 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);
5956                 return nativeResponseValue;
5957         }
5958         // struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_clone(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR orig);
5959         export function DelayedPaymentOutputDescriptor_clone(orig: number): number {
5960                 if(!isWasmInitialized) {
5961                         throw new Error("initializeWasm() must be awaited first!");
5962                 }
5963                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_clone(orig);
5964                 return nativeResponseValue;
5965         }
5966         // void StaticPaymentOutputDescriptor_free(struct LDKStaticPaymentOutputDescriptor this_obj);
5967         export function StaticPaymentOutputDescriptor_free(this_obj: number): void {
5968                 if(!isWasmInitialized) {
5969                         throw new Error("initializeWasm() must be awaited first!");
5970                 }
5971                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_free(this_obj);
5972                 // debug statements here
5973         }
5974         // struct LDKOutPoint StaticPaymentOutputDescriptor_get_outpoint(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5975         export function StaticPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
5976                 if(!isWasmInitialized) {
5977                         throw new Error("initializeWasm() must be awaited first!");
5978                 }
5979                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_outpoint(this_ptr);
5980                 return nativeResponseValue;
5981         }
5982         // void StaticPaymentOutputDescriptor_set_outpoint(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
5983         export function StaticPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
5984                 if(!isWasmInitialized) {
5985                         throw new Error("initializeWasm() must be awaited first!");
5986                 }
5987                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_outpoint(this_ptr, val);
5988                 // debug statements here
5989         }
5990         // void StaticPaymentOutputDescriptor_set_output(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
5991         export function StaticPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
5992                 if(!isWasmInitialized) {
5993                         throw new Error("initializeWasm() must be awaited first!");
5994                 }
5995                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_output(this_ptr, val);
5996                 // debug statements here
5997         }
5998         // const uint8_t (*StaticPaymentOutputDescriptor_get_channel_keys_id(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
5999         export function StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): Uint8Array {
6000                 if(!isWasmInitialized) {
6001                         throw new Error("initializeWasm() must be awaited first!");
6002                 }
6003                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
6004                 return decodeArray(nativeResponseValue);
6005         }
6006         // void StaticPaymentOutputDescriptor_set_channel_keys_id(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6007         export function StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: Uint8Array): void {
6008                 if(!isWasmInitialized) {
6009                         throw new Error("initializeWasm() must be awaited first!");
6010                 }
6011                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr, encodeArray(val));
6012                 // debug statements here
6013         }
6014         // uint64_t StaticPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
6015         export function StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): number {
6016                 if(!isWasmInitialized) {
6017                         throw new Error("initializeWasm() must be awaited first!");
6018                 }
6019                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
6020                 return nativeResponseValue;
6021         }
6022         // void StaticPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
6023         export function StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: number): void {
6024                 if(!isWasmInitialized) {
6025                         throw new Error("initializeWasm() must be awaited first!");
6026                 }
6027                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
6028                 // debug statements here
6029         }
6030         // 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);
6031         export function StaticPaymentOutputDescriptor_new(outpoint_arg: number, output_arg: number, channel_keys_id_arg: Uint8Array, channel_value_satoshis_arg: number): number {
6032                 if(!isWasmInitialized) {
6033                         throw new Error("initializeWasm() must be awaited first!");
6034                 }
6035                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_new(outpoint_arg, output_arg, encodeArray(channel_keys_id_arg), channel_value_satoshis_arg);
6036                 return nativeResponseValue;
6037         }
6038         // struct LDKStaticPaymentOutputDescriptor StaticPaymentOutputDescriptor_clone(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR orig);
6039         export function StaticPaymentOutputDescriptor_clone(orig: number): number {
6040                 if(!isWasmInitialized) {
6041                         throw new Error("initializeWasm() must be awaited first!");
6042                 }
6043                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_clone(orig);
6044                 return nativeResponseValue;
6045         }
6046         // void SpendableOutputDescriptor_free(struct LDKSpendableOutputDescriptor this_ptr);
6047         export function SpendableOutputDescriptor_free(this_ptr: number): void {
6048                 if(!isWasmInitialized) {
6049                         throw new Error("initializeWasm() must be awaited first!");
6050                 }
6051                 const nativeResponseValue = wasm.SpendableOutputDescriptor_free(this_ptr);
6052                 // debug statements here
6053         }
6054         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_clone(const struct LDKSpendableOutputDescriptor *NONNULL_PTR orig);
6055         export function SpendableOutputDescriptor_clone(orig: number): number {
6056                 if(!isWasmInitialized) {
6057                         throw new Error("initializeWasm() must be awaited first!");
6058                 }
6059                 const nativeResponseValue = wasm.SpendableOutputDescriptor_clone(orig);
6060                 return nativeResponseValue;
6061         }
6062         // struct LDKCVec_u8Z SpendableOutputDescriptor_write(const struct LDKSpendableOutputDescriptor *NONNULL_PTR obj);
6063         export function SpendableOutputDescriptor_write(obj: number): Uint8Array {
6064                 if(!isWasmInitialized) {
6065                         throw new Error("initializeWasm() must be awaited first!");
6066                 }
6067                 const nativeResponseValue = wasm.SpendableOutputDescriptor_write(obj);
6068                 return decodeArray(nativeResponseValue);
6069         }
6070         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ SpendableOutputDescriptor_read(struct LDKu8slice ser);
6071         export function SpendableOutputDescriptor_read(ser: Uint8Array): number {
6072                 if(!isWasmInitialized) {
6073                         throw new Error("initializeWasm() must be awaited first!");
6074                 }
6075                 const nativeResponseValue = wasm.SpendableOutputDescriptor_read(encodeArray(ser));
6076                 return nativeResponseValue;
6077         }
6078         // void BaseSign_free(struct LDKBaseSign this_ptr);
6079         export function BaseSign_free(this_ptr: number): void {
6080                 if(!isWasmInitialized) {
6081                         throw new Error("initializeWasm() must be awaited first!");
6082                 }
6083                 const nativeResponseValue = wasm.BaseSign_free(this_ptr);
6084                 // debug statements here
6085         }
6086         // struct LDKSign Sign_clone(const struct LDKSign *NONNULL_PTR orig);
6087         export function Sign_clone(orig: number): number {
6088                 if(!isWasmInitialized) {
6089                         throw new Error("initializeWasm() must be awaited first!");
6090                 }
6091                 const nativeResponseValue = wasm.Sign_clone(orig);
6092                 return nativeResponseValue;
6093         }
6094         // void Sign_free(struct LDKSign this_ptr);
6095         export function Sign_free(this_ptr: number): void {
6096                 if(!isWasmInitialized) {
6097                         throw new Error("initializeWasm() must be awaited first!");
6098                 }
6099                 const nativeResponseValue = wasm.Sign_free(this_ptr);
6100                 // debug statements here
6101         }
6102         // void KeysInterface_free(struct LDKKeysInterface this_ptr);
6103         export function KeysInterface_free(this_ptr: number): void {
6104                 if(!isWasmInitialized) {
6105                         throw new Error("initializeWasm() must be awaited first!");
6106                 }
6107                 const nativeResponseValue = wasm.KeysInterface_free(this_ptr);
6108                 // debug statements here
6109         }
6110         // void InMemorySigner_free(struct LDKInMemorySigner this_obj);
6111         export function InMemorySigner_free(this_obj: number): void {
6112                 if(!isWasmInitialized) {
6113                         throw new Error("initializeWasm() must be awaited first!");
6114                 }
6115                 const nativeResponseValue = wasm.InMemorySigner_free(this_obj);
6116                 // debug statements here
6117         }
6118         // const uint8_t (*InMemorySigner_get_funding_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
6119         export function InMemorySigner_get_funding_key(this_ptr: number): Uint8Array {
6120                 if(!isWasmInitialized) {
6121                         throw new Error("initializeWasm() must be awaited first!");
6122                 }
6123                 const nativeResponseValue = wasm.InMemorySigner_get_funding_key(this_ptr);
6124                 return decodeArray(nativeResponseValue);
6125         }
6126         // void InMemorySigner_set_funding_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
6127         export function InMemorySigner_set_funding_key(this_ptr: number, val: Uint8Array): void {
6128                 if(!isWasmInitialized) {
6129                         throw new Error("initializeWasm() must be awaited first!");
6130                 }
6131                 const nativeResponseValue = wasm.InMemorySigner_set_funding_key(this_ptr, encodeArray(val));
6132                 // debug statements here
6133         }
6134         // const uint8_t (*InMemorySigner_get_revocation_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
6135         export function InMemorySigner_get_revocation_base_key(this_ptr: number): Uint8Array {
6136                 if(!isWasmInitialized) {
6137                         throw new Error("initializeWasm() must be awaited first!");
6138                 }
6139                 const nativeResponseValue = wasm.InMemorySigner_get_revocation_base_key(this_ptr);
6140                 return decodeArray(nativeResponseValue);
6141         }
6142         // void InMemorySigner_set_revocation_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
6143         export function InMemorySigner_set_revocation_base_key(this_ptr: number, val: Uint8Array): void {
6144                 if(!isWasmInitialized) {
6145                         throw new Error("initializeWasm() must be awaited first!");
6146                 }
6147                 const nativeResponseValue = wasm.InMemorySigner_set_revocation_base_key(this_ptr, encodeArray(val));
6148                 // debug statements here
6149         }
6150         // const uint8_t (*InMemorySigner_get_payment_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
6151         export function InMemorySigner_get_payment_key(this_ptr: number): Uint8Array {
6152                 if(!isWasmInitialized) {
6153                         throw new Error("initializeWasm() must be awaited first!");
6154                 }
6155                 const nativeResponseValue = wasm.InMemorySigner_get_payment_key(this_ptr);
6156                 return decodeArray(nativeResponseValue);
6157         }
6158         // void InMemorySigner_set_payment_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
6159         export function InMemorySigner_set_payment_key(this_ptr: number, val: Uint8Array): void {
6160                 if(!isWasmInitialized) {
6161                         throw new Error("initializeWasm() must be awaited first!");
6162                 }
6163                 const nativeResponseValue = wasm.InMemorySigner_set_payment_key(this_ptr, encodeArray(val));
6164                 // debug statements here
6165         }
6166         // const uint8_t (*InMemorySigner_get_delayed_payment_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
6167         export function InMemorySigner_get_delayed_payment_base_key(this_ptr: number): Uint8Array {
6168                 if(!isWasmInitialized) {
6169                         throw new Error("initializeWasm() must be awaited first!");
6170                 }
6171                 const nativeResponseValue = wasm.InMemorySigner_get_delayed_payment_base_key(this_ptr);
6172                 return decodeArray(nativeResponseValue);
6173         }
6174         // void InMemorySigner_set_delayed_payment_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
6175         export function InMemorySigner_set_delayed_payment_base_key(this_ptr: number, val: Uint8Array): void {
6176                 if(!isWasmInitialized) {
6177                         throw new Error("initializeWasm() must be awaited first!");
6178                 }
6179                 const nativeResponseValue = wasm.InMemorySigner_set_delayed_payment_base_key(this_ptr, encodeArray(val));
6180                 // debug statements here
6181         }
6182         // const uint8_t (*InMemorySigner_get_htlc_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
6183         export function InMemorySigner_get_htlc_base_key(this_ptr: number): Uint8Array {
6184                 if(!isWasmInitialized) {
6185                         throw new Error("initializeWasm() must be awaited first!");
6186                 }
6187                 const nativeResponseValue = wasm.InMemorySigner_get_htlc_base_key(this_ptr);
6188                 return decodeArray(nativeResponseValue);
6189         }
6190         // void InMemorySigner_set_htlc_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
6191         export function InMemorySigner_set_htlc_base_key(this_ptr: number, val: Uint8Array): void {
6192                 if(!isWasmInitialized) {
6193                         throw new Error("initializeWasm() must be awaited first!");
6194                 }
6195                 const nativeResponseValue = wasm.InMemorySigner_set_htlc_base_key(this_ptr, encodeArray(val));
6196                 // debug statements here
6197         }
6198         // const uint8_t (*InMemorySigner_get_commitment_seed(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
6199         export function InMemorySigner_get_commitment_seed(this_ptr: number): Uint8Array {
6200                 if(!isWasmInitialized) {
6201                         throw new Error("initializeWasm() must be awaited first!");
6202                 }
6203                 const nativeResponseValue = wasm.InMemorySigner_get_commitment_seed(this_ptr);
6204                 return decodeArray(nativeResponseValue);
6205         }
6206         // void InMemorySigner_set_commitment_seed(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6207         export function InMemorySigner_set_commitment_seed(this_ptr: number, val: Uint8Array): void {
6208                 if(!isWasmInitialized) {
6209                         throw new Error("initializeWasm() must be awaited first!");
6210                 }
6211                 const nativeResponseValue = wasm.InMemorySigner_set_commitment_seed(this_ptr, encodeArray(val));
6212                 // debug statements here
6213         }
6214         // struct LDKInMemorySigner InMemorySigner_clone(const struct LDKInMemorySigner *NONNULL_PTR orig);
6215         export function InMemorySigner_clone(orig: number): number {
6216                 if(!isWasmInitialized) {
6217                         throw new Error("initializeWasm() must be awaited first!");
6218                 }
6219                 const nativeResponseValue = wasm.InMemorySigner_clone(orig);
6220                 return nativeResponseValue;
6221         }
6222         // 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);
6223         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 {
6224                 if(!isWasmInitialized) {
6225                         throw new Error("initializeWasm() must be awaited first!");
6226                 }
6227                 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));
6228                 return nativeResponseValue;
6229         }
6230         // MUST_USE_RES struct LDKChannelPublicKeys InMemorySigner_counterparty_pubkeys(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
6231         export function InMemorySigner_counterparty_pubkeys(this_arg: number): number {
6232                 if(!isWasmInitialized) {
6233                         throw new Error("initializeWasm() must be awaited first!");
6234                 }
6235                 const nativeResponseValue = wasm.InMemorySigner_counterparty_pubkeys(this_arg);
6236                 return nativeResponseValue;
6237         }
6238         // MUST_USE_RES uint16_t InMemorySigner_counterparty_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
6239         export function InMemorySigner_counterparty_selected_contest_delay(this_arg: number): number {
6240                 if(!isWasmInitialized) {
6241                         throw new Error("initializeWasm() must be awaited first!");
6242                 }
6243                 const nativeResponseValue = wasm.InMemorySigner_counterparty_selected_contest_delay(this_arg);
6244                 return nativeResponseValue;
6245         }
6246         // MUST_USE_RES uint16_t InMemorySigner_holder_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
6247         export function InMemorySigner_holder_selected_contest_delay(this_arg: number): number {
6248                 if(!isWasmInitialized) {
6249                         throw new Error("initializeWasm() must be awaited first!");
6250                 }
6251                 const nativeResponseValue = wasm.InMemorySigner_holder_selected_contest_delay(this_arg);
6252                 return nativeResponseValue;
6253         }
6254         // MUST_USE_RES bool InMemorySigner_is_outbound(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
6255         export function InMemorySigner_is_outbound(this_arg: number): boolean {
6256                 if(!isWasmInitialized) {
6257                         throw new Error("initializeWasm() must be awaited first!");
6258                 }
6259                 const nativeResponseValue = wasm.InMemorySigner_is_outbound(this_arg);
6260                 return nativeResponseValue;
6261         }
6262         // MUST_USE_RES struct LDKOutPoint InMemorySigner_funding_outpoint(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
6263         export function InMemorySigner_funding_outpoint(this_arg: number): number {
6264                 if(!isWasmInitialized) {
6265                         throw new Error("initializeWasm() must be awaited first!");
6266                 }
6267                 const nativeResponseValue = wasm.InMemorySigner_funding_outpoint(this_arg);
6268                 return nativeResponseValue;
6269         }
6270         // MUST_USE_RES struct LDKChannelTransactionParameters InMemorySigner_get_channel_parameters(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
6271         export function InMemorySigner_get_channel_parameters(this_arg: number): number {
6272                 if(!isWasmInitialized) {
6273                         throw new Error("initializeWasm() must be awaited first!");
6274                 }
6275                 const nativeResponseValue = wasm.InMemorySigner_get_channel_parameters(this_arg);
6276                 return nativeResponseValue;
6277         }
6278         // 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);
6279         export function InMemorySigner_sign_counterparty_payment_input(this_arg: number, spend_tx: Uint8Array, input_idx: number, descriptor: number): number {
6280                 if(!isWasmInitialized) {
6281                         throw new Error("initializeWasm() must be awaited first!");
6282                 }
6283                 const nativeResponseValue = wasm.InMemorySigner_sign_counterparty_payment_input(this_arg, encodeArray(spend_tx), input_idx, descriptor);
6284                 return nativeResponseValue;
6285         }
6286         // 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);
6287         export function InMemorySigner_sign_dynamic_p2wsh_input(this_arg: number, spend_tx: Uint8Array, input_idx: number, descriptor: number): number {
6288                 if(!isWasmInitialized) {
6289                         throw new Error("initializeWasm() must be awaited first!");
6290                 }
6291                 const nativeResponseValue = wasm.InMemorySigner_sign_dynamic_p2wsh_input(this_arg, encodeArray(spend_tx), input_idx, descriptor);
6292                 return nativeResponseValue;
6293         }
6294         // struct LDKBaseSign InMemorySigner_as_BaseSign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
6295         export function InMemorySigner_as_BaseSign(this_arg: number): number {
6296                 if(!isWasmInitialized) {
6297                         throw new Error("initializeWasm() must be awaited first!");
6298                 }
6299                 const nativeResponseValue = wasm.InMemorySigner_as_BaseSign(this_arg);
6300                 return nativeResponseValue;
6301         }
6302         // struct LDKSign InMemorySigner_as_Sign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
6303         export function InMemorySigner_as_Sign(this_arg: number): number {
6304                 if(!isWasmInitialized) {
6305                         throw new Error("initializeWasm() must be awaited first!");
6306                 }
6307                 const nativeResponseValue = wasm.InMemorySigner_as_Sign(this_arg);
6308                 return nativeResponseValue;
6309         }
6310         // struct LDKCVec_u8Z InMemorySigner_write(const struct LDKInMemorySigner *NONNULL_PTR obj);
6311         export function InMemorySigner_write(obj: number): Uint8Array {
6312                 if(!isWasmInitialized) {
6313                         throw new Error("initializeWasm() must be awaited first!");
6314                 }
6315                 const nativeResponseValue = wasm.InMemorySigner_write(obj);
6316                 return decodeArray(nativeResponseValue);
6317         }
6318         // struct LDKCResult_InMemorySignerDecodeErrorZ InMemorySigner_read(struct LDKu8slice ser);
6319         export function InMemorySigner_read(ser: Uint8Array): number {
6320                 if(!isWasmInitialized) {
6321                         throw new Error("initializeWasm() must be awaited first!");
6322                 }
6323                 const nativeResponseValue = wasm.InMemorySigner_read(encodeArray(ser));
6324                 return nativeResponseValue;
6325         }
6326         // void KeysManager_free(struct LDKKeysManager this_obj);
6327         export function KeysManager_free(this_obj: number): void {
6328                 if(!isWasmInitialized) {
6329                         throw new Error("initializeWasm() must be awaited first!");
6330                 }
6331                 const nativeResponseValue = wasm.KeysManager_free(this_obj);
6332                 // debug statements here
6333         }
6334         // MUST_USE_RES struct LDKKeysManager KeysManager_new(const uint8_t (*seed)[32], uint64_t starting_time_secs, uint32_t starting_time_nanos);
6335         export function KeysManager_new(seed: Uint8Array, starting_time_secs: number, starting_time_nanos: number): number {
6336                 if(!isWasmInitialized) {
6337                         throw new Error("initializeWasm() must be awaited first!");
6338                 }
6339                 const nativeResponseValue = wasm.KeysManager_new(encodeArray(seed), starting_time_secs, starting_time_nanos);
6340                 return nativeResponseValue;
6341         }
6342         // 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]);
6343         export function KeysManager_derive_channel_keys(this_arg: number, channel_value_satoshis: number, params: Uint8Array): number {
6344                 if(!isWasmInitialized) {
6345                         throw new Error("initializeWasm() must be awaited first!");
6346                 }
6347                 const nativeResponseValue = wasm.KeysManager_derive_channel_keys(this_arg, channel_value_satoshis, encodeArray(params));
6348                 return nativeResponseValue;
6349         }
6350         // 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);
6351         export function KeysManager_spend_spendable_outputs(this_arg: number, descriptors: number[], outputs: number[], change_destination_script: Uint8Array, feerate_sat_per_1000_weight: number): number {
6352                 if(!isWasmInitialized) {
6353                         throw new Error("initializeWasm() must be awaited first!");
6354                 }
6355                 const nativeResponseValue = wasm.KeysManager_spend_spendable_outputs(this_arg, descriptors, outputs, encodeArray(change_destination_script), feerate_sat_per_1000_weight);
6356                 return nativeResponseValue;
6357         }
6358         // struct LDKKeysInterface KeysManager_as_KeysInterface(const struct LDKKeysManager *NONNULL_PTR this_arg);
6359         export function KeysManager_as_KeysInterface(this_arg: number): number {
6360                 if(!isWasmInitialized) {
6361                         throw new Error("initializeWasm() must be awaited first!");
6362                 }
6363                 const nativeResponseValue = wasm.KeysManager_as_KeysInterface(this_arg);
6364                 return nativeResponseValue;
6365         }
6366         // void ChannelManager_free(struct LDKChannelManager this_obj);
6367         export function ChannelManager_free(this_obj: number): void {
6368                 if(!isWasmInitialized) {
6369                         throw new Error("initializeWasm() must be awaited first!");
6370                 }
6371                 const nativeResponseValue = wasm.ChannelManager_free(this_obj);
6372                 // debug statements here
6373         }
6374         // void ChainParameters_free(struct LDKChainParameters this_obj);
6375         export function ChainParameters_free(this_obj: number): void {
6376                 if(!isWasmInitialized) {
6377                         throw new Error("initializeWasm() must be awaited first!");
6378                 }
6379                 const nativeResponseValue = wasm.ChainParameters_free(this_obj);
6380                 // debug statements here
6381         }
6382         // enum LDKNetwork ChainParameters_get_network(const struct LDKChainParameters *NONNULL_PTR this_ptr);
6383         export function ChainParameters_get_network(this_ptr: number): LDKNetwork {
6384                 if(!isWasmInitialized) {
6385                         throw new Error("initializeWasm() must be awaited first!");
6386                 }
6387                 const nativeResponseValue = wasm.ChainParameters_get_network(this_ptr);
6388                 return nativeResponseValue;
6389         }
6390         // void ChainParameters_set_network(struct LDKChainParameters *NONNULL_PTR this_ptr, enum LDKNetwork val);
6391         export function ChainParameters_set_network(this_ptr: number, val: LDKNetwork): void {
6392                 if(!isWasmInitialized) {
6393                         throw new Error("initializeWasm() must be awaited first!");
6394                 }
6395                 const nativeResponseValue = wasm.ChainParameters_set_network(this_ptr, val);
6396                 // debug statements here
6397         }
6398         // struct LDKBestBlock ChainParameters_get_best_block(const struct LDKChainParameters *NONNULL_PTR this_ptr);
6399         export function ChainParameters_get_best_block(this_ptr: number): number {
6400                 if(!isWasmInitialized) {
6401                         throw new Error("initializeWasm() must be awaited first!");
6402                 }
6403                 const nativeResponseValue = wasm.ChainParameters_get_best_block(this_ptr);
6404                 return nativeResponseValue;
6405         }
6406         // void ChainParameters_set_best_block(struct LDKChainParameters *NONNULL_PTR this_ptr, struct LDKBestBlock val);
6407         export function ChainParameters_set_best_block(this_ptr: number, val: number): void {
6408                 if(!isWasmInitialized) {
6409                         throw new Error("initializeWasm() must be awaited first!");
6410                 }
6411                 const nativeResponseValue = wasm.ChainParameters_set_best_block(this_ptr, val);
6412                 // debug statements here
6413         }
6414         // MUST_USE_RES struct LDKChainParameters ChainParameters_new(enum LDKNetwork network_arg, struct LDKBestBlock best_block_arg);
6415         export function ChainParameters_new(network_arg: LDKNetwork, best_block_arg: number): number {
6416                 if(!isWasmInitialized) {
6417                         throw new Error("initializeWasm() must be awaited first!");
6418                 }
6419                 const nativeResponseValue = wasm.ChainParameters_new(network_arg, best_block_arg);
6420                 return nativeResponseValue;
6421         }
6422         // void BestBlock_free(struct LDKBestBlock this_obj);
6423         export function BestBlock_free(this_obj: number): void {
6424                 if(!isWasmInitialized) {
6425                         throw new Error("initializeWasm() must be awaited first!");
6426                 }
6427                 const nativeResponseValue = wasm.BestBlock_free(this_obj);
6428                 // debug statements here
6429         }
6430         // struct LDKBestBlock BestBlock_clone(const struct LDKBestBlock *NONNULL_PTR orig);
6431         export function BestBlock_clone(orig: number): number {
6432                 if(!isWasmInitialized) {
6433                         throw new Error("initializeWasm() must be awaited first!");
6434                 }
6435                 const nativeResponseValue = wasm.BestBlock_clone(orig);
6436                 return nativeResponseValue;
6437         }
6438         // MUST_USE_RES struct LDKBestBlock BestBlock_from_genesis(enum LDKNetwork network);
6439         export function BestBlock_from_genesis(network: LDKNetwork): number {
6440                 if(!isWasmInitialized) {
6441                         throw new Error("initializeWasm() must be awaited first!");
6442                 }
6443                 const nativeResponseValue = wasm.BestBlock_from_genesis(network);
6444                 return nativeResponseValue;
6445         }
6446         // MUST_USE_RES struct LDKBestBlock BestBlock_new(struct LDKThirtyTwoBytes block_hash, uint32_t height);
6447         export function BestBlock_new(block_hash: Uint8Array, height: number): number {
6448                 if(!isWasmInitialized) {
6449                         throw new Error("initializeWasm() must be awaited first!");
6450                 }
6451                 const nativeResponseValue = wasm.BestBlock_new(encodeArray(block_hash), height);
6452                 return nativeResponseValue;
6453         }
6454         // MUST_USE_RES struct LDKThirtyTwoBytes BestBlock_block_hash(const struct LDKBestBlock *NONNULL_PTR this_arg);
6455         export function BestBlock_block_hash(this_arg: number): Uint8Array {
6456                 if(!isWasmInitialized) {
6457                         throw new Error("initializeWasm() must be awaited first!");
6458                 }
6459                 const nativeResponseValue = wasm.BestBlock_block_hash(this_arg);
6460                 return decodeArray(nativeResponseValue);
6461         }
6462         // MUST_USE_RES uint32_t BestBlock_height(const struct LDKBestBlock *NONNULL_PTR this_arg);
6463         export function BestBlock_height(this_arg: number): number {
6464                 if(!isWasmInitialized) {
6465                         throw new Error("initializeWasm() must be awaited first!");
6466                 }
6467                 const nativeResponseValue = wasm.BestBlock_height(this_arg);
6468                 return nativeResponseValue;
6469         }
6470         // void ChannelDetails_free(struct LDKChannelDetails this_obj);
6471         export function ChannelDetails_free(this_obj: number): void {
6472                 if(!isWasmInitialized) {
6473                         throw new Error("initializeWasm() must be awaited first!");
6474                 }
6475                 const nativeResponseValue = wasm.ChannelDetails_free(this_obj);
6476                 // debug statements here
6477         }
6478         // const uint8_t (*ChannelDetails_get_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr))[32];
6479         export function ChannelDetails_get_channel_id(this_ptr: number): Uint8Array {
6480                 if(!isWasmInitialized) {
6481                         throw new Error("initializeWasm() must be awaited first!");
6482                 }
6483                 const nativeResponseValue = wasm.ChannelDetails_get_channel_id(this_ptr);
6484                 return decodeArray(nativeResponseValue);
6485         }
6486         // void ChannelDetails_set_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6487         export function ChannelDetails_set_channel_id(this_ptr: number, val: Uint8Array): void {
6488                 if(!isWasmInitialized) {
6489                         throw new Error("initializeWasm() must be awaited first!");
6490                 }
6491                 const nativeResponseValue = wasm.ChannelDetails_set_channel_id(this_ptr, encodeArray(val));
6492                 // debug statements here
6493         }
6494         // struct LDKCOption_u64Z ChannelDetails_get_short_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6495         export function ChannelDetails_get_short_channel_id(this_ptr: number): number {
6496                 if(!isWasmInitialized) {
6497                         throw new Error("initializeWasm() must be awaited first!");
6498                 }
6499                 const nativeResponseValue = wasm.ChannelDetails_get_short_channel_id(this_ptr);
6500                 return nativeResponseValue;
6501         }
6502         // void ChannelDetails_set_short_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
6503         export function ChannelDetails_set_short_channel_id(this_ptr: number, val: number): void {
6504                 if(!isWasmInitialized) {
6505                         throw new Error("initializeWasm() must be awaited first!");
6506                 }
6507                 const nativeResponseValue = wasm.ChannelDetails_set_short_channel_id(this_ptr, val);
6508                 // debug statements here
6509         }
6510         // struct LDKPublicKey ChannelDetails_get_remote_network_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6511         export function ChannelDetails_get_remote_network_id(this_ptr: number): Uint8Array {
6512                 if(!isWasmInitialized) {
6513                         throw new Error("initializeWasm() must be awaited first!");
6514                 }
6515                 const nativeResponseValue = wasm.ChannelDetails_get_remote_network_id(this_ptr);
6516                 return decodeArray(nativeResponseValue);
6517         }
6518         // void ChannelDetails_set_remote_network_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6519         export function ChannelDetails_set_remote_network_id(this_ptr: number, val: Uint8Array): void {
6520                 if(!isWasmInitialized) {
6521                         throw new Error("initializeWasm() must be awaited first!");
6522                 }
6523                 const nativeResponseValue = wasm.ChannelDetails_set_remote_network_id(this_ptr, encodeArray(val));
6524                 // debug statements here
6525         }
6526         // struct LDKInitFeatures ChannelDetails_get_counterparty_features(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6527         export function ChannelDetails_get_counterparty_features(this_ptr: number): number {
6528                 if(!isWasmInitialized) {
6529                         throw new Error("initializeWasm() must be awaited first!");
6530                 }
6531                 const nativeResponseValue = wasm.ChannelDetails_get_counterparty_features(this_ptr);
6532                 return nativeResponseValue;
6533         }
6534         // void ChannelDetails_set_counterparty_features(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
6535         export function ChannelDetails_set_counterparty_features(this_ptr: number, val: number): void {
6536                 if(!isWasmInitialized) {
6537                         throw new Error("initializeWasm() must be awaited first!");
6538                 }
6539                 const nativeResponseValue = wasm.ChannelDetails_set_counterparty_features(this_ptr, val);
6540                 // debug statements here
6541         }
6542         // uint64_t ChannelDetails_get_channel_value_satoshis(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6543         export function ChannelDetails_get_channel_value_satoshis(this_ptr: number): number {
6544                 if(!isWasmInitialized) {
6545                         throw new Error("initializeWasm() must be awaited first!");
6546                 }
6547                 const nativeResponseValue = wasm.ChannelDetails_get_channel_value_satoshis(this_ptr);
6548                 return nativeResponseValue;
6549         }
6550         // void ChannelDetails_set_channel_value_satoshis(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
6551         export function ChannelDetails_set_channel_value_satoshis(this_ptr: number, val: number): void {
6552                 if(!isWasmInitialized) {
6553                         throw new Error("initializeWasm() must be awaited first!");
6554                 }
6555                 const nativeResponseValue = wasm.ChannelDetails_set_channel_value_satoshis(this_ptr, val);
6556                 // debug statements here
6557         }
6558         // uint64_t ChannelDetails_get_user_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6559         export function ChannelDetails_get_user_id(this_ptr: number): number {
6560                 if(!isWasmInitialized) {
6561                         throw new Error("initializeWasm() must be awaited first!");
6562                 }
6563                 const nativeResponseValue = wasm.ChannelDetails_get_user_id(this_ptr);
6564                 return nativeResponseValue;
6565         }
6566         // void ChannelDetails_set_user_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
6567         export function ChannelDetails_set_user_id(this_ptr: number, val: number): void {
6568                 if(!isWasmInitialized) {
6569                         throw new Error("initializeWasm() must be awaited first!");
6570                 }
6571                 const nativeResponseValue = wasm.ChannelDetails_set_user_id(this_ptr, val);
6572                 // debug statements here
6573         }
6574         // uint64_t ChannelDetails_get_outbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6575         export function ChannelDetails_get_outbound_capacity_msat(this_ptr: number): number {
6576                 if(!isWasmInitialized) {
6577                         throw new Error("initializeWasm() must be awaited first!");
6578                 }
6579                 const nativeResponseValue = wasm.ChannelDetails_get_outbound_capacity_msat(this_ptr);
6580                 return nativeResponseValue;
6581         }
6582         // void ChannelDetails_set_outbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
6583         export function ChannelDetails_set_outbound_capacity_msat(this_ptr: number, val: number): void {
6584                 if(!isWasmInitialized) {
6585                         throw new Error("initializeWasm() must be awaited first!");
6586                 }
6587                 const nativeResponseValue = wasm.ChannelDetails_set_outbound_capacity_msat(this_ptr, val);
6588                 // debug statements here
6589         }
6590         // uint64_t ChannelDetails_get_inbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6591         export function ChannelDetails_get_inbound_capacity_msat(this_ptr: number): number {
6592                 if(!isWasmInitialized) {
6593                         throw new Error("initializeWasm() must be awaited first!");
6594                 }
6595                 const nativeResponseValue = wasm.ChannelDetails_get_inbound_capacity_msat(this_ptr);
6596                 return nativeResponseValue;
6597         }
6598         // void ChannelDetails_set_inbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
6599         export function ChannelDetails_set_inbound_capacity_msat(this_ptr: number, val: number): void {
6600                 if(!isWasmInitialized) {
6601                         throw new Error("initializeWasm() must be awaited first!");
6602                 }
6603                 const nativeResponseValue = wasm.ChannelDetails_set_inbound_capacity_msat(this_ptr, val);
6604                 // debug statements here
6605         }
6606         // bool ChannelDetails_get_is_live(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6607         export function ChannelDetails_get_is_live(this_ptr: number): boolean {
6608                 if(!isWasmInitialized) {
6609                         throw new Error("initializeWasm() must be awaited first!");
6610                 }
6611                 const nativeResponseValue = wasm.ChannelDetails_get_is_live(this_ptr);
6612                 return nativeResponseValue;
6613         }
6614         // void ChannelDetails_set_is_live(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
6615         export function ChannelDetails_set_is_live(this_ptr: number, val: boolean): void {
6616                 if(!isWasmInitialized) {
6617                         throw new Error("initializeWasm() must be awaited first!");
6618                 }
6619                 const nativeResponseValue = wasm.ChannelDetails_set_is_live(this_ptr, val);
6620                 // debug statements here
6621         }
6622         // struct LDKChannelDetails ChannelDetails_clone(const struct LDKChannelDetails *NONNULL_PTR orig);
6623         export function ChannelDetails_clone(orig: number): number {
6624                 if(!isWasmInitialized) {
6625                         throw new Error("initializeWasm() must be awaited first!");
6626                 }
6627                 const nativeResponseValue = wasm.ChannelDetails_clone(orig);
6628                 return nativeResponseValue;
6629         }
6630         // void PaymentSendFailure_free(struct LDKPaymentSendFailure this_ptr);
6631         export function PaymentSendFailure_free(this_ptr: number): void {
6632                 if(!isWasmInitialized) {
6633                         throw new Error("initializeWasm() must be awaited first!");
6634                 }
6635                 const nativeResponseValue = wasm.PaymentSendFailure_free(this_ptr);
6636                 // debug statements here
6637         }
6638         // struct LDKPaymentSendFailure PaymentSendFailure_clone(const struct LDKPaymentSendFailure *NONNULL_PTR orig);
6639         export function PaymentSendFailure_clone(orig: number): number {
6640                 if(!isWasmInitialized) {
6641                         throw new Error("initializeWasm() must be awaited first!");
6642                 }
6643                 const nativeResponseValue = wasm.PaymentSendFailure_clone(orig);
6644                 return nativeResponseValue;
6645         }
6646         // 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);
6647         export function ChannelManager_new(fee_est: number, chain_monitor: number, tx_broadcaster: number, logger: number, keys_manager: number, config: number, params: number): number {
6648                 if(!isWasmInitialized) {
6649                         throw new Error("initializeWasm() must be awaited first!");
6650                 }
6651                 const nativeResponseValue = wasm.ChannelManager_new(fee_est, chain_monitor, tx_broadcaster, logger, keys_manager, config, params);
6652                 return nativeResponseValue;
6653         }
6654         // MUST_USE_RES struct LDKUserConfig ChannelManager_get_current_default_configuration(const struct LDKChannelManager *NONNULL_PTR this_arg);
6655         export function ChannelManager_get_current_default_configuration(this_arg: number): number {
6656                 if(!isWasmInitialized) {
6657                         throw new Error("initializeWasm() must be awaited first!");
6658                 }
6659                 const nativeResponseValue = wasm.ChannelManager_get_current_default_configuration(this_arg);
6660                 return nativeResponseValue;
6661         }
6662         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_create_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey their_network_key, uint64_t channel_value_satoshis, uint64_t push_msat, uint64_t user_id, struct LDKUserConfig override_config);
6663         export function ChannelManager_create_channel(this_arg: number, their_network_key: Uint8Array, channel_value_satoshis: number, push_msat: number, user_id: number, override_config: number): number {
6664                 if(!isWasmInitialized) {
6665                         throw new Error("initializeWasm() must be awaited first!");
6666                 }
6667                 const nativeResponseValue = wasm.ChannelManager_create_channel(this_arg, encodeArray(their_network_key), channel_value_satoshis, push_msat, user_id, override_config);
6668                 return nativeResponseValue;
6669         }
6670         // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
6671         export function ChannelManager_list_channels(this_arg: number): number[] {
6672                 if(!isWasmInitialized) {
6673                         throw new Error("initializeWasm() must be awaited first!");
6674                 }
6675                 const nativeResponseValue = wasm.ChannelManager_list_channels(this_arg);
6676                 return nativeResponseValue;
6677         }
6678         // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_usable_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
6679         export function ChannelManager_list_usable_channels(this_arg: number): number[] {
6680                 if(!isWasmInitialized) {
6681                         throw new Error("initializeWasm() must be awaited first!");
6682                 }
6683                 const nativeResponseValue = wasm.ChannelManager_list_usable_channels(this_arg);
6684                 return nativeResponseValue;
6685         }
6686         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
6687         export function ChannelManager_close_channel(this_arg: number, channel_id: Uint8Array): number {
6688                 if(!isWasmInitialized) {
6689                         throw new Error("initializeWasm() must be awaited first!");
6690                 }
6691                 const nativeResponseValue = wasm.ChannelManager_close_channel(this_arg, encodeArray(channel_id));
6692                 return nativeResponseValue;
6693         }
6694         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
6695         export function ChannelManager_force_close_channel(this_arg: number, channel_id: Uint8Array): number {
6696                 if(!isWasmInitialized) {
6697                         throw new Error("initializeWasm() must be awaited first!");
6698                 }
6699                 const nativeResponseValue = wasm.ChannelManager_force_close_channel(this_arg, encodeArray(channel_id));
6700                 return nativeResponseValue;
6701         }
6702         // void ChannelManager_force_close_all_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
6703         export function ChannelManager_force_close_all_channels(this_arg: number): void {
6704                 if(!isWasmInitialized) {
6705                         throw new Error("initializeWasm() must be awaited first!");
6706                 }
6707                 const nativeResponseValue = wasm.ChannelManager_force_close_all_channels(this_arg);
6708                 // debug statements here
6709         }
6710         // MUST_USE_RES struct LDKCResult_NonePaymentSendFailureZ ChannelManager_send_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKRoute *NONNULL_PTR route, struct LDKThirtyTwoBytes payment_hash, struct LDKThirtyTwoBytes payment_secret);
6711         export function ChannelManager_send_payment(this_arg: number, route: number, payment_hash: Uint8Array, payment_secret: Uint8Array): number {
6712                 if(!isWasmInitialized) {
6713                         throw new Error("initializeWasm() must be awaited first!");
6714                 }
6715                 const nativeResponseValue = wasm.ChannelManager_send_payment(this_arg, route, encodeArray(payment_hash), encodeArray(payment_secret));
6716                 return nativeResponseValue;
6717         }
6718         // 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);
6719         export function ChannelManager_funding_transaction_generated(this_arg: number, temporary_channel_id: Uint8Array, funding_transaction: Uint8Array): number {
6720                 if(!isWasmInitialized) {
6721                         throw new Error("initializeWasm() must be awaited first!");
6722                 }
6723                 const nativeResponseValue = wasm.ChannelManager_funding_transaction_generated(this_arg, encodeArray(temporary_channel_id), encodeArray(funding_transaction));
6724                 return nativeResponseValue;
6725         }
6726         // void ChannelManager_broadcast_node_announcement(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThreeBytes rgb, struct LDKThirtyTwoBytes alias, struct LDKCVec_NetAddressZ addresses);
6727         export function ChannelManager_broadcast_node_announcement(this_arg: number, rgb: Uint8Array, alias: Uint8Array, addresses: number[]): void {
6728                 if(!isWasmInitialized) {
6729                         throw new Error("initializeWasm() must be awaited first!");
6730                 }
6731                 const nativeResponseValue = wasm.ChannelManager_broadcast_node_announcement(this_arg, encodeArray(rgb), encodeArray(alias), addresses);
6732                 // debug statements here
6733         }
6734         // void ChannelManager_process_pending_htlc_forwards(const struct LDKChannelManager *NONNULL_PTR this_arg);
6735         export function ChannelManager_process_pending_htlc_forwards(this_arg: number): void {
6736                 if(!isWasmInitialized) {
6737                         throw new Error("initializeWasm() must be awaited first!");
6738                 }
6739                 const nativeResponseValue = wasm.ChannelManager_process_pending_htlc_forwards(this_arg);
6740                 // debug statements here
6741         }
6742         // void ChannelManager_timer_tick_occurred(const struct LDKChannelManager *NONNULL_PTR this_arg);
6743         export function ChannelManager_timer_tick_occurred(this_arg: number): void {
6744                 if(!isWasmInitialized) {
6745                         throw new Error("initializeWasm() must be awaited first!");
6746                 }
6747                 const nativeResponseValue = wasm.ChannelManager_timer_tick_occurred(this_arg);
6748                 // debug statements here
6749         }
6750         // MUST_USE_RES bool ChannelManager_fail_htlc_backwards(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*payment_hash)[32], struct LDKThirtyTwoBytes payment_secret);
6751         export function ChannelManager_fail_htlc_backwards(this_arg: number, payment_hash: Uint8Array, payment_secret: Uint8Array): boolean {
6752                 if(!isWasmInitialized) {
6753                         throw new Error("initializeWasm() must be awaited first!");
6754                 }
6755                 const nativeResponseValue = wasm.ChannelManager_fail_htlc_backwards(this_arg, encodeArray(payment_hash), encodeArray(payment_secret));
6756                 return nativeResponseValue;
6757         }
6758         // MUST_USE_RES bool ChannelManager_claim_funds(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_preimage, struct LDKThirtyTwoBytes payment_secret, uint64_t expected_amount);
6759         export function ChannelManager_claim_funds(this_arg: number, payment_preimage: Uint8Array, payment_secret: Uint8Array, expected_amount: number): boolean {
6760                 if(!isWasmInitialized) {
6761                         throw new Error("initializeWasm() must be awaited first!");
6762                 }
6763                 const nativeResponseValue = wasm.ChannelManager_claim_funds(this_arg, encodeArray(payment_preimage), encodeArray(payment_secret), expected_amount);
6764                 return nativeResponseValue;
6765         }
6766         // MUST_USE_RES struct LDKPublicKey ChannelManager_get_our_node_id(const struct LDKChannelManager *NONNULL_PTR this_arg);
6767         export function ChannelManager_get_our_node_id(this_arg: number): Uint8Array {
6768                 if(!isWasmInitialized) {
6769                         throw new Error("initializeWasm() must be awaited first!");
6770                 }
6771                 const nativeResponseValue = wasm.ChannelManager_get_our_node_id(this_arg);
6772                 return decodeArray(nativeResponseValue);
6773         }
6774         // void ChannelManager_channel_monitor_updated(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKOutPoint *NONNULL_PTR funding_txo, uint64_t highest_applied_update_id);
6775         export function ChannelManager_channel_monitor_updated(this_arg: number, funding_txo: number, highest_applied_update_id: number): void {
6776                 if(!isWasmInitialized) {
6777                         throw new Error("initializeWasm() must be awaited first!");
6778                 }
6779                 const nativeResponseValue = wasm.ChannelManager_channel_monitor_updated(this_arg, funding_txo, highest_applied_update_id);
6780                 // debug statements here
6781         }
6782         // struct LDKMessageSendEventsProvider ChannelManager_as_MessageSendEventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
6783         export function ChannelManager_as_MessageSendEventsProvider(this_arg: number): number {
6784                 if(!isWasmInitialized) {
6785                         throw new Error("initializeWasm() must be awaited first!");
6786                 }
6787                 const nativeResponseValue = wasm.ChannelManager_as_MessageSendEventsProvider(this_arg);
6788                 return nativeResponseValue;
6789         }
6790         // struct LDKEventsProvider ChannelManager_as_EventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
6791         export function ChannelManager_as_EventsProvider(this_arg: number): number {
6792                 if(!isWasmInitialized) {
6793                         throw new Error("initializeWasm() must be awaited first!");
6794                 }
6795                 const nativeResponseValue = wasm.ChannelManager_as_EventsProvider(this_arg);
6796                 return nativeResponseValue;
6797         }
6798         // struct LDKListen ChannelManager_as_Listen(const struct LDKChannelManager *NONNULL_PTR this_arg);
6799         export function ChannelManager_as_Listen(this_arg: number): number {
6800                 if(!isWasmInitialized) {
6801                         throw new Error("initializeWasm() must be awaited first!");
6802                 }
6803                 const nativeResponseValue = wasm.ChannelManager_as_Listen(this_arg);
6804                 return nativeResponseValue;
6805         }
6806         // void ChannelManager_transactions_confirmed(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height, struct LDKCVec_C2Tuple_usizeTransactionZZ txdata);
6807         export function ChannelManager_transactions_confirmed(this_arg: number, header: Uint8Array, height: number, txdata: number[]): void {
6808                 if(!isWasmInitialized) {
6809                         throw new Error("initializeWasm() must be awaited first!");
6810                 }
6811                 const nativeResponseValue = wasm.ChannelManager_transactions_confirmed(this_arg, encodeArray(header), height, txdata);
6812                 // debug statements here
6813         }
6814         // void ChannelManager_update_best_block(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height);
6815         export function ChannelManager_update_best_block(this_arg: number, header: Uint8Array, height: number): void {
6816                 if(!isWasmInitialized) {
6817                         throw new Error("initializeWasm() must be awaited first!");
6818                 }
6819                 const nativeResponseValue = wasm.ChannelManager_update_best_block(this_arg, encodeArray(header), height);
6820                 // debug statements here
6821         }
6822         // MUST_USE_RES struct LDKCVec_TxidZ ChannelManager_get_relevant_txids(const struct LDKChannelManager *NONNULL_PTR this_arg);
6823         export function ChannelManager_get_relevant_txids(this_arg: number): Uint8Array[] {
6824                 if(!isWasmInitialized) {
6825                         throw new Error("initializeWasm() must be awaited first!");
6826                 }
6827                 const nativeResponseValue = wasm.ChannelManager_get_relevant_txids(this_arg);
6828                 return nativeResponseValue;
6829         }
6830         // void ChannelManager_transaction_unconfirmed(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*txid)[32]);
6831         export function ChannelManager_transaction_unconfirmed(this_arg: number, txid: Uint8Array): void {
6832                 if(!isWasmInitialized) {
6833                         throw new Error("initializeWasm() must be awaited first!");
6834                 }
6835                 const nativeResponseValue = wasm.ChannelManager_transaction_unconfirmed(this_arg, encodeArray(txid));
6836                 // debug statements here
6837         }
6838         // MUST_USE_RES bool ChannelManager_await_persistable_update_timeout(const struct LDKChannelManager *NONNULL_PTR this_arg, uint64_t max_wait);
6839         export function ChannelManager_await_persistable_update_timeout(this_arg: number, max_wait: number): boolean {
6840                 if(!isWasmInitialized) {
6841                         throw new Error("initializeWasm() must be awaited first!");
6842                 }
6843                 const nativeResponseValue = wasm.ChannelManager_await_persistable_update_timeout(this_arg, max_wait);
6844                 return nativeResponseValue;
6845         }
6846         // void ChannelManager_await_persistable_update(const struct LDKChannelManager *NONNULL_PTR this_arg);
6847         export function ChannelManager_await_persistable_update(this_arg: number): void {
6848                 if(!isWasmInitialized) {
6849                         throw new Error("initializeWasm() must be awaited first!");
6850                 }
6851                 const nativeResponseValue = wasm.ChannelManager_await_persistable_update(this_arg);
6852                 // debug statements here
6853         }
6854         // struct LDKChannelMessageHandler ChannelManager_as_ChannelMessageHandler(const struct LDKChannelManager *NONNULL_PTR this_arg);
6855         export function ChannelManager_as_ChannelMessageHandler(this_arg: number): number {
6856                 if(!isWasmInitialized) {
6857                         throw new Error("initializeWasm() must be awaited first!");
6858                 }
6859                 const nativeResponseValue = wasm.ChannelManager_as_ChannelMessageHandler(this_arg);
6860                 return nativeResponseValue;
6861         }
6862         // struct LDKCVec_u8Z ChannelManager_write(const struct LDKChannelManager *NONNULL_PTR obj);
6863         export function ChannelManager_write(obj: number): Uint8Array {
6864                 if(!isWasmInitialized) {
6865                         throw new Error("initializeWasm() must be awaited first!");
6866                 }
6867                 const nativeResponseValue = wasm.ChannelManager_write(obj);
6868                 return decodeArray(nativeResponseValue);
6869         }
6870         // void ChannelManagerReadArgs_free(struct LDKChannelManagerReadArgs this_obj);
6871         export function ChannelManagerReadArgs_free(this_obj: number): void {
6872                 if(!isWasmInitialized) {
6873                         throw new Error("initializeWasm() must be awaited first!");
6874                 }
6875                 const nativeResponseValue = wasm.ChannelManagerReadArgs_free(this_obj);
6876                 // debug statements here
6877         }
6878         // const struct LDKKeysInterface *ChannelManagerReadArgs_get_keys_manager(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6879         export function ChannelManagerReadArgs_get_keys_manager(this_ptr: number): number {
6880                 if(!isWasmInitialized) {
6881                         throw new Error("initializeWasm() must be awaited first!");
6882                 }
6883                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_keys_manager(this_ptr);
6884                 return nativeResponseValue;
6885         }
6886         // void ChannelManagerReadArgs_set_keys_manager(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKKeysInterface val);
6887         export function ChannelManagerReadArgs_set_keys_manager(this_ptr: number, val: number): void {
6888                 if(!isWasmInitialized) {
6889                         throw new Error("initializeWasm() must be awaited first!");
6890                 }
6891                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_keys_manager(this_ptr, val);
6892                 // debug statements here
6893         }
6894         // const struct LDKFeeEstimator *ChannelManagerReadArgs_get_fee_estimator(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6895         export function ChannelManagerReadArgs_get_fee_estimator(this_ptr: number): number {
6896                 if(!isWasmInitialized) {
6897                         throw new Error("initializeWasm() must be awaited first!");
6898                 }
6899                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_fee_estimator(this_ptr);
6900                 return nativeResponseValue;
6901         }
6902         // void ChannelManagerReadArgs_set_fee_estimator(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKFeeEstimator val);
6903         export function ChannelManagerReadArgs_set_fee_estimator(this_ptr: number, val: number): void {
6904                 if(!isWasmInitialized) {
6905                         throw new Error("initializeWasm() must be awaited first!");
6906                 }
6907                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_fee_estimator(this_ptr, val);
6908                 // debug statements here
6909         }
6910         // const struct LDKWatch *ChannelManagerReadArgs_get_chain_monitor(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6911         export function ChannelManagerReadArgs_get_chain_monitor(this_ptr: number): number {
6912                 if(!isWasmInitialized) {
6913                         throw new Error("initializeWasm() must be awaited first!");
6914                 }
6915                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_chain_monitor(this_ptr);
6916                 return nativeResponseValue;
6917         }
6918         // void ChannelManagerReadArgs_set_chain_monitor(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKWatch val);
6919         export function ChannelManagerReadArgs_set_chain_monitor(this_ptr: number, val: number): void {
6920                 if(!isWasmInitialized) {
6921                         throw new Error("initializeWasm() must be awaited first!");
6922                 }
6923                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_chain_monitor(this_ptr, val);
6924                 // debug statements here
6925         }
6926         // const struct LDKBroadcasterInterface *ChannelManagerReadArgs_get_tx_broadcaster(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6927         export function ChannelManagerReadArgs_get_tx_broadcaster(this_ptr: number): number {
6928                 if(!isWasmInitialized) {
6929                         throw new Error("initializeWasm() must be awaited first!");
6930                 }
6931                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_tx_broadcaster(this_ptr);
6932                 return nativeResponseValue;
6933         }
6934         // void ChannelManagerReadArgs_set_tx_broadcaster(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKBroadcasterInterface val);
6935         export function ChannelManagerReadArgs_set_tx_broadcaster(this_ptr: number, val: number): void {
6936                 if(!isWasmInitialized) {
6937                         throw new Error("initializeWasm() must be awaited first!");
6938                 }
6939                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_tx_broadcaster(this_ptr, val);
6940                 // debug statements here
6941         }
6942         // const struct LDKLogger *ChannelManagerReadArgs_get_logger(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6943         export function ChannelManagerReadArgs_get_logger(this_ptr: number): number {
6944                 if(!isWasmInitialized) {
6945                         throw new Error("initializeWasm() must be awaited first!");
6946                 }
6947                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_logger(this_ptr);
6948                 return nativeResponseValue;
6949         }
6950         // void ChannelManagerReadArgs_set_logger(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKLogger val);
6951         export function ChannelManagerReadArgs_set_logger(this_ptr: number, val: number): void {
6952                 if(!isWasmInitialized) {
6953                         throw new Error("initializeWasm() must be awaited first!");
6954                 }
6955                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_logger(this_ptr, val);
6956                 // debug statements here
6957         }
6958         // struct LDKUserConfig ChannelManagerReadArgs_get_default_config(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6959         export function ChannelManagerReadArgs_get_default_config(this_ptr: number): number {
6960                 if(!isWasmInitialized) {
6961                         throw new Error("initializeWasm() must be awaited first!");
6962                 }
6963                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_default_config(this_ptr);
6964                 return nativeResponseValue;
6965         }
6966         // void ChannelManagerReadArgs_set_default_config(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKUserConfig val);
6967         export function ChannelManagerReadArgs_set_default_config(this_ptr: number, val: number): void {
6968                 if(!isWasmInitialized) {
6969                         throw new Error("initializeWasm() must be awaited first!");
6970                 }
6971                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_default_config(this_ptr, val);
6972                 // debug statements here
6973         }
6974         // 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);
6975         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 {
6976                 if(!isWasmInitialized) {
6977                         throw new Error("initializeWasm() must be awaited first!");
6978                 }
6979                 const nativeResponseValue = wasm.ChannelManagerReadArgs_new(keys_manager, fee_estimator, chain_monitor, tx_broadcaster, logger, default_config, channel_monitors);
6980                 return nativeResponseValue;
6981         }
6982         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ C2Tuple_BlockHashChannelManagerZ_read(struct LDKu8slice ser, struct LDKChannelManagerReadArgs arg);
6983         export function C2Tuple_BlockHashChannelManagerZ_read(ser: Uint8Array, arg: number): number {
6984                 if(!isWasmInitialized) {
6985                         throw new Error("initializeWasm() must be awaited first!");
6986                 }
6987                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_read(encodeArray(ser), arg);
6988                 return nativeResponseValue;
6989         }
6990         // void DecodeError_free(struct LDKDecodeError this_obj);
6991         export function DecodeError_free(this_obj: number): void {
6992                 if(!isWasmInitialized) {
6993                         throw new Error("initializeWasm() must be awaited first!");
6994                 }
6995                 const nativeResponseValue = wasm.DecodeError_free(this_obj);
6996                 // debug statements here
6997         }
6998         // struct LDKDecodeError DecodeError_clone(const struct LDKDecodeError *NONNULL_PTR orig);
6999         export function DecodeError_clone(orig: number): number {
7000                 if(!isWasmInitialized) {
7001                         throw new Error("initializeWasm() must be awaited first!");
7002                 }
7003                 const nativeResponseValue = wasm.DecodeError_clone(orig);
7004                 return nativeResponseValue;
7005         }
7006         // void Init_free(struct LDKInit this_obj);
7007         export function Init_free(this_obj: number): void {
7008                 if(!isWasmInitialized) {
7009                         throw new Error("initializeWasm() must be awaited first!");
7010                 }
7011                 const nativeResponseValue = wasm.Init_free(this_obj);
7012                 // debug statements here
7013         }
7014         // struct LDKInitFeatures Init_get_features(const struct LDKInit *NONNULL_PTR this_ptr);
7015         export function Init_get_features(this_ptr: number): number {
7016                 if(!isWasmInitialized) {
7017                         throw new Error("initializeWasm() must be awaited first!");
7018                 }
7019                 const nativeResponseValue = wasm.Init_get_features(this_ptr);
7020                 return nativeResponseValue;
7021         }
7022         // void Init_set_features(struct LDKInit *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
7023         export function Init_set_features(this_ptr: number, val: number): void {
7024                 if(!isWasmInitialized) {
7025                         throw new Error("initializeWasm() must be awaited first!");
7026                 }
7027                 const nativeResponseValue = wasm.Init_set_features(this_ptr, val);
7028                 // debug statements here
7029         }
7030         // MUST_USE_RES struct LDKInit Init_new(struct LDKInitFeatures features_arg);
7031         export function Init_new(features_arg: number): number {
7032                 if(!isWasmInitialized) {
7033                         throw new Error("initializeWasm() must be awaited first!");
7034                 }
7035                 const nativeResponseValue = wasm.Init_new(features_arg);
7036                 return nativeResponseValue;
7037         }
7038         // struct LDKInit Init_clone(const struct LDKInit *NONNULL_PTR orig);
7039         export function Init_clone(orig: number): number {
7040                 if(!isWasmInitialized) {
7041                         throw new Error("initializeWasm() must be awaited first!");
7042                 }
7043                 const nativeResponseValue = wasm.Init_clone(orig);
7044                 return nativeResponseValue;
7045         }
7046         // void ErrorMessage_free(struct LDKErrorMessage this_obj);
7047         export function ErrorMessage_free(this_obj: number): void {
7048                 if(!isWasmInitialized) {
7049                         throw new Error("initializeWasm() must be awaited first!");
7050                 }
7051                 const nativeResponseValue = wasm.ErrorMessage_free(this_obj);
7052                 // debug statements here
7053         }
7054         // const uint8_t (*ErrorMessage_get_channel_id(const struct LDKErrorMessage *NONNULL_PTR this_ptr))[32];
7055         export function ErrorMessage_get_channel_id(this_ptr: number): Uint8Array {
7056                 if(!isWasmInitialized) {
7057                         throw new Error("initializeWasm() must be awaited first!");
7058                 }
7059                 const nativeResponseValue = wasm.ErrorMessage_get_channel_id(this_ptr);
7060                 return decodeArray(nativeResponseValue);
7061         }
7062         // void ErrorMessage_set_channel_id(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7063         export function ErrorMessage_set_channel_id(this_ptr: number, val: Uint8Array): void {
7064                 if(!isWasmInitialized) {
7065                         throw new Error("initializeWasm() must be awaited first!");
7066                 }
7067                 const nativeResponseValue = wasm.ErrorMessage_set_channel_id(this_ptr, encodeArray(val));
7068                 // debug statements here
7069         }
7070         // struct LDKStr ErrorMessage_get_data(const struct LDKErrorMessage *NONNULL_PTR this_ptr);
7071         export function ErrorMessage_get_data(this_ptr: number): String {
7072                 if(!isWasmInitialized) {
7073                         throw new Error("initializeWasm() must be awaited first!");
7074                 }
7075                 const nativeResponseValue = wasm.ErrorMessage_get_data(this_ptr);
7076                 return nativeResponseValue;
7077         }
7078         // void ErrorMessage_set_data(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
7079         export function ErrorMessage_set_data(this_ptr: number, val: Uint8Array): void {
7080                 if(!isWasmInitialized) {
7081                         throw new Error("initializeWasm() must be awaited first!");
7082                 }
7083                 const nativeResponseValue = wasm.ErrorMessage_set_data(this_ptr, encodeArray(val));
7084                 // debug statements here
7085         }
7086         // MUST_USE_RES struct LDKErrorMessage ErrorMessage_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z data_arg);
7087         export function ErrorMessage_new(channel_id_arg: Uint8Array, data_arg: Uint8Array): number {
7088                 if(!isWasmInitialized) {
7089                         throw new Error("initializeWasm() must be awaited first!");
7090                 }
7091                 const nativeResponseValue = wasm.ErrorMessage_new(encodeArray(channel_id_arg), encodeArray(data_arg));
7092                 return nativeResponseValue;
7093         }
7094         // struct LDKErrorMessage ErrorMessage_clone(const struct LDKErrorMessage *NONNULL_PTR orig);
7095         export function ErrorMessage_clone(orig: number): number {
7096                 if(!isWasmInitialized) {
7097                         throw new Error("initializeWasm() must be awaited first!");
7098                 }
7099                 const nativeResponseValue = wasm.ErrorMessage_clone(orig);
7100                 return nativeResponseValue;
7101         }
7102         // void Ping_free(struct LDKPing this_obj);
7103         export function Ping_free(this_obj: number): void {
7104                 if(!isWasmInitialized) {
7105                         throw new Error("initializeWasm() must be awaited first!");
7106                 }
7107                 const nativeResponseValue = wasm.Ping_free(this_obj);
7108                 // debug statements here
7109         }
7110         // uint16_t Ping_get_ponglen(const struct LDKPing *NONNULL_PTR this_ptr);
7111         export function Ping_get_ponglen(this_ptr: number): number {
7112                 if(!isWasmInitialized) {
7113                         throw new Error("initializeWasm() must be awaited first!");
7114                 }
7115                 const nativeResponseValue = wasm.Ping_get_ponglen(this_ptr);
7116                 return nativeResponseValue;
7117         }
7118         // void Ping_set_ponglen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
7119         export function Ping_set_ponglen(this_ptr: number, val: number): void {
7120                 if(!isWasmInitialized) {
7121                         throw new Error("initializeWasm() must be awaited first!");
7122                 }
7123                 const nativeResponseValue = wasm.Ping_set_ponglen(this_ptr, val);
7124                 // debug statements here
7125         }
7126         // uint16_t Ping_get_byteslen(const struct LDKPing *NONNULL_PTR this_ptr);
7127         export function Ping_get_byteslen(this_ptr: number): number {
7128                 if(!isWasmInitialized) {
7129                         throw new Error("initializeWasm() must be awaited first!");
7130                 }
7131                 const nativeResponseValue = wasm.Ping_get_byteslen(this_ptr);
7132                 return nativeResponseValue;
7133         }
7134         // void Ping_set_byteslen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
7135         export function Ping_set_byteslen(this_ptr: number, val: number): void {
7136                 if(!isWasmInitialized) {
7137                         throw new Error("initializeWasm() must be awaited first!");
7138                 }
7139                 const nativeResponseValue = wasm.Ping_set_byteslen(this_ptr, val);
7140                 // debug statements here
7141         }
7142         // MUST_USE_RES struct LDKPing Ping_new(uint16_t ponglen_arg, uint16_t byteslen_arg);
7143         export function Ping_new(ponglen_arg: number, byteslen_arg: number): number {
7144                 if(!isWasmInitialized) {
7145                         throw new Error("initializeWasm() must be awaited first!");
7146                 }
7147                 const nativeResponseValue = wasm.Ping_new(ponglen_arg, byteslen_arg);
7148                 return nativeResponseValue;
7149         }
7150         // struct LDKPing Ping_clone(const struct LDKPing *NONNULL_PTR orig);
7151         export function Ping_clone(orig: number): number {
7152                 if(!isWasmInitialized) {
7153                         throw new Error("initializeWasm() must be awaited first!");
7154                 }
7155                 const nativeResponseValue = wasm.Ping_clone(orig);
7156                 return nativeResponseValue;
7157         }
7158         // void Pong_free(struct LDKPong this_obj);
7159         export function Pong_free(this_obj: number): void {
7160                 if(!isWasmInitialized) {
7161                         throw new Error("initializeWasm() must be awaited first!");
7162                 }
7163                 const nativeResponseValue = wasm.Pong_free(this_obj);
7164                 // debug statements here
7165         }
7166         // uint16_t Pong_get_byteslen(const struct LDKPong *NONNULL_PTR this_ptr);
7167         export function Pong_get_byteslen(this_ptr: number): number {
7168                 if(!isWasmInitialized) {
7169                         throw new Error("initializeWasm() must be awaited first!");
7170                 }
7171                 const nativeResponseValue = wasm.Pong_get_byteslen(this_ptr);
7172                 return nativeResponseValue;
7173         }
7174         // void Pong_set_byteslen(struct LDKPong *NONNULL_PTR this_ptr, uint16_t val);
7175         export function Pong_set_byteslen(this_ptr: number, val: number): void {
7176                 if(!isWasmInitialized) {
7177                         throw new Error("initializeWasm() must be awaited first!");
7178                 }
7179                 const nativeResponseValue = wasm.Pong_set_byteslen(this_ptr, val);
7180                 // debug statements here
7181         }
7182         // MUST_USE_RES struct LDKPong Pong_new(uint16_t byteslen_arg);
7183         export function Pong_new(byteslen_arg: number): number {
7184                 if(!isWasmInitialized) {
7185                         throw new Error("initializeWasm() must be awaited first!");
7186                 }
7187                 const nativeResponseValue = wasm.Pong_new(byteslen_arg);
7188                 return nativeResponseValue;
7189         }
7190         // struct LDKPong Pong_clone(const struct LDKPong *NONNULL_PTR orig);
7191         export function Pong_clone(orig: number): number {
7192                 if(!isWasmInitialized) {
7193                         throw new Error("initializeWasm() must be awaited first!");
7194                 }
7195                 const nativeResponseValue = wasm.Pong_clone(orig);
7196                 return nativeResponseValue;
7197         }
7198         // void OpenChannel_free(struct LDKOpenChannel this_obj);
7199         export function OpenChannel_free(this_obj: number): void {
7200                 if(!isWasmInitialized) {
7201                         throw new Error("initializeWasm() must be awaited first!");
7202                 }
7203                 const nativeResponseValue = wasm.OpenChannel_free(this_obj);
7204                 // debug statements here
7205         }
7206         // const uint8_t (*OpenChannel_get_chain_hash(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
7207         export function OpenChannel_get_chain_hash(this_ptr: number): Uint8Array {
7208                 if(!isWasmInitialized) {
7209                         throw new Error("initializeWasm() must be awaited first!");
7210                 }
7211                 const nativeResponseValue = wasm.OpenChannel_get_chain_hash(this_ptr);
7212                 return decodeArray(nativeResponseValue);
7213         }
7214         // void OpenChannel_set_chain_hash(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7215         export function OpenChannel_set_chain_hash(this_ptr: number, val: Uint8Array): void {
7216                 if(!isWasmInitialized) {
7217                         throw new Error("initializeWasm() must be awaited first!");
7218                 }
7219                 const nativeResponseValue = wasm.OpenChannel_set_chain_hash(this_ptr, encodeArray(val));
7220                 // debug statements here
7221         }
7222         // const uint8_t (*OpenChannel_get_temporary_channel_id(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
7223         export function OpenChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
7224                 if(!isWasmInitialized) {
7225                         throw new Error("initializeWasm() must be awaited first!");
7226                 }
7227                 const nativeResponseValue = wasm.OpenChannel_get_temporary_channel_id(this_ptr);
7228                 return decodeArray(nativeResponseValue);
7229         }
7230         // void OpenChannel_set_temporary_channel_id(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7231         export function OpenChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
7232                 if(!isWasmInitialized) {
7233                         throw new Error("initializeWasm() must be awaited first!");
7234                 }
7235                 const nativeResponseValue = wasm.OpenChannel_set_temporary_channel_id(this_ptr, encodeArray(val));
7236                 // debug statements here
7237         }
7238         // uint64_t OpenChannel_get_funding_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7239         export function OpenChannel_get_funding_satoshis(this_ptr: number): number {
7240                 if(!isWasmInitialized) {
7241                         throw new Error("initializeWasm() must be awaited first!");
7242                 }
7243                 const nativeResponseValue = wasm.OpenChannel_get_funding_satoshis(this_ptr);
7244                 return nativeResponseValue;
7245         }
7246         // void OpenChannel_set_funding_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
7247         export function OpenChannel_set_funding_satoshis(this_ptr: number, val: number): void {
7248                 if(!isWasmInitialized) {
7249                         throw new Error("initializeWasm() must be awaited first!");
7250                 }
7251                 const nativeResponseValue = wasm.OpenChannel_set_funding_satoshis(this_ptr, val);
7252                 // debug statements here
7253         }
7254         // uint64_t OpenChannel_get_push_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7255         export function OpenChannel_get_push_msat(this_ptr: number): number {
7256                 if(!isWasmInitialized) {
7257                         throw new Error("initializeWasm() must be awaited first!");
7258                 }
7259                 const nativeResponseValue = wasm.OpenChannel_get_push_msat(this_ptr);
7260                 return nativeResponseValue;
7261         }
7262         // void OpenChannel_set_push_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
7263         export function OpenChannel_set_push_msat(this_ptr: number, val: number): void {
7264                 if(!isWasmInitialized) {
7265                         throw new Error("initializeWasm() must be awaited first!");
7266                 }
7267                 const nativeResponseValue = wasm.OpenChannel_set_push_msat(this_ptr, val);
7268                 // debug statements here
7269         }
7270         // uint64_t OpenChannel_get_dust_limit_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7271         export function OpenChannel_get_dust_limit_satoshis(this_ptr: number): number {
7272                 if(!isWasmInitialized) {
7273                         throw new Error("initializeWasm() must be awaited first!");
7274                 }
7275                 const nativeResponseValue = wasm.OpenChannel_get_dust_limit_satoshis(this_ptr);
7276                 return nativeResponseValue;
7277         }
7278         // void OpenChannel_set_dust_limit_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
7279         export function OpenChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
7280                 if(!isWasmInitialized) {
7281                         throw new Error("initializeWasm() must be awaited first!");
7282                 }
7283                 const nativeResponseValue = wasm.OpenChannel_set_dust_limit_satoshis(this_ptr, val);
7284                 // debug statements here
7285         }
7286         // uint64_t OpenChannel_get_max_htlc_value_in_flight_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7287         export function OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
7288                 if(!isWasmInitialized) {
7289                         throw new Error("initializeWasm() must be awaited first!");
7290                 }
7291                 const nativeResponseValue = wasm.OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr);
7292                 return nativeResponseValue;
7293         }
7294         // void OpenChannel_set_max_htlc_value_in_flight_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
7295         export function OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
7296                 if(!isWasmInitialized) {
7297                         throw new Error("initializeWasm() must be awaited first!");
7298                 }
7299                 const nativeResponseValue = wasm.OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
7300                 // debug statements here
7301         }
7302         // uint64_t OpenChannel_get_channel_reserve_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7303         export function OpenChannel_get_channel_reserve_satoshis(this_ptr: number): number {
7304                 if(!isWasmInitialized) {
7305                         throw new Error("initializeWasm() must be awaited first!");
7306                 }
7307                 const nativeResponseValue = wasm.OpenChannel_get_channel_reserve_satoshis(this_ptr);
7308                 return nativeResponseValue;
7309         }
7310         // void OpenChannel_set_channel_reserve_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
7311         export function OpenChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
7312                 if(!isWasmInitialized) {
7313                         throw new Error("initializeWasm() must be awaited first!");
7314                 }
7315                 const nativeResponseValue = wasm.OpenChannel_set_channel_reserve_satoshis(this_ptr, val);
7316                 // debug statements here
7317         }
7318         // uint64_t OpenChannel_get_htlc_minimum_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7319         export function OpenChannel_get_htlc_minimum_msat(this_ptr: number): number {
7320                 if(!isWasmInitialized) {
7321                         throw new Error("initializeWasm() must be awaited first!");
7322                 }
7323                 const nativeResponseValue = wasm.OpenChannel_get_htlc_minimum_msat(this_ptr);
7324                 return nativeResponseValue;
7325         }
7326         // void OpenChannel_set_htlc_minimum_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
7327         export function OpenChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
7328                 if(!isWasmInitialized) {
7329                         throw new Error("initializeWasm() must be awaited first!");
7330                 }
7331                 const nativeResponseValue = wasm.OpenChannel_set_htlc_minimum_msat(this_ptr, val);
7332                 // debug statements here
7333         }
7334         // uint32_t OpenChannel_get_feerate_per_kw(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7335         export function OpenChannel_get_feerate_per_kw(this_ptr: number): number {
7336                 if(!isWasmInitialized) {
7337                         throw new Error("initializeWasm() must be awaited first!");
7338                 }
7339                 const nativeResponseValue = wasm.OpenChannel_get_feerate_per_kw(this_ptr);
7340                 return nativeResponseValue;
7341         }
7342         // void OpenChannel_set_feerate_per_kw(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint32_t val);
7343         export function OpenChannel_set_feerate_per_kw(this_ptr: number, val: number): void {
7344                 if(!isWasmInitialized) {
7345                         throw new Error("initializeWasm() must be awaited first!");
7346                 }
7347                 const nativeResponseValue = wasm.OpenChannel_set_feerate_per_kw(this_ptr, val);
7348                 // debug statements here
7349         }
7350         // uint16_t OpenChannel_get_to_self_delay(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7351         export function OpenChannel_get_to_self_delay(this_ptr: number): number {
7352                 if(!isWasmInitialized) {
7353                         throw new Error("initializeWasm() must be awaited first!");
7354                 }
7355                 const nativeResponseValue = wasm.OpenChannel_get_to_self_delay(this_ptr);
7356                 return nativeResponseValue;
7357         }
7358         // void OpenChannel_set_to_self_delay(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
7359         export function OpenChannel_set_to_self_delay(this_ptr: number, val: number): void {
7360                 if(!isWasmInitialized) {
7361                         throw new Error("initializeWasm() must be awaited first!");
7362                 }
7363                 const nativeResponseValue = wasm.OpenChannel_set_to_self_delay(this_ptr, val);
7364                 // debug statements here
7365         }
7366         // uint16_t OpenChannel_get_max_accepted_htlcs(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7367         export function OpenChannel_get_max_accepted_htlcs(this_ptr: number): number {
7368                 if(!isWasmInitialized) {
7369                         throw new Error("initializeWasm() must be awaited first!");
7370                 }
7371                 const nativeResponseValue = wasm.OpenChannel_get_max_accepted_htlcs(this_ptr);
7372                 return nativeResponseValue;
7373         }
7374         // void OpenChannel_set_max_accepted_htlcs(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
7375         export function OpenChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
7376                 if(!isWasmInitialized) {
7377                         throw new Error("initializeWasm() must be awaited first!");
7378                 }
7379                 const nativeResponseValue = wasm.OpenChannel_set_max_accepted_htlcs(this_ptr, val);
7380                 // debug statements here
7381         }
7382         // struct LDKPublicKey OpenChannel_get_funding_pubkey(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7383         export function OpenChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
7384                 if(!isWasmInitialized) {
7385                         throw new Error("initializeWasm() must be awaited first!");
7386                 }
7387                 const nativeResponseValue = wasm.OpenChannel_get_funding_pubkey(this_ptr);
7388                 return decodeArray(nativeResponseValue);
7389         }
7390         // void OpenChannel_set_funding_pubkey(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7391         export function OpenChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
7392                 if(!isWasmInitialized) {
7393                         throw new Error("initializeWasm() must be awaited first!");
7394                 }
7395                 const nativeResponseValue = wasm.OpenChannel_set_funding_pubkey(this_ptr, encodeArray(val));
7396                 // debug statements here
7397         }
7398         // struct LDKPublicKey OpenChannel_get_revocation_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7399         export function OpenChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
7400                 if(!isWasmInitialized) {
7401                         throw new Error("initializeWasm() must be awaited first!");
7402                 }
7403                 const nativeResponseValue = wasm.OpenChannel_get_revocation_basepoint(this_ptr);
7404                 return decodeArray(nativeResponseValue);
7405         }
7406         // void OpenChannel_set_revocation_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7407         export function OpenChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
7408                 if(!isWasmInitialized) {
7409                         throw new Error("initializeWasm() must be awaited first!");
7410                 }
7411                 const nativeResponseValue = wasm.OpenChannel_set_revocation_basepoint(this_ptr, encodeArray(val));
7412                 // debug statements here
7413         }
7414         // struct LDKPublicKey OpenChannel_get_payment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7415         export function OpenChannel_get_payment_point(this_ptr: number): Uint8Array {
7416                 if(!isWasmInitialized) {
7417                         throw new Error("initializeWasm() must be awaited first!");
7418                 }
7419                 const nativeResponseValue = wasm.OpenChannel_get_payment_point(this_ptr);
7420                 return decodeArray(nativeResponseValue);
7421         }
7422         // void OpenChannel_set_payment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7423         export function OpenChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
7424                 if(!isWasmInitialized) {
7425                         throw new Error("initializeWasm() must be awaited first!");
7426                 }
7427                 const nativeResponseValue = wasm.OpenChannel_set_payment_point(this_ptr, encodeArray(val));
7428                 // debug statements here
7429         }
7430         // struct LDKPublicKey OpenChannel_get_delayed_payment_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7431         export function OpenChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
7432                 if(!isWasmInitialized) {
7433                         throw new Error("initializeWasm() must be awaited first!");
7434                 }
7435                 const nativeResponseValue = wasm.OpenChannel_get_delayed_payment_basepoint(this_ptr);
7436                 return decodeArray(nativeResponseValue);
7437         }
7438         // void OpenChannel_set_delayed_payment_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7439         export function OpenChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
7440                 if(!isWasmInitialized) {
7441                         throw new Error("initializeWasm() must be awaited first!");
7442                 }
7443                 const nativeResponseValue = wasm.OpenChannel_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
7444                 // debug statements here
7445         }
7446         // struct LDKPublicKey OpenChannel_get_htlc_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7447         export function OpenChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
7448                 if(!isWasmInitialized) {
7449                         throw new Error("initializeWasm() must be awaited first!");
7450                 }
7451                 const nativeResponseValue = wasm.OpenChannel_get_htlc_basepoint(this_ptr);
7452                 return decodeArray(nativeResponseValue);
7453         }
7454         // void OpenChannel_set_htlc_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7455         export function OpenChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
7456                 if(!isWasmInitialized) {
7457                         throw new Error("initializeWasm() must be awaited first!");
7458                 }
7459                 const nativeResponseValue = wasm.OpenChannel_set_htlc_basepoint(this_ptr, encodeArray(val));
7460                 // debug statements here
7461         }
7462         // struct LDKPublicKey OpenChannel_get_first_per_commitment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7463         export function OpenChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
7464                 if(!isWasmInitialized) {
7465                         throw new Error("initializeWasm() must be awaited first!");
7466                 }
7467                 const nativeResponseValue = wasm.OpenChannel_get_first_per_commitment_point(this_ptr);
7468                 return decodeArray(nativeResponseValue);
7469         }
7470         // void OpenChannel_set_first_per_commitment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7471         export function OpenChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
7472                 if(!isWasmInitialized) {
7473                         throw new Error("initializeWasm() must be awaited first!");
7474                 }
7475                 const nativeResponseValue = wasm.OpenChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
7476                 // debug statements here
7477         }
7478         // uint8_t OpenChannel_get_channel_flags(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7479         export function OpenChannel_get_channel_flags(this_ptr: number): number {
7480                 if(!isWasmInitialized) {
7481                         throw new Error("initializeWasm() must be awaited first!");
7482                 }
7483                 const nativeResponseValue = wasm.OpenChannel_get_channel_flags(this_ptr);
7484                 return nativeResponseValue;
7485         }
7486         // void OpenChannel_set_channel_flags(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint8_t val);
7487         export function OpenChannel_set_channel_flags(this_ptr: number, val: number): void {
7488                 if(!isWasmInitialized) {
7489                         throw new Error("initializeWasm() must be awaited first!");
7490                 }
7491                 const nativeResponseValue = wasm.OpenChannel_set_channel_flags(this_ptr, val);
7492                 // debug statements here
7493         }
7494         // struct LDKOpenChannel OpenChannel_clone(const struct LDKOpenChannel *NONNULL_PTR orig);
7495         export function OpenChannel_clone(orig: number): number {
7496                 if(!isWasmInitialized) {
7497                         throw new Error("initializeWasm() must be awaited first!");
7498                 }
7499                 const nativeResponseValue = wasm.OpenChannel_clone(orig);
7500                 return nativeResponseValue;
7501         }
7502         // void AcceptChannel_free(struct LDKAcceptChannel this_obj);
7503         export function AcceptChannel_free(this_obj: number): void {
7504                 if(!isWasmInitialized) {
7505                         throw new Error("initializeWasm() must be awaited first!");
7506                 }
7507                 const nativeResponseValue = wasm.AcceptChannel_free(this_obj);
7508                 // debug statements here
7509         }
7510         // const uint8_t (*AcceptChannel_get_temporary_channel_id(const struct LDKAcceptChannel *NONNULL_PTR this_ptr))[32];
7511         export function AcceptChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
7512                 if(!isWasmInitialized) {
7513                         throw new Error("initializeWasm() must be awaited first!");
7514                 }
7515                 const nativeResponseValue = wasm.AcceptChannel_get_temporary_channel_id(this_ptr);
7516                 return decodeArray(nativeResponseValue);
7517         }
7518         // void AcceptChannel_set_temporary_channel_id(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7519         export function AcceptChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
7520                 if(!isWasmInitialized) {
7521                         throw new Error("initializeWasm() must be awaited first!");
7522                 }
7523                 const nativeResponseValue = wasm.AcceptChannel_set_temporary_channel_id(this_ptr, encodeArray(val));
7524                 // debug statements here
7525         }
7526         // uint64_t AcceptChannel_get_dust_limit_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7527         export function AcceptChannel_get_dust_limit_satoshis(this_ptr: number): number {
7528                 if(!isWasmInitialized) {
7529                         throw new Error("initializeWasm() must be awaited first!");
7530                 }
7531                 const nativeResponseValue = wasm.AcceptChannel_get_dust_limit_satoshis(this_ptr);
7532                 return nativeResponseValue;
7533         }
7534         // void AcceptChannel_set_dust_limit_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
7535         export function AcceptChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
7536                 if(!isWasmInitialized) {
7537                         throw new Error("initializeWasm() must be awaited first!");
7538                 }
7539                 const nativeResponseValue = wasm.AcceptChannel_set_dust_limit_satoshis(this_ptr, val);
7540                 // debug statements here
7541         }
7542         // uint64_t AcceptChannel_get_max_htlc_value_in_flight_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7543         export function AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
7544                 if(!isWasmInitialized) {
7545                         throw new Error("initializeWasm() must be awaited first!");
7546                 }
7547                 const nativeResponseValue = wasm.AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr);
7548                 return nativeResponseValue;
7549         }
7550         // void AcceptChannel_set_max_htlc_value_in_flight_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
7551         export function AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
7552                 if(!isWasmInitialized) {
7553                         throw new Error("initializeWasm() must be awaited first!");
7554                 }
7555                 const nativeResponseValue = wasm.AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
7556                 // debug statements here
7557         }
7558         // uint64_t AcceptChannel_get_channel_reserve_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7559         export function AcceptChannel_get_channel_reserve_satoshis(this_ptr: number): number {
7560                 if(!isWasmInitialized) {
7561                         throw new Error("initializeWasm() must be awaited first!");
7562                 }
7563                 const nativeResponseValue = wasm.AcceptChannel_get_channel_reserve_satoshis(this_ptr);
7564                 return nativeResponseValue;
7565         }
7566         // void AcceptChannel_set_channel_reserve_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
7567         export function AcceptChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
7568                 if(!isWasmInitialized) {
7569                         throw new Error("initializeWasm() must be awaited first!");
7570                 }
7571                 const nativeResponseValue = wasm.AcceptChannel_set_channel_reserve_satoshis(this_ptr, val);
7572                 // debug statements here
7573         }
7574         // uint64_t AcceptChannel_get_htlc_minimum_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7575         export function AcceptChannel_get_htlc_minimum_msat(this_ptr: number): number {
7576                 if(!isWasmInitialized) {
7577                         throw new Error("initializeWasm() must be awaited first!");
7578                 }
7579                 const nativeResponseValue = wasm.AcceptChannel_get_htlc_minimum_msat(this_ptr);
7580                 return nativeResponseValue;
7581         }
7582         // void AcceptChannel_set_htlc_minimum_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
7583         export function AcceptChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
7584                 if(!isWasmInitialized) {
7585                         throw new Error("initializeWasm() must be awaited first!");
7586                 }
7587                 const nativeResponseValue = wasm.AcceptChannel_set_htlc_minimum_msat(this_ptr, val);
7588                 // debug statements here
7589         }
7590         // uint32_t AcceptChannel_get_minimum_depth(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7591         export function AcceptChannel_get_minimum_depth(this_ptr: number): number {
7592                 if(!isWasmInitialized) {
7593                         throw new Error("initializeWasm() must be awaited first!");
7594                 }
7595                 const nativeResponseValue = wasm.AcceptChannel_get_minimum_depth(this_ptr);
7596                 return nativeResponseValue;
7597         }
7598         // void AcceptChannel_set_minimum_depth(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint32_t val);
7599         export function AcceptChannel_set_minimum_depth(this_ptr: number, val: number): void {
7600                 if(!isWasmInitialized) {
7601                         throw new Error("initializeWasm() must be awaited first!");
7602                 }
7603                 const nativeResponseValue = wasm.AcceptChannel_set_minimum_depth(this_ptr, val);
7604                 // debug statements here
7605         }
7606         // uint16_t AcceptChannel_get_to_self_delay(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7607         export function AcceptChannel_get_to_self_delay(this_ptr: number): number {
7608                 if(!isWasmInitialized) {
7609                         throw new Error("initializeWasm() must be awaited first!");
7610                 }
7611                 const nativeResponseValue = wasm.AcceptChannel_get_to_self_delay(this_ptr);
7612                 return nativeResponseValue;
7613         }
7614         // void AcceptChannel_set_to_self_delay(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
7615         export function AcceptChannel_set_to_self_delay(this_ptr: number, val: number): void {
7616                 if(!isWasmInitialized) {
7617                         throw new Error("initializeWasm() must be awaited first!");
7618                 }
7619                 const nativeResponseValue = wasm.AcceptChannel_set_to_self_delay(this_ptr, val);
7620                 // debug statements here
7621         }
7622         // uint16_t AcceptChannel_get_max_accepted_htlcs(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7623         export function AcceptChannel_get_max_accepted_htlcs(this_ptr: number): number {
7624                 if(!isWasmInitialized) {
7625                         throw new Error("initializeWasm() must be awaited first!");
7626                 }
7627                 const nativeResponseValue = wasm.AcceptChannel_get_max_accepted_htlcs(this_ptr);
7628                 return nativeResponseValue;
7629         }
7630         // void AcceptChannel_set_max_accepted_htlcs(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
7631         export function AcceptChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
7632                 if(!isWasmInitialized) {
7633                         throw new Error("initializeWasm() must be awaited first!");
7634                 }
7635                 const nativeResponseValue = wasm.AcceptChannel_set_max_accepted_htlcs(this_ptr, val);
7636                 // debug statements here
7637         }
7638         // struct LDKPublicKey AcceptChannel_get_funding_pubkey(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7639         export function AcceptChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
7640                 if(!isWasmInitialized) {
7641                         throw new Error("initializeWasm() must be awaited first!");
7642                 }
7643                 const nativeResponseValue = wasm.AcceptChannel_get_funding_pubkey(this_ptr);
7644                 return decodeArray(nativeResponseValue);
7645         }
7646         // void AcceptChannel_set_funding_pubkey(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7647         export function AcceptChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
7648                 if(!isWasmInitialized) {
7649                         throw new Error("initializeWasm() must be awaited first!");
7650                 }
7651                 const nativeResponseValue = wasm.AcceptChannel_set_funding_pubkey(this_ptr, encodeArray(val));
7652                 // debug statements here
7653         }
7654         // struct LDKPublicKey AcceptChannel_get_revocation_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7655         export function AcceptChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
7656                 if(!isWasmInitialized) {
7657                         throw new Error("initializeWasm() must be awaited first!");
7658                 }
7659                 const nativeResponseValue = wasm.AcceptChannel_get_revocation_basepoint(this_ptr);
7660                 return decodeArray(nativeResponseValue);
7661         }
7662         // void AcceptChannel_set_revocation_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7663         export function AcceptChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
7664                 if(!isWasmInitialized) {
7665                         throw new Error("initializeWasm() must be awaited first!");
7666                 }
7667                 const nativeResponseValue = wasm.AcceptChannel_set_revocation_basepoint(this_ptr, encodeArray(val));
7668                 // debug statements here
7669         }
7670         // struct LDKPublicKey AcceptChannel_get_payment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7671         export function AcceptChannel_get_payment_point(this_ptr: number): Uint8Array {
7672                 if(!isWasmInitialized) {
7673                         throw new Error("initializeWasm() must be awaited first!");
7674                 }
7675                 const nativeResponseValue = wasm.AcceptChannel_get_payment_point(this_ptr);
7676                 return decodeArray(nativeResponseValue);
7677         }
7678         // void AcceptChannel_set_payment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7679         export function AcceptChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
7680                 if(!isWasmInitialized) {
7681                         throw new Error("initializeWasm() must be awaited first!");
7682                 }
7683                 const nativeResponseValue = wasm.AcceptChannel_set_payment_point(this_ptr, encodeArray(val));
7684                 // debug statements here
7685         }
7686         // struct LDKPublicKey AcceptChannel_get_delayed_payment_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7687         export function AcceptChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
7688                 if(!isWasmInitialized) {
7689                         throw new Error("initializeWasm() must be awaited first!");
7690                 }
7691                 const nativeResponseValue = wasm.AcceptChannel_get_delayed_payment_basepoint(this_ptr);
7692                 return decodeArray(nativeResponseValue);
7693         }
7694         // void AcceptChannel_set_delayed_payment_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7695         export function AcceptChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
7696                 if(!isWasmInitialized) {
7697                         throw new Error("initializeWasm() must be awaited first!");
7698                 }
7699                 const nativeResponseValue = wasm.AcceptChannel_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
7700                 // debug statements here
7701         }
7702         // struct LDKPublicKey AcceptChannel_get_htlc_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7703         export function AcceptChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
7704                 if(!isWasmInitialized) {
7705                         throw new Error("initializeWasm() must be awaited first!");
7706                 }
7707                 const nativeResponseValue = wasm.AcceptChannel_get_htlc_basepoint(this_ptr);
7708                 return decodeArray(nativeResponseValue);
7709         }
7710         // void AcceptChannel_set_htlc_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7711         export function AcceptChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
7712                 if(!isWasmInitialized) {
7713                         throw new Error("initializeWasm() must be awaited first!");
7714                 }
7715                 const nativeResponseValue = wasm.AcceptChannel_set_htlc_basepoint(this_ptr, encodeArray(val));
7716                 // debug statements here
7717         }
7718         // struct LDKPublicKey AcceptChannel_get_first_per_commitment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7719         export function AcceptChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
7720                 if(!isWasmInitialized) {
7721                         throw new Error("initializeWasm() must be awaited first!");
7722                 }
7723                 const nativeResponseValue = wasm.AcceptChannel_get_first_per_commitment_point(this_ptr);
7724                 return decodeArray(nativeResponseValue);
7725         }
7726         // void AcceptChannel_set_first_per_commitment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7727         export function AcceptChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
7728                 if(!isWasmInitialized) {
7729                         throw new Error("initializeWasm() must be awaited first!");
7730                 }
7731                 const nativeResponseValue = wasm.AcceptChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
7732                 // debug statements here
7733         }
7734         // struct LDKAcceptChannel AcceptChannel_clone(const struct LDKAcceptChannel *NONNULL_PTR orig);
7735         export function AcceptChannel_clone(orig: number): number {
7736                 if(!isWasmInitialized) {
7737                         throw new Error("initializeWasm() must be awaited first!");
7738                 }
7739                 const nativeResponseValue = wasm.AcceptChannel_clone(orig);
7740                 return nativeResponseValue;
7741         }
7742         // void FundingCreated_free(struct LDKFundingCreated this_obj);
7743         export function FundingCreated_free(this_obj: number): void {
7744                 if(!isWasmInitialized) {
7745                         throw new Error("initializeWasm() must be awaited first!");
7746                 }
7747                 const nativeResponseValue = wasm.FundingCreated_free(this_obj);
7748                 // debug statements here
7749         }
7750         // const uint8_t (*FundingCreated_get_temporary_channel_id(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
7751         export function FundingCreated_get_temporary_channel_id(this_ptr: number): Uint8Array {
7752                 if(!isWasmInitialized) {
7753                         throw new Error("initializeWasm() must be awaited first!");
7754                 }
7755                 const nativeResponseValue = wasm.FundingCreated_get_temporary_channel_id(this_ptr);
7756                 return decodeArray(nativeResponseValue);
7757         }
7758         // void FundingCreated_set_temporary_channel_id(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7759         export function FundingCreated_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
7760                 if(!isWasmInitialized) {
7761                         throw new Error("initializeWasm() must be awaited first!");
7762                 }
7763                 const nativeResponseValue = wasm.FundingCreated_set_temporary_channel_id(this_ptr, encodeArray(val));
7764                 // debug statements here
7765         }
7766         // const uint8_t (*FundingCreated_get_funding_txid(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
7767         export function FundingCreated_get_funding_txid(this_ptr: number): Uint8Array {
7768                 if(!isWasmInitialized) {
7769                         throw new Error("initializeWasm() must be awaited first!");
7770                 }
7771                 const nativeResponseValue = wasm.FundingCreated_get_funding_txid(this_ptr);
7772                 return decodeArray(nativeResponseValue);
7773         }
7774         // void FundingCreated_set_funding_txid(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7775         export function FundingCreated_set_funding_txid(this_ptr: number, val: Uint8Array): void {
7776                 if(!isWasmInitialized) {
7777                         throw new Error("initializeWasm() must be awaited first!");
7778                 }
7779                 const nativeResponseValue = wasm.FundingCreated_set_funding_txid(this_ptr, encodeArray(val));
7780                 // debug statements here
7781         }
7782         // uint16_t FundingCreated_get_funding_output_index(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
7783         export function FundingCreated_get_funding_output_index(this_ptr: number): number {
7784                 if(!isWasmInitialized) {
7785                         throw new Error("initializeWasm() must be awaited first!");
7786                 }
7787                 const nativeResponseValue = wasm.FundingCreated_get_funding_output_index(this_ptr);
7788                 return nativeResponseValue;
7789         }
7790         // void FundingCreated_set_funding_output_index(struct LDKFundingCreated *NONNULL_PTR this_ptr, uint16_t val);
7791         export function FundingCreated_set_funding_output_index(this_ptr: number, val: number): void {
7792                 if(!isWasmInitialized) {
7793                         throw new Error("initializeWasm() must be awaited first!");
7794                 }
7795                 const nativeResponseValue = wasm.FundingCreated_set_funding_output_index(this_ptr, val);
7796                 // debug statements here
7797         }
7798         // struct LDKSignature FundingCreated_get_signature(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
7799         export function FundingCreated_get_signature(this_ptr: number): Uint8Array {
7800                 if(!isWasmInitialized) {
7801                         throw new Error("initializeWasm() must be awaited first!");
7802                 }
7803                 const nativeResponseValue = wasm.FundingCreated_get_signature(this_ptr);
7804                 return decodeArray(nativeResponseValue);
7805         }
7806         // void FundingCreated_set_signature(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKSignature val);
7807         export function FundingCreated_set_signature(this_ptr: number, val: Uint8Array): void {
7808                 if(!isWasmInitialized) {
7809                         throw new Error("initializeWasm() must be awaited first!");
7810                 }
7811                 const nativeResponseValue = wasm.FundingCreated_set_signature(this_ptr, encodeArray(val));
7812                 // debug statements here
7813         }
7814         // 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);
7815         export function FundingCreated_new(temporary_channel_id_arg: Uint8Array, funding_txid_arg: Uint8Array, funding_output_index_arg: number, signature_arg: Uint8Array): number {
7816                 if(!isWasmInitialized) {
7817                         throw new Error("initializeWasm() must be awaited first!");
7818                 }
7819                 const nativeResponseValue = wasm.FundingCreated_new(encodeArray(temporary_channel_id_arg), encodeArray(funding_txid_arg), funding_output_index_arg, encodeArray(signature_arg));
7820                 return nativeResponseValue;
7821         }
7822         // struct LDKFundingCreated FundingCreated_clone(const struct LDKFundingCreated *NONNULL_PTR orig);
7823         export function FundingCreated_clone(orig: number): number {
7824                 if(!isWasmInitialized) {
7825                         throw new Error("initializeWasm() must be awaited first!");
7826                 }
7827                 const nativeResponseValue = wasm.FundingCreated_clone(orig);
7828                 return nativeResponseValue;
7829         }
7830         // void FundingSigned_free(struct LDKFundingSigned this_obj);
7831         export function FundingSigned_free(this_obj: number): void {
7832                 if(!isWasmInitialized) {
7833                         throw new Error("initializeWasm() must be awaited first!");
7834                 }
7835                 const nativeResponseValue = wasm.FundingSigned_free(this_obj);
7836                 // debug statements here
7837         }
7838         // const uint8_t (*FundingSigned_get_channel_id(const struct LDKFundingSigned *NONNULL_PTR this_ptr))[32];
7839         export function FundingSigned_get_channel_id(this_ptr: number): Uint8Array {
7840                 if(!isWasmInitialized) {
7841                         throw new Error("initializeWasm() must be awaited first!");
7842                 }
7843                 const nativeResponseValue = wasm.FundingSigned_get_channel_id(this_ptr);
7844                 return decodeArray(nativeResponseValue);
7845         }
7846         // void FundingSigned_set_channel_id(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7847         export function FundingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
7848                 if(!isWasmInitialized) {
7849                         throw new Error("initializeWasm() must be awaited first!");
7850                 }
7851                 const nativeResponseValue = wasm.FundingSigned_set_channel_id(this_ptr, encodeArray(val));
7852                 // debug statements here
7853         }
7854         // struct LDKSignature FundingSigned_get_signature(const struct LDKFundingSigned *NONNULL_PTR this_ptr);
7855         export function FundingSigned_get_signature(this_ptr: number): Uint8Array {
7856                 if(!isWasmInitialized) {
7857                         throw new Error("initializeWasm() must be awaited first!");
7858                 }
7859                 const nativeResponseValue = wasm.FundingSigned_get_signature(this_ptr);
7860                 return decodeArray(nativeResponseValue);
7861         }
7862         // void FundingSigned_set_signature(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
7863         export function FundingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
7864                 if(!isWasmInitialized) {
7865                         throw new Error("initializeWasm() must be awaited first!");
7866                 }
7867                 const nativeResponseValue = wasm.FundingSigned_set_signature(this_ptr, encodeArray(val));
7868                 // debug statements here
7869         }
7870         // MUST_USE_RES struct LDKFundingSigned FundingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg);
7871         export function FundingSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array): number {
7872                 if(!isWasmInitialized) {
7873                         throw new Error("initializeWasm() must be awaited first!");
7874                 }
7875                 const nativeResponseValue = wasm.FundingSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg));
7876                 return nativeResponseValue;
7877         }
7878         // struct LDKFundingSigned FundingSigned_clone(const struct LDKFundingSigned *NONNULL_PTR orig);
7879         export function FundingSigned_clone(orig: number): number {
7880                 if(!isWasmInitialized) {
7881                         throw new Error("initializeWasm() must be awaited first!");
7882                 }
7883                 const nativeResponseValue = wasm.FundingSigned_clone(orig);
7884                 return nativeResponseValue;
7885         }
7886         // void FundingLocked_free(struct LDKFundingLocked this_obj);
7887         export function FundingLocked_free(this_obj: number): void {
7888                 if(!isWasmInitialized) {
7889                         throw new Error("initializeWasm() must be awaited first!");
7890                 }
7891                 const nativeResponseValue = wasm.FundingLocked_free(this_obj);
7892                 // debug statements here
7893         }
7894         // const uint8_t (*FundingLocked_get_channel_id(const struct LDKFundingLocked *NONNULL_PTR this_ptr))[32];
7895         export function FundingLocked_get_channel_id(this_ptr: number): Uint8Array {
7896                 if(!isWasmInitialized) {
7897                         throw new Error("initializeWasm() must be awaited first!");
7898                 }
7899                 const nativeResponseValue = wasm.FundingLocked_get_channel_id(this_ptr);
7900                 return decodeArray(nativeResponseValue);
7901         }
7902         // void FundingLocked_set_channel_id(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7903         export function FundingLocked_set_channel_id(this_ptr: number, val: Uint8Array): void {
7904                 if(!isWasmInitialized) {
7905                         throw new Error("initializeWasm() must be awaited first!");
7906                 }
7907                 const nativeResponseValue = wasm.FundingLocked_set_channel_id(this_ptr, encodeArray(val));
7908                 // debug statements here
7909         }
7910         // struct LDKPublicKey FundingLocked_get_next_per_commitment_point(const struct LDKFundingLocked *NONNULL_PTR this_ptr);
7911         export function FundingLocked_get_next_per_commitment_point(this_ptr: number): Uint8Array {
7912                 if(!isWasmInitialized) {
7913                         throw new Error("initializeWasm() must be awaited first!");
7914                 }
7915                 const nativeResponseValue = wasm.FundingLocked_get_next_per_commitment_point(this_ptr);
7916                 return decodeArray(nativeResponseValue);
7917         }
7918         // void FundingLocked_set_next_per_commitment_point(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7919         export function FundingLocked_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
7920                 if(!isWasmInitialized) {
7921                         throw new Error("initializeWasm() must be awaited first!");
7922                 }
7923                 const nativeResponseValue = wasm.FundingLocked_set_next_per_commitment_point(this_ptr, encodeArray(val));
7924                 // debug statements here
7925         }
7926         // MUST_USE_RES struct LDKFundingLocked FundingLocked_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKPublicKey next_per_commitment_point_arg);
7927         export function FundingLocked_new(channel_id_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
7928                 if(!isWasmInitialized) {
7929                         throw new Error("initializeWasm() must be awaited first!");
7930                 }
7931                 const nativeResponseValue = wasm.FundingLocked_new(encodeArray(channel_id_arg), encodeArray(next_per_commitment_point_arg));
7932                 return nativeResponseValue;
7933         }
7934         // struct LDKFundingLocked FundingLocked_clone(const struct LDKFundingLocked *NONNULL_PTR orig);
7935         export function FundingLocked_clone(orig: number): number {
7936                 if(!isWasmInitialized) {
7937                         throw new Error("initializeWasm() must be awaited first!");
7938                 }
7939                 const nativeResponseValue = wasm.FundingLocked_clone(orig);
7940                 return nativeResponseValue;
7941         }
7942         // void Shutdown_free(struct LDKShutdown this_obj);
7943         export function Shutdown_free(this_obj: number): void {
7944                 if(!isWasmInitialized) {
7945                         throw new Error("initializeWasm() must be awaited first!");
7946                 }
7947                 const nativeResponseValue = wasm.Shutdown_free(this_obj);
7948                 // debug statements here
7949         }
7950         // const uint8_t (*Shutdown_get_channel_id(const struct LDKShutdown *NONNULL_PTR this_ptr))[32];
7951         export function Shutdown_get_channel_id(this_ptr: number): Uint8Array {
7952                 if(!isWasmInitialized) {
7953                         throw new Error("initializeWasm() must be awaited first!");
7954                 }
7955                 const nativeResponseValue = wasm.Shutdown_get_channel_id(this_ptr);
7956                 return decodeArray(nativeResponseValue);
7957         }
7958         // void Shutdown_set_channel_id(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7959         export function Shutdown_set_channel_id(this_ptr: number, val: Uint8Array): void {
7960                 if(!isWasmInitialized) {
7961                         throw new Error("initializeWasm() must be awaited first!");
7962                 }
7963                 const nativeResponseValue = wasm.Shutdown_set_channel_id(this_ptr, encodeArray(val));
7964                 // debug statements here
7965         }
7966         // struct LDKu8slice Shutdown_get_scriptpubkey(const struct LDKShutdown *NONNULL_PTR this_ptr);
7967         export function Shutdown_get_scriptpubkey(this_ptr: number): Uint8Array {
7968                 if(!isWasmInitialized) {
7969                         throw new Error("initializeWasm() must be awaited first!");
7970                 }
7971                 const nativeResponseValue = wasm.Shutdown_get_scriptpubkey(this_ptr);
7972                 return decodeArray(nativeResponseValue);
7973         }
7974         // void Shutdown_set_scriptpubkey(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
7975         export function Shutdown_set_scriptpubkey(this_ptr: number, val: Uint8Array): void {
7976                 if(!isWasmInitialized) {
7977                         throw new Error("initializeWasm() must be awaited first!");
7978                 }
7979                 const nativeResponseValue = wasm.Shutdown_set_scriptpubkey(this_ptr, encodeArray(val));
7980                 // debug statements here
7981         }
7982         // MUST_USE_RES struct LDKShutdown Shutdown_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z scriptpubkey_arg);
7983         export function Shutdown_new(channel_id_arg: Uint8Array, scriptpubkey_arg: Uint8Array): number {
7984                 if(!isWasmInitialized) {
7985                         throw new Error("initializeWasm() must be awaited first!");
7986                 }
7987                 const nativeResponseValue = wasm.Shutdown_new(encodeArray(channel_id_arg), encodeArray(scriptpubkey_arg));
7988                 return nativeResponseValue;
7989         }
7990         // struct LDKShutdown Shutdown_clone(const struct LDKShutdown *NONNULL_PTR orig);
7991         export function Shutdown_clone(orig: number): number {
7992                 if(!isWasmInitialized) {
7993                         throw new Error("initializeWasm() must be awaited first!");
7994                 }
7995                 const nativeResponseValue = wasm.Shutdown_clone(orig);
7996                 return nativeResponseValue;
7997         }
7998         // void ClosingSigned_free(struct LDKClosingSigned this_obj);
7999         export function ClosingSigned_free(this_obj: number): void {
8000                 if(!isWasmInitialized) {
8001                         throw new Error("initializeWasm() must be awaited first!");
8002                 }
8003                 const nativeResponseValue = wasm.ClosingSigned_free(this_obj);
8004                 // debug statements here
8005         }
8006         // const uint8_t (*ClosingSigned_get_channel_id(const struct LDKClosingSigned *NONNULL_PTR this_ptr))[32];
8007         export function ClosingSigned_get_channel_id(this_ptr: number): Uint8Array {
8008                 if(!isWasmInitialized) {
8009                         throw new Error("initializeWasm() must be awaited first!");
8010                 }
8011                 const nativeResponseValue = wasm.ClosingSigned_get_channel_id(this_ptr);
8012                 return decodeArray(nativeResponseValue);
8013         }
8014         // void ClosingSigned_set_channel_id(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8015         export function ClosingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
8016                 if(!isWasmInitialized) {
8017                         throw new Error("initializeWasm() must be awaited first!");
8018                 }
8019                 const nativeResponseValue = wasm.ClosingSigned_set_channel_id(this_ptr, encodeArray(val));
8020                 // debug statements here
8021         }
8022         // uint64_t ClosingSigned_get_fee_satoshis(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
8023         export function ClosingSigned_get_fee_satoshis(this_ptr: number): number {
8024                 if(!isWasmInitialized) {
8025                         throw new Error("initializeWasm() must be awaited first!");
8026                 }
8027                 const nativeResponseValue = wasm.ClosingSigned_get_fee_satoshis(this_ptr);
8028                 return nativeResponseValue;
8029         }
8030         // void ClosingSigned_set_fee_satoshis(struct LDKClosingSigned *NONNULL_PTR this_ptr, uint64_t val);
8031         export function ClosingSigned_set_fee_satoshis(this_ptr: number, val: number): void {
8032                 if(!isWasmInitialized) {
8033                         throw new Error("initializeWasm() must be awaited first!");
8034                 }
8035                 const nativeResponseValue = wasm.ClosingSigned_set_fee_satoshis(this_ptr, val);
8036                 // debug statements here
8037         }
8038         // struct LDKSignature ClosingSigned_get_signature(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
8039         export function ClosingSigned_get_signature(this_ptr: number): Uint8Array {
8040                 if(!isWasmInitialized) {
8041                         throw new Error("initializeWasm() must be awaited first!");
8042                 }
8043                 const nativeResponseValue = wasm.ClosingSigned_get_signature(this_ptr);
8044                 return decodeArray(nativeResponseValue);
8045         }
8046         // void ClosingSigned_set_signature(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
8047         export function ClosingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
8048                 if(!isWasmInitialized) {
8049                         throw new Error("initializeWasm() must be awaited first!");
8050                 }
8051                 const nativeResponseValue = wasm.ClosingSigned_set_signature(this_ptr, encodeArray(val));
8052                 // debug statements here
8053         }
8054         // MUST_USE_RES struct LDKClosingSigned ClosingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t fee_satoshis_arg, struct LDKSignature signature_arg);
8055         export function ClosingSigned_new(channel_id_arg: Uint8Array, fee_satoshis_arg: number, signature_arg: Uint8Array): number {
8056                 if(!isWasmInitialized) {
8057                         throw new Error("initializeWasm() must be awaited first!");
8058                 }
8059                 const nativeResponseValue = wasm.ClosingSigned_new(encodeArray(channel_id_arg), fee_satoshis_arg, encodeArray(signature_arg));
8060                 return nativeResponseValue;
8061         }
8062         // struct LDKClosingSigned ClosingSigned_clone(const struct LDKClosingSigned *NONNULL_PTR orig);
8063         export function ClosingSigned_clone(orig: number): number {
8064                 if(!isWasmInitialized) {
8065                         throw new Error("initializeWasm() must be awaited first!");
8066                 }
8067                 const nativeResponseValue = wasm.ClosingSigned_clone(orig);
8068                 return nativeResponseValue;
8069         }
8070         // void UpdateAddHTLC_free(struct LDKUpdateAddHTLC this_obj);
8071         export function UpdateAddHTLC_free(this_obj: number): void {
8072                 if(!isWasmInitialized) {
8073                         throw new Error("initializeWasm() must be awaited first!");
8074                 }
8075                 const nativeResponseValue = wasm.UpdateAddHTLC_free(this_obj);
8076                 // debug statements here
8077         }
8078         // const uint8_t (*UpdateAddHTLC_get_channel_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
8079         export function UpdateAddHTLC_get_channel_id(this_ptr: number): Uint8Array {
8080                 if(!isWasmInitialized) {
8081                         throw new Error("initializeWasm() must be awaited first!");
8082                 }
8083                 const nativeResponseValue = wasm.UpdateAddHTLC_get_channel_id(this_ptr);
8084                 return decodeArray(nativeResponseValue);
8085         }
8086         // void UpdateAddHTLC_set_channel_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8087         export function UpdateAddHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
8088                 if(!isWasmInitialized) {
8089                         throw new Error("initializeWasm() must be awaited first!");
8090                 }
8091                 const nativeResponseValue = wasm.UpdateAddHTLC_set_channel_id(this_ptr, encodeArray(val));
8092                 // debug statements here
8093         }
8094         // uint64_t UpdateAddHTLC_get_htlc_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
8095         export function UpdateAddHTLC_get_htlc_id(this_ptr: number): number {
8096                 if(!isWasmInitialized) {
8097                         throw new Error("initializeWasm() must be awaited first!");
8098                 }
8099                 const nativeResponseValue = wasm.UpdateAddHTLC_get_htlc_id(this_ptr);
8100                 return nativeResponseValue;
8101         }
8102         // void UpdateAddHTLC_set_htlc_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
8103         export function UpdateAddHTLC_set_htlc_id(this_ptr: number, val: number): void {
8104                 if(!isWasmInitialized) {
8105                         throw new Error("initializeWasm() must be awaited first!");
8106                 }
8107                 const nativeResponseValue = wasm.UpdateAddHTLC_set_htlc_id(this_ptr, val);
8108                 // debug statements here
8109         }
8110         // uint64_t UpdateAddHTLC_get_amount_msat(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
8111         export function UpdateAddHTLC_get_amount_msat(this_ptr: number): number {
8112                 if(!isWasmInitialized) {
8113                         throw new Error("initializeWasm() must be awaited first!");
8114                 }
8115                 const nativeResponseValue = wasm.UpdateAddHTLC_get_amount_msat(this_ptr);
8116                 return nativeResponseValue;
8117         }
8118         // void UpdateAddHTLC_set_amount_msat(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
8119         export function UpdateAddHTLC_set_amount_msat(this_ptr: number, val: number): void {
8120                 if(!isWasmInitialized) {
8121                         throw new Error("initializeWasm() must be awaited first!");
8122                 }
8123                 const nativeResponseValue = wasm.UpdateAddHTLC_set_amount_msat(this_ptr, val);
8124                 // debug statements here
8125         }
8126         // const uint8_t (*UpdateAddHTLC_get_payment_hash(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
8127         export function UpdateAddHTLC_get_payment_hash(this_ptr: number): Uint8Array {
8128                 if(!isWasmInitialized) {
8129                         throw new Error("initializeWasm() must be awaited first!");
8130                 }
8131                 const nativeResponseValue = wasm.UpdateAddHTLC_get_payment_hash(this_ptr);
8132                 return decodeArray(nativeResponseValue);
8133         }
8134         // void UpdateAddHTLC_set_payment_hash(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8135         export function UpdateAddHTLC_set_payment_hash(this_ptr: number, val: Uint8Array): void {
8136                 if(!isWasmInitialized) {
8137                         throw new Error("initializeWasm() must be awaited first!");
8138                 }
8139                 const nativeResponseValue = wasm.UpdateAddHTLC_set_payment_hash(this_ptr, encodeArray(val));
8140                 // debug statements here
8141         }
8142         // uint32_t UpdateAddHTLC_get_cltv_expiry(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
8143         export function UpdateAddHTLC_get_cltv_expiry(this_ptr: number): number {
8144                 if(!isWasmInitialized) {
8145                         throw new Error("initializeWasm() must be awaited first!");
8146                 }
8147                 const nativeResponseValue = wasm.UpdateAddHTLC_get_cltv_expiry(this_ptr);
8148                 return nativeResponseValue;
8149         }
8150         // void UpdateAddHTLC_set_cltv_expiry(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint32_t val);
8151         export function UpdateAddHTLC_set_cltv_expiry(this_ptr: number, val: number): void {
8152                 if(!isWasmInitialized) {
8153                         throw new Error("initializeWasm() must be awaited first!");
8154                 }
8155                 const nativeResponseValue = wasm.UpdateAddHTLC_set_cltv_expiry(this_ptr, val);
8156                 // debug statements here
8157         }
8158         // struct LDKUpdateAddHTLC UpdateAddHTLC_clone(const struct LDKUpdateAddHTLC *NONNULL_PTR orig);
8159         export function UpdateAddHTLC_clone(orig: number): number {
8160                 if(!isWasmInitialized) {
8161                         throw new Error("initializeWasm() must be awaited first!");
8162                 }
8163                 const nativeResponseValue = wasm.UpdateAddHTLC_clone(orig);
8164                 return nativeResponseValue;
8165         }
8166         // void UpdateFulfillHTLC_free(struct LDKUpdateFulfillHTLC this_obj);
8167         export function UpdateFulfillHTLC_free(this_obj: number): void {
8168                 if(!isWasmInitialized) {
8169                         throw new Error("initializeWasm() must be awaited first!");
8170                 }
8171                 const nativeResponseValue = wasm.UpdateFulfillHTLC_free(this_obj);
8172                 // debug statements here
8173         }
8174         // const uint8_t (*UpdateFulfillHTLC_get_channel_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
8175         export function UpdateFulfillHTLC_get_channel_id(this_ptr: number): Uint8Array {
8176                 if(!isWasmInitialized) {
8177                         throw new Error("initializeWasm() must be awaited first!");
8178                 }
8179                 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_channel_id(this_ptr);
8180                 return decodeArray(nativeResponseValue);
8181         }
8182         // void UpdateFulfillHTLC_set_channel_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8183         export function UpdateFulfillHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
8184                 if(!isWasmInitialized) {
8185                         throw new Error("initializeWasm() must be awaited first!");
8186                 }
8187                 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_channel_id(this_ptr, encodeArray(val));
8188                 // debug statements here
8189         }
8190         // uint64_t UpdateFulfillHTLC_get_htlc_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr);
8191         export function UpdateFulfillHTLC_get_htlc_id(this_ptr: number): number {
8192                 if(!isWasmInitialized) {
8193                         throw new Error("initializeWasm() must be awaited first!");
8194                 }
8195                 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_htlc_id(this_ptr);
8196                 return nativeResponseValue;
8197         }
8198         // void UpdateFulfillHTLC_set_htlc_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, uint64_t val);
8199         export function UpdateFulfillHTLC_set_htlc_id(this_ptr: number, val: number): void {
8200                 if(!isWasmInitialized) {
8201                         throw new Error("initializeWasm() must be awaited first!");
8202                 }
8203                 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_htlc_id(this_ptr, val);
8204                 // debug statements here
8205         }
8206         // const uint8_t (*UpdateFulfillHTLC_get_payment_preimage(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
8207         export function UpdateFulfillHTLC_get_payment_preimage(this_ptr: number): Uint8Array {
8208                 if(!isWasmInitialized) {
8209                         throw new Error("initializeWasm() must be awaited first!");
8210                 }
8211                 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_payment_preimage(this_ptr);
8212                 return decodeArray(nativeResponseValue);
8213         }
8214         // void UpdateFulfillHTLC_set_payment_preimage(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8215         export function UpdateFulfillHTLC_set_payment_preimage(this_ptr: number, val: Uint8Array): void {
8216                 if(!isWasmInitialized) {
8217                         throw new Error("initializeWasm() must be awaited first!");
8218                 }
8219                 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_payment_preimage(this_ptr, encodeArray(val));
8220                 // debug statements here
8221         }
8222         // MUST_USE_RES struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t htlc_id_arg, struct LDKThirtyTwoBytes payment_preimage_arg);
8223         export function UpdateFulfillHTLC_new(channel_id_arg: Uint8Array, htlc_id_arg: number, payment_preimage_arg: Uint8Array): number {
8224                 if(!isWasmInitialized) {
8225                         throw new Error("initializeWasm() must be awaited first!");
8226                 }
8227                 const nativeResponseValue = wasm.UpdateFulfillHTLC_new(encodeArray(channel_id_arg), htlc_id_arg, encodeArray(payment_preimage_arg));
8228                 return nativeResponseValue;
8229         }
8230         // struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_clone(const struct LDKUpdateFulfillHTLC *NONNULL_PTR orig);
8231         export function UpdateFulfillHTLC_clone(orig: number): number {
8232                 if(!isWasmInitialized) {
8233                         throw new Error("initializeWasm() must be awaited first!");
8234                 }
8235                 const nativeResponseValue = wasm.UpdateFulfillHTLC_clone(orig);
8236                 return nativeResponseValue;
8237         }
8238         // void UpdateFailHTLC_free(struct LDKUpdateFailHTLC this_obj);
8239         export function UpdateFailHTLC_free(this_obj: number): void {
8240                 if(!isWasmInitialized) {
8241                         throw new Error("initializeWasm() must be awaited first!");
8242                 }
8243                 const nativeResponseValue = wasm.UpdateFailHTLC_free(this_obj);
8244                 // debug statements here
8245         }
8246         // const uint8_t (*UpdateFailHTLC_get_channel_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr))[32];
8247         export function UpdateFailHTLC_get_channel_id(this_ptr: number): Uint8Array {
8248                 if(!isWasmInitialized) {
8249                         throw new Error("initializeWasm() must be awaited first!");
8250                 }
8251                 const nativeResponseValue = wasm.UpdateFailHTLC_get_channel_id(this_ptr);
8252                 return decodeArray(nativeResponseValue);
8253         }
8254         // void UpdateFailHTLC_set_channel_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8255         export function UpdateFailHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
8256                 if(!isWasmInitialized) {
8257                         throw new Error("initializeWasm() must be awaited first!");
8258                 }
8259                 const nativeResponseValue = wasm.UpdateFailHTLC_set_channel_id(this_ptr, encodeArray(val));
8260                 // debug statements here
8261         }
8262         // uint64_t UpdateFailHTLC_get_htlc_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr);
8263         export function UpdateFailHTLC_get_htlc_id(this_ptr: number): number {
8264                 if(!isWasmInitialized) {
8265                         throw new Error("initializeWasm() must be awaited first!");
8266                 }
8267                 const nativeResponseValue = wasm.UpdateFailHTLC_get_htlc_id(this_ptr);
8268                 return nativeResponseValue;
8269         }
8270         // void UpdateFailHTLC_set_htlc_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, uint64_t val);
8271         export function UpdateFailHTLC_set_htlc_id(this_ptr: number, val: number): void {
8272                 if(!isWasmInitialized) {
8273                         throw new Error("initializeWasm() must be awaited first!");
8274                 }
8275                 const nativeResponseValue = wasm.UpdateFailHTLC_set_htlc_id(this_ptr, val);
8276                 // debug statements here
8277         }
8278         // struct LDKUpdateFailHTLC UpdateFailHTLC_clone(const struct LDKUpdateFailHTLC *NONNULL_PTR orig);
8279         export function UpdateFailHTLC_clone(orig: number): number {
8280                 if(!isWasmInitialized) {
8281                         throw new Error("initializeWasm() must be awaited first!");
8282                 }
8283                 const nativeResponseValue = wasm.UpdateFailHTLC_clone(orig);
8284                 return nativeResponseValue;
8285         }
8286         // void UpdateFailMalformedHTLC_free(struct LDKUpdateFailMalformedHTLC this_obj);
8287         export function UpdateFailMalformedHTLC_free(this_obj: number): void {
8288                 if(!isWasmInitialized) {
8289                         throw new Error("initializeWasm() must be awaited first!");
8290                 }
8291                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_free(this_obj);
8292                 // debug statements here
8293         }
8294         // const uint8_t (*UpdateFailMalformedHTLC_get_channel_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr))[32];
8295         export function UpdateFailMalformedHTLC_get_channel_id(this_ptr: number): Uint8Array {
8296                 if(!isWasmInitialized) {
8297                         throw new Error("initializeWasm() must be awaited first!");
8298                 }
8299                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_channel_id(this_ptr);
8300                 return decodeArray(nativeResponseValue);
8301         }
8302         // void UpdateFailMalformedHTLC_set_channel_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8303         export function UpdateFailMalformedHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
8304                 if(!isWasmInitialized) {
8305                         throw new Error("initializeWasm() must be awaited first!");
8306                 }
8307                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_channel_id(this_ptr, encodeArray(val));
8308                 // debug statements here
8309         }
8310         // uint64_t UpdateFailMalformedHTLC_get_htlc_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
8311         export function UpdateFailMalformedHTLC_get_htlc_id(this_ptr: number): number {
8312                 if(!isWasmInitialized) {
8313                         throw new Error("initializeWasm() must be awaited first!");
8314                 }
8315                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_htlc_id(this_ptr);
8316                 return nativeResponseValue;
8317         }
8318         // void UpdateFailMalformedHTLC_set_htlc_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint64_t val);
8319         export function UpdateFailMalformedHTLC_set_htlc_id(this_ptr: number, val: number): void {
8320                 if(!isWasmInitialized) {
8321                         throw new Error("initializeWasm() must be awaited first!");
8322                 }
8323                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_htlc_id(this_ptr, val);
8324                 // debug statements here
8325         }
8326         // uint16_t UpdateFailMalformedHTLC_get_failure_code(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
8327         export function UpdateFailMalformedHTLC_get_failure_code(this_ptr: number): number {
8328                 if(!isWasmInitialized) {
8329                         throw new Error("initializeWasm() must be awaited first!");
8330                 }
8331                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_failure_code(this_ptr);
8332                 return nativeResponseValue;
8333         }
8334         // void UpdateFailMalformedHTLC_set_failure_code(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint16_t val);
8335         export function UpdateFailMalformedHTLC_set_failure_code(this_ptr: number, val: number): void {
8336                 if(!isWasmInitialized) {
8337                         throw new Error("initializeWasm() must be awaited first!");
8338                 }
8339                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_failure_code(this_ptr, val);
8340                 // debug statements here
8341         }
8342         // struct LDKUpdateFailMalformedHTLC UpdateFailMalformedHTLC_clone(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR orig);
8343         export function UpdateFailMalformedHTLC_clone(orig: number): number {
8344                 if(!isWasmInitialized) {
8345                         throw new Error("initializeWasm() must be awaited first!");
8346                 }
8347                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_clone(orig);
8348                 return nativeResponseValue;
8349         }
8350         // void CommitmentSigned_free(struct LDKCommitmentSigned this_obj);
8351         export function CommitmentSigned_free(this_obj: number): void {
8352                 if(!isWasmInitialized) {
8353                         throw new Error("initializeWasm() must be awaited first!");
8354                 }
8355                 const nativeResponseValue = wasm.CommitmentSigned_free(this_obj);
8356                 // debug statements here
8357         }
8358         // const uint8_t (*CommitmentSigned_get_channel_id(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr))[32];
8359         export function CommitmentSigned_get_channel_id(this_ptr: number): Uint8Array {
8360                 if(!isWasmInitialized) {
8361                         throw new Error("initializeWasm() must be awaited first!");
8362                 }
8363                 const nativeResponseValue = wasm.CommitmentSigned_get_channel_id(this_ptr);
8364                 return decodeArray(nativeResponseValue);
8365         }
8366         // void CommitmentSigned_set_channel_id(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8367         export function CommitmentSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
8368                 if(!isWasmInitialized) {
8369                         throw new Error("initializeWasm() must be awaited first!");
8370                 }
8371                 const nativeResponseValue = wasm.CommitmentSigned_set_channel_id(this_ptr, encodeArray(val));
8372                 // debug statements here
8373         }
8374         // struct LDKSignature CommitmentSigned_get_signature(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr);
8375         export function CommitmentSigned_get_signature(this_ptr: number): Uint8Array {
8376                 if(!isWasmInitialized) {
8377                         throw new Error("initializeWasm() must be awaited first!");
8378                 }
8379                 const nativeResponseValue = wasm.CommitmentSigned_get_signature(this_ptr);
8380                 return decodeArray(nativeResponseValue);
8381         }
8382         // void CommitmentSigned_set_signature(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
8383         export function CommitmentSigned_set_signature(this_ptr: number, val: Uint8Array): void {
8384                 if(!isWasmInitialized) {
8385                         throw new Error("initializeWasm() must be awaited first!");
8386                 }
8387                 const nativeResponseValue = wasm.CommitmentSigned_set_signature(this_ptr, encodeArray(val));
8388                 // debug statements here
8389         }
8390         // void CommitmentSigned_set_htlc_signatures(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
8391         export function CommitmentSigned_set_htlc_signatures(this_ptr: number, val: Uint8Array[]): void {
8392                 if(!isWasmInitialized) {
8393                         throw new Error("initializeWasm() must be awaited first!");
8394                 }
8395                 const nativeResponseValue = wasm.CommitmentSigned_set_htlc_signatures(this_ptr, val);
8396                 // debug statements here
8397         }
8398         // MUST_USE_RES struct LDKCommitmentSigned CommitmentSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg, struct LDKCVec_SignatureZ htlc_signatures_arg);
8399         export function CommitmentSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array, htlc_signatures_arg: Uint8Array[]): number {
8400                 if(!isWasmInitialized) {
8401                         throw new Error("initializeWasm() must be awaited first!");
8402                 }
8403                 const nativeResponseValue = wasm.CommitmentSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg), htlc_signatures_arg);
8404                 return nativeResponseValue;
8405         }
8406         // struct LDKCommitmentSigned CommitmentSigned_clone(const struct LDKCommitmentSigned *NONNULL_PTR orig);
8407         export function CommitmentSigned_clone(orig: number): number {
8408                 if(!isWasmInitialized) {
8409                         throw new Error("initializeWasm() must be awaited first!");
8410                 }
8411                 const nativeResponseValue = wasm.CommitmentSigned_clone(orig);
8412                 return nativeResponseValue;
8413         }
8414         // void RevokeAndACK_free(struct LDKRevokeAndACK this_obj);
8415         export function RevokeAndACK_free(this_obj: number): void {
8416                 if(!isWasmInitialized) {
8417                         throw new Error("initializeWasm() must be awaited first!");
8418                 }
8419                 const nativeResponseValue = wasm.RevokeAndACK_free(this_obj);
8420                 // debug statements here
8421         }
8422         // const uint8_t (*RevokeAndACK_get_channel_id(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
8423         export function RevokeAndACK_get_channel_id(this_ptr: number): Uint8Array {
8424                 if(!isWasmInitialized) {
8425                         throw new Error("initializeWasm() must be awaited first!");
8426                 }
8427                 const nativeResponseValue = wasm.RevokeAndACK_get_channel_id(this_ptr);
8428                 return decodeArray(nativeResponseValue);
8429         }
8430         // void RevokeAndACK_set_channel_id(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8431         export function RevokeAndACK_set_channel_id(this_ptr: number, val: Uint8Array): void {
8432                 if(!isWasmInitialized) {
8433                         throw new Error("initializeWasm() must be awaited first!");
8434                 }
8435                 const nativeResponseValue = wasm.RevokeAndACK_set_channel_id(this_ptr, encodeArray(val));
8436                 // debug statements here
8437         }
8438         // const uint8_t (*RevokeAndACK_get_per_commitment_secret(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
8439         export function RevokeAndACK_get_per_commitment_secret(this_ptr: number): Uint8Array {
8440                 if(!isWasmInitialized) {
8441                         throw new Error("initializeWasm() must be awaited first!");
8442                 }
8443                 const nativeResponseValue = wasm.RevokeAndACK_get_per_commitment_secret(this_ptr);
8444                 return decodeArray(nativeResponseValue);
8445         }
8446         // void RevokeAndACK_set_per_commitment_secret(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8447         export function RevokeAndACK_set_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
8448                 if(!isWasmInitialized) {
8449                         throw new Error("initializeWasm() must be awaited first!");
8450                 }
8451                 const nativeResponseValue = wasm.RevokeAndACK_set_per_commitment_secret(this_ptr, encodeArray(val));
8452                 // debug statements here
8453         }
8454         // struct LDKPublicKey RevokeAndACK_get_next_per_commitment_point(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr);
8455         export function RevokeAndACK_get_next_per_commitment_point(this_ptr: number): Uint8Array {
8456                 if(!isWasmInitialized) {
8457                         throw new Error("initializeWasm() must be awaited first!");
8458                 }
8459                 const nativeResponseValue = wasm.RevokeAndACK_get_next_per_commitment_point(this_ptr);
8460                 return decodeArray(nativeResponseValue);
8461         }
8462         // void RevokeAndACK_set_next_per_commitment_point(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8463         export function RevokeAndACK_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
8464                 if(!isWasmInitialized) {
8465                         throw new Error("initializeWasm() must be awaited first!");
8466                 }
8467                 const nativeResponseValue = wasm.RevokeAndACK_set_next_per_commitment_point(this_ptr, encodeArray(val));
8468                 // debug statements here
8469         }
8470         // 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);
8471         export function RevokeAndACK_new(channel_id_arg: Uint8Array, per_commitment_secret_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
8472                 if(!isWasmInitialized) {
8473                         throw new Error("initializeWasm() must be awaited first!");
8474                 }
8475                 const nativeResponseValue = wasm.RevokeAndACK_new(encodeArray(channel_id_arg), encodeArray(per_commitment_secret_arg), encodeArray(next_per_commitment_point_arg));
8476                 return nativeResponseValue;
8477         }
8478         // struct LDKRevokeAndACK RevokeAndACK_clone(const struct LDKRevokeAndACK *NONNULL_PTR orig);
8479         export function RevokeAndACK_clone(orig: number): number {
8480                 if(!isWasmInitialized) {
8481                         throw new Error("initializeWasm() must be awaited first!");
8482                 }
8483                 const nativeResponseValue = wasm.RevokeAndACK_clone(orig);
8484                 return nativeResponseValue;
8485         }
8486         // void UpdateFee_free(struct LDKUpdateFee this_obj);
8487         export function UpdateFee_free(this_obj: number): void {
8488                 if(!isWasmInitialized) {
8489                         throw new Error("initializeWasm() must be awaited first!");
8490                 }
8491                 const nativeResponseValue = wasm.UpdateFee_free(this_obj);
8492                 // debug statements here
8493         }
8494         // const uint8_t (*UpdateFee_get_channel_id(const struct LDKUpdateFee *NONNULL_PTR this_ptr))[32];
8495         export function UpdateFee_get_channel_id(this_ptr: number): Uint8Array {
8496                 if(!isWasmInitialized) {
8497                         throw new Error("initializeWasm() must be awaited first!");
8498                 }
8499                 const nativeResponseValue = wasm.UpdateFee_get_channel_id(this_ptr);
8500                 return decodeArray(nativeResponseValue);
8501         }
8502         // void UpdateFee_set_channel_id(struct LDKUpdateFee *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8503         export function UpdateFee_set_channel_id(this_ptr: number, val: Uint8Array): void {
8504                 if(!isWasmInitialized) {
8505                         throw new Error("initializeWasm() must be awaited first!");
8506                 }
8507                 const nativeResponseValue = wasm.UpdateFee_set_channel_id(this_ptr, encodeArray(val));
8508                 // debug statements here
8509         }
8510         // uint32_t UpdateFee_get_feerate_per_kw(const struct LDKUpdateFee *NONNULL_PTR this_ptr);
8511         export function UpdateFee_get_feerate_per_kw(this_ptr: number): number {
8512                 if(!isWasmInitialized) {
8513                         throw new Error("initializeWasm() must be awaited first!");
8514                 }
8515                 const nativeResponseValue = wasm.UpdateFee_get_feerate_per_kw(this_ptr);
8516                 return nativeResponseValue;
8517         }
8518         // void UpdateFee_set_feerate_per_kw(struct LDKUpdateFee *NONNULL_PTR this_ptr, uint32_t val);
8519         export function UpdateFee_set_feerate_per_kw(this_ptr: number, val: number): void {
8520                 if(!isWasmInitialized) {
8521                         throw new Error("initializeWasm() must be awaited first!");
8522                 }
8523                 const nativeResponseValue = wasm.UpdateFee_set_feerate_per_kw(this_ptr, val);
8524                 // debug statements here
8525         }
8526         // MUST_USE_RES struct LDKUpdateFee UpdateFee_new(struct LDKThirtyTwoBytes channel_id_arg, uint32_t feerate_per_kw_arg);
8527         export function UpdateFee_new(channel_id_arg: Uint8Array, feerate_per_kw_arg: number): number {
8528                 if(!isWasmInitialized) {
8529                         throw new Error("initializeWasm() must be awaited first!");
8530                 }
8531                 const nativeResponseValue = wasm.UpdateFee_new(encodeArray(channel_id_arg), feerate_per_kw_arg);
8532                 return nativeResponseValue;
8533         }
8534         // struct LDKUpdateFee UpdateFee_clone(const struct LDKUpdateFee *NONNULL_PTR orig);
8535         export function UpdateFee_clone(orig: number): number {
8536                 if(!isWasmInitialized) {
8537                         throw new Error("initializeWasm() must be awaited first!");
8538                 }
8539                 const nativeResponseValue = wasm.UpdateFee_clone(orig);
8540                 return nativeResponseValue;
8541         }
8542         // void DataLossProtect_free(struct LDKDataLossProtect this_obj);
8543         export function DataLossProtect_free(this_obj: number): void {
8544                 if(!isWasmInitialized) {
8545                         throw new Error("initializeWasm() must be awaited first!");
8546                 }
8547                 const nativeResponseValue = wasm.DataLossProtect_free(this_obj);
8548                 // debug statements here
8549         }
8550         // const uint8_t (*DataLossProtect_get_your_last_per_commitment_secret(const struct LDKDataLossProtect *NONNULL_PTR this_ptr))[32];
8551         export function DataLossProtect_get_your_last_per_commitment_secret(this_ptr: number): Uint8Array {
8552                 if(!isWasmInitialized) {
8553                         throw new Error("initializeWasm() must be awaited first!");
8554                 }
8555                 const nativeResponseValue = wasm.DataLossProtect_get_your_last_per_commitment_secret(this_ptr);
8556                 return decodeArray(nativeResponseValue);
8557         }
8558         // void DataLossProtect_set_your_last_per_commitment_secret(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8559         export function DataLossProtect_set_your_last_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
8560                 if(!isWasmInitialized) {
8561                         throw new Error("initializeWasm() must be awaited first!");
8562                 }
8563                 const nativeResponseValue = wasm.DataLossProtect_set_your_last_per_commitment_secret(this_ptr, encodeArray(val));
8564                 // debug statements here
8565         }
8566         // struct LDKPublicKey DataLossProtect_get_my_current_per_commitment_point(const struct LDKDataLossProtect *NONNULL_PTR this_ptr);
8567         export function DataLossProtect_get_my_current_per_commitment_point(this_ptr: number): Uint8Array {
8568                 if(!isWasmInitialized) {
8569                         throw new Error("initializeWasm() must be awaited first!");
8570                 }
8571                 const nativeResponseValue = wasm.DataLossProtect_get_my_current_per_commitment_point(this_ptr);
8572                 return decodeArray(nativeResponseValue);
8573         }
8574         // void DataLossProtect_set_my_current_per_commitment_point(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8575         export function DataLossProtect_set_my_current_per_commitment_point(this_ptr: number, val: Uint8Array): void {
8576                 if(!isWasmInitialized) {
8577                         throw new Error("initializeWasm() must be awaited first!");
8578                 }
8579                 const nativeResponseValue = wasm.DataLossProtect_set_my_current_per_commitment_point(this_ptr, encodeArray(val));
8580                 // debug statements here
8581         }
8582         // MUST_USE_RES struct LDKDataLossProtect DataLossProtect_new(struct LDKThirtyTwoBytes your_last_per_commitment_secret_arg, struct LDKPublicKey my_current_per_commitment_point_arg);
8583         export function DataLossProtect_new(your_last_per_commitment_secret_arg: Uint8Array, my_current_per_commitment_point_arg: Uint8Array): number {
8584                 if(!isWasmInitialized) {
8585                         throw new Error("initializeWasm() must be awaited first!");
8586                 }
8587                 const nativeResponseValue = wasm.DataLossProtect_new(encodeArray(your_last_per_commitment_secret_arg), encodeArray(my_current_per_commitment_point_arg));
8588                 return nativeResponseValue;
8589         }
8590         // struct LDKDataLossProtect DataLossProtect_clone(const struct LDKDataLossProtect *NONNULL_PTR orig);
8591         export function DataLossProtect_clone(orig: number): number {
8592                 if(!isWasmInitialized) {
8593                         throw new Error("initializeWasm() must be awaited first!");
8594                 }
8595                 const nativeResponseValue = wasm.DataLossProtect_clone(orig);
8596                 return nativeResponseValue;
8597         }
8598         // void ChannelReestablish_free(struct LDKChannelReestablish this_obj);
8599         export function ChannelReestablish_free(this_obj: number): void {
8600                 if(!isWasmInitialized) {
8601                         throw new Error("initializeWasm() must be awaited first!");
8602                 }
8603                 const nativeResponseValue = wasm.ChannelReestablish_free(this_obj);
8604                 // debug statements here
8605         }
8606         // const uint8_t (*ChannelReestablish_get_channel_id(const struct LDKChannelReestablish *NONNULL_PTR this_ptr))[32];
8607         export function ChannelReestablish_get_channel_id(this_ptr: number): Uint8Array {
8608                 if(!isWasmInitialized) {
8609                         throw new Error("initializeWasm() must be awaited first!");
8610                 }
8611                 const nativeResponseValue = wasm.ChannelReestablish_get_channel_id(this_ptr);
8612                 return decodeArray(nativeResponseValue);
8613         }
8614         // void ChannelReestablish_set_channel_id(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8615         export function ChannelReestablish_set_channel_id(this_ptr: number, val: Uint8Array): void {
8616                 if(!isWasmInitialized) {
8617                         throw new Error("initializeWasm() must be awaited first!");
8618                 }
8619                 const nativeResponseValue = wasm.ChannelReestablish_set_channel_id(this_ptr, encodeArray(val));
8620                 // debug statements here
8621         }
8622         // uint64_t ChannelReestablish_get_next_local_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
8623         export function ChannelReestablish_get_next_local_commitment_number(this_ptr: number): number {
8624                 if(!isWasmInitialized) {
8625                         throw new Error("initializeWasm() must be awaited first!");
8626                 }
8627                 const nativeResponseValue = wasm.ChannelReestablish_get_next_local_commitment_number(this_ptr);
8628                 return nativeResponseValue;
8629         }
8630         // void ChannelReestablish_set_next_local_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
8631         export function ChannelReestablish_set_next_local_commitment_number(this_ptr: number, val: number): void {
8632                 if(!isWasmInitialized) {
8633                         throw new Error("initializeWasm() must be awaited first!");
8634                 }
8635                 const nativeResponseValue = wasm.ChannelReestablish_set_next_local_commitment_number(this_ptr, val);
8636                 // debug statements here
8637         }
8638         // uint64_t ChannelReestablish_get_next_remote_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
8639         export function ChannelReestablish_get_next_remote_commitment_number(this_ptr: number): number {
8640                 if(!isWasmInitialized) {
8641                         throw new Error("initializeWasm() must be awaited first!");
8642                 }
8643                 const nativeResponseValue = wasm.ChannelReestablish_get_next_remote_commitment_number(this_ptr);
8644                 return nativeResponseValue;
8645         }
8646         // void ChannelReestablish_set_next_remote_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
8647         export function ChannelReestablish_set_next_remote_commitment_number(this_ptr: number, val: number): void {
8648                 if(!isWasmInitialized) {
8649                         throw new Error("initializeWasm() must be awaited first!");
8650                 }
8651                 const nativeResponseValue = wasm.ChannelReestablish_set_next_remote_commitment_number(this_ptr, val);
8652                 // debug statements here
8653         }
8654         // struct LDKChannelReestablish ChannelReestablish_clone(const struct LDKChannelReestablish *NONNULL_PTR orig);
8655         export function ChannelReestablish_clone(orig: number): number {
8656                 if(!isWasmInitialized) {
8657                         throw new Error("initializeWasm() must be awaited first!");
8658                 }
8659                 const nativeResponseValue = wasm.ChannelReestablish_clone(orig);
8660                 return nativeResponseValue;
8661         }
8662         // void AnnouncementSignatures_free(struct LDKAnnouncementSignatures this_obj);
8663         export function AnnouncementSignatures_free(this_obj: number): void {
8664                 if(!isWasmInitialized) {
8665                         throw new Error("initializeWasm() must be awaited first!");
8666                 }
8667                 const nativeResponseValue = wasm.AnnouncementSignatures_free(this_obj);
8668                 // debug statements here
8669         }
8670         // const uint8_t (*AnnouncementSignatures_get_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr))[32];
8671         export function AnnouncementSignatures_get_channel_id(this_ptr: number): Uint8Array {
8672                 if(!isWasmInitialized) {
8673                         throw new Error("initializeWasm() must be awaited first!");
8674                 }
8675                 const nativeResponseValue = wasm.AnnouncementSignatures_get_channel_id(this_ptr);
8676                 return decodeArray(nativeResponseValue);
8677         }
8678         // void AnnouncementSignatures_set_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8679         export function AnnouncementSignatures_set_channel_id(this_ptr: number, val: Uint8Array): void {
8680                 if(!isWasmInitialized) {
8681                         throw new Error("initializeWasm() must be awaited first!");
8682                 }
8683                 const nativeResponseValue = wasm.AnnouncementSignatures_set_channel_id(this_ptr, encodeArray(val));
8684                 // debug statements here
8685         }
8686         // uint64_t AnnouncementSignatures_get_short_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
8687         export function AnnouncementSignatures_get_short_channel_id(this_ptr: number): number {
8688                 if(!isWasmInitialized) {
8689                         throw new Error("initializeWasm() must be awaited first!");
8690                 }
8691                 const nativeResponseValue = wasm.AnnouncementSignatures_get_short_channel_id(this_ptr);
8692                 return nativeResponseValue;
8693         }
8694         // void AnnouncementSignatures_set_short_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, uint64_t val);
8695         export function AnnouncementSignatures_set_short_channel_id(this_ptr: number, val: number): void {
8696                 if(!isWasmInitialized) {
8697                         throw new Error("initializeWasm() must be awaited first!");
8698                 }
8699                 const nativeResponseValue = wasm.AnnouncementSignatures_set_short_channel_id(this_ptr, val);
8700                 // debug statements here
8701         }
8702         // struct LDKSignature AnnouncementSignatures_get_node_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
8703         export function AnnouncementSignatures_get_node_signature(this_ptr: number): Uint8Array {
8704                 if(!isWasmInitialized) {
8705                         throw new Error("initializeWasm() must be awaited first!");
8706                 }
8707                 const nativeResponseValue = wasm.AnnouncementSignatures_get_node_signature(this_ptr);
8708                 return decodeArray(nativeResponseValue);
8709         }
8710         // void AnnouncementSignatures_set_node_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
8711         export function AnnouncementSignatures_set_node_signature(this_ptr: number, val: Uint8Array): void {
8712                 if(!isWasmInitialized) {
8713                         throw new Error("initializeWasm() must be awaited first!");
8714                 }
8715                 const nativeResponseValue = wasm.AnnouncementSignatures_set_node_signature(this_ptr, encodeArray(val));
8716                 // debug statements here
8717         }
8718         // struct LDKSignature AnnouncementSignatures_get_bitcoin_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
8719         export function AnnouncementSignatures_get_bitcoin_signature(this_ptr: number): Uint8Array {
8720                 if(!isWasmInitialized) {
8721                         throw new Error("initializeWasm() must be awaited first!");
8722                 }
8723                 const nativeResponseValue = wasm.AnnouncementSignatures_get_bitcoin_signature(this_ptr);
8724                 return decodeArray(nativeResponseValue);
8725         }
8726         // void AnnouncementSignatures_set_bitcoin_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
8727         export function AnnouncementSignatures_set_bitcoin_signature(this_ptr: number, val: Uint8Array): void {
8728                 if(!isWasmInitialized) {
8729                         throw new Error("initializeWasm() must be awaited first!");
8730                 }
8731                 const nativeResponseValue = wasm.AnnouncementSignatures_set_bitcoin_signature(this_ptr, encodeArray(val));
8732                 // debug statements here
8733         }
8734         // 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);
8735         export function AnnouncementSignatures_new(channel_id_arg: Uint8Array, short_channel_id_arg: number, node_signature_arg: Uint8Array, bitcoin_signature_arg: Uint8Array): number {
8736                 if(!isWasmInitialized) {
8737                         throw new Error("initializeWasm() must be awaited first!");
8738                 }
8739                 const nativeResponseValue = wasm.AnnouncementSignatures_new(encodeArray(channel_id_arg), short_channel_id_arg, encodeArray(node_signature_arg), encodeArray(bitcoin_signature_arg));
8740                 return nativeResponseValue;
8741         }
8742         // struct LDKAnnouncementSignatures AnnouncementSignatures_clone(const struct LDKAnnouncementSignatures *NONNULL_PTR orig);
8743         export function AnnouncementSignatures_clone(orig: number): number {
8744                 if(!isWasmInitialized) {
8745                         throw new Error("initializeWasm() must be awaited first!");
8746                 }
8747                 const nativeResponseValue = wasm.AnnouncementSignatures_clone(orig);
8748                 return nativeResponseValue;
8749         }
8750         // void NetAddress_free(struct LDKNetAddress this_ptr);
8751         export function NetAddress_free(this_ptr: number): void {
8752                 if(!isWasmInitialized) {
8753                         throw new Error("initializeWasm() must be awaited first!");
8754                 }
8755                 const nativeResponseValue = wasm.NetAddress_free(this_ptr);
8756                 // debug statements here
8757         }
8758         // struct LDKNetAddress NetAddress_clone(const struct LDKNetAddress *NONNULL_PTR orig);
8759         export function NetAddress_clone(orig: number): number {
8760                 if(!isWasmInitialized) {
8761                         throw new Error("initializeWasm() must be awaited first!");
8762                 }
8763                 const nativeResponseValue = wasm.NetAddress_clone(orig);
8764                 return nativeResponseValue;
8765         }
8766         // struct LDKCVec_u8Z NetAddress_write(const struct LDKNetAddress *NONNULL_PTR obj);
8767         export function NetAddress_write(obj: number): Uint8Array {
8768                 if(!isWasmInitialized) {
8769                         throw new Error("initializeWasm() must be awaited first!");
8770                 }
8771                 const nativeResponseValue = wasm.NetAddress_write(obj);
8772                 return decodeArray(nativeResponseValue);
8773         }
8774         // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ Result_read(struct LDKu8slice ser);
8775         export function Result_read(ser: Uint8Array): number {
8776                 if(!isWasmInitialized) {
8777                         throw new Error("initializeWasm() must be awaited first!");
8778                 }
8779                 const nativeResponseValue = wasm.Result_read(encodeArray(ser));
8780                 return nativeResponseValue;
8781         }
8782         // void UnsignedNodeAnnouncement_free(struct LDKUnsignedNodeAnnouncement this_obj);
8783         export function UnsignedNodeAnnouncement_free(this_obj: number): void {
8784                 if(!isWasmInitialized) {
8785                         throw new Error("initializeWasm() must be awaited first!");
8786                 }
8787                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_free(this_obj);
8788                 // debug statements here
8789         }
8790         // struct LDKNodeFeatures UnsignedNodeAnnouncement_get_features(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
8791         export function UnsignedNodeAnnouncement_get_features(this_ptr: number): number {
8792                 if(!isWasmInitialized) {
8793                         throw new Error("initializeWasm() must be awaited first!");
8794                 }
8795                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_features(this_ptr);
8796                 return nativeResponseValue;
8797         }
8798         // void UnsignedNodeAnnouncement_set_features(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
8799         export function UnsignedNodeAnnouncement_set_features(this_ptr: number, val: number): void {
8800                 if(!isWasmInitialized) {
8801                         throw new Error("initializeWasm() must be awaited first!");
8802                 }
8803                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_features(this_ptr, val);
8804                 // debug statements here
8805         }
8806         // uint32_t UnsignedNodeAnnouncement_get_timestamp(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
8807         export function UnsignedNodeAnnouncement_get_timestamp(this_ptr: number): number {
8808                 if(!isWasmInitialized) {
8809                         throw new Error("initializeWasm() must be awaited first!");
8810                 }
8811                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_timestamp(this_ptr);
8812                 return nativeResponseValue;
8813         }
8814         // void UnsignedNodeAnnouncement_set_timestamp(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, uint32_t val);
8815         export function UnsignedNodeAnnouncement_set_timestamp(this_ptr: number, val: number): void {
8816                 if(!isWasmInitialized) {
8817                         throw new Error("initializeWasm() must be awaited first!");
8818                 }
8819                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_timestamp(this_ptr, val);
8820                 // debug statements here
8821         }
8822         // struct LDKPublicKey UnsignedNodeAnnouncement_get_node_id(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
8823         export function UnsignedNodeAnnouncement_get_node_id(this_ptr: number): Uint8Array {
8824                 if(!isWasmInitialized) {
8825                         throw new Error("initializeWasm() must be awaited first!");
8826                 }
8827                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_node_id(this_ptr);
8828                 return decodeArray(nativeResponseValue);
8829         }
8830         // void UnsignedNodeAnnouncement_set_node_id(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8831         export function UnsignedNodeAnnouncement_set_node_id(this_ptr: number, val: Uint8Array): void {
8832                 if(!isWasmInitialized) {
8833                         throw new Error("initializeWasm() must be awaited first!");
8834                 }
8835                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_node_id(this_ptr, encodeArray(val));
8836                 // debug statements here
8837         }
8838         // const uint8_t (*UnsignedNodeAnnouncement_get_rgb(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[3];
8839         export function UnsignedNodeAnnouncement_get_rgb(this_ptr: number): Uint8Array {
8840                 if(!isWasmInitialized) {
8841                         throw new Error("initializeWasm() must be awaited first!");
8842                 }
8843                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_rgb(this_ptr);
8844                 return decodeArray(nativeResponseValue);
8845         }
8846         // void UnsignedNodeAnnouncement_set_rgb(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
8847         export function UnsignedNodeAnnouncement_set_rgb(this_ptr: number, val: Uint8Array): void {
8848                 if(!isWasmInitialized) {
8849                         throw new Error("initializeWasm() must be awaited first!");
8850                 }
8851                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_rgb(this_ptr, encodeArray(val));
8852                 // debug statements here
8853         }
8854         // const uint8_t (*UnsignedNodeAnnouncement_get_alias(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[32];
8855         export function UnsignedNodeAnnouncement_get_alias(this_ptr: number): Uint8Array {
8856                 if(!isWasmInitialized) {
8857                         throw new Error("initializeWasm() must be awaited first!");
8858                 }
8859                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_alias(this_ptr);
8860                 return decodeArray(nativeResponseValue);
8861         }
8862         // void UnsignedNodeAnnouncement_set_alias(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8863         export function UnsignedNodeAnnouncement_set_alias(this_ptr: number, val: Uint8Array): void {
8864                 if(!isWasmInitialized) {
8865                         throw new Error("initializeWasm() must be awaited first!");
8866                 }
8867                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_alias(this_ptr, encodeArray(val));
8868                 // debug statements here
8869         }
8870         // void UnsignedNodeAnnouncement_set_addresses(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
8871         export function UnsignedNodeAnnouncement_set_addresses(this_ptr: number, val: number[]): void {
8872                 if(!isWasmInitialized) {
8873                         throw new Error("initializeWasm() must be awaited first!");
8874                 }
8875                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_addresses(this_ptr, val);
8876                 // debug statements here
8877         }
8878         // struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_clone(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR orig);
8879         export function UnsignedNodeAnnouncement_clone(orig: number): number {
8880                 if(!isWasmInitialized) {
8881                         throw new Error("initializeWasm() must be awaited first!");
8882                 }
8883                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_clone(orig);
8884                 return nativeResponseValue;
8885         }
8886         // void NodeAnnouncement_free(struct LDKNodeAnnouncement this_obj);
8887         export function NodeAnnouncement_free(this_obj: number): void {
8888                 if(!isWasmInitialized) {
8889                         throw new Error("initializeWasm() must be awaited first!");
8890                 }
8891                 const nativeResponseValue = wasm.NodeAnnouncement_free(this_obj);
8892                 // debug statements here
8893         }
8894         // struct LDKSignature NodeAnnouncement_get_signature(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
8895         export function NodeAnnouncement_get_signature(this_ptr: number): Uint8Array {
8896                 if(!isWasmInitialized) {
8897                         throw new Error("initializeWasm() must be awaited first!");
8898                 }
8899                 const nativeResponseValue = wasm.NodeAnnouncement_get_signature(this_ptr);
8900                 return decodeArray(nativeResponseValue);
8901         }
8902         // void NodeAnnouncement_set_signature(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
8903         export function NodeAnnouncement_set_signature(this_ptr: number, val: Uint8Array): void {
8904                 if(!isWasmInitialized) {
8905                         throw new Error("initializeWasm() must be awaited first!");
8906                 }
8907                 const nativeResponseValue = wasm.NodeAnnouncement_set_signature(this_ptr, encodeArray(val));
8908                 // debug statements here
8909         }
8910         // struct LDKUnsignedNodeAnnouncement NodeAnnouncement_get_contents(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
8911         export function NodeAnnouncement_get_contents(this_ptr: number): number {
8912                 if(!isWasmInitialized) {
8913                         throw new Error("initializeWasm() must be awaited first!");
8914                 }
8915                 const nativeResponseValue = wasm.NodeAnnouncement_get_contents(this_ptr);
8916                 return nativeResponseValue;
8917         }
8918         // void NodeAnnouncement_set_contents(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedNodeAnnouncement val);
8919         export function NodeAnnouncement_set_contents(this_ptr: number, val: number): void {
8920                 if(!isWasmInitialized) {
8921                         throw new Error("initializeWasm() must be awaited first!");
8922                 }
8923                 const nativeResponseValue = wasm.NodeAnnouncement_set_contents(this_ptr, val);
8924                 // debug statements here
8925         }
8926         // MUST_USE_RES struct LDKNodeAnnouncement NodeAnnouncement_new(struct LDKSignature signature_arg, struct LDKUnsignedNodeAnnouncement contents_arg);
8927         export function NodeAnnouncement_new(signature_arg: Uint8Array, contents_arg: number): number {
8928                 if(!isWasmInitialized) {
8929                         throw new Error("initializeWasm() must be awaited first!");
8930                 }
8931                 const nativeResponseValue = wasm.NodeAnnouncement_new(encodeArray(signature_arg), contents_arg);
8932                 return nativeResponseValue;
8933         }
8934         // struct LDKNodeAnnouncement NodeAnnouncement_clone(const struct LDKNodeAnnouncement *NONNULL_PTR orig);
8935         export function NodeAnnouncement_clone(orig: number): number {
8936                 if(!isWasmInitialized) {
8937                         throw new Error("initializeWasm() must be awaited first!");
8938                 }
8939                 const nativeResponseValue = wasm.NodeAnnouncement_clone(orig);
8940                 return nativeResponseValue;
8941         }
8942         // void UnsignedChannelAnnouncement_free(struct LDKUnsignedChannelAnnouncement this_obj);
8943         export function UnsignedChannelAnnouncement_free(this_obj: number): void {
8944                 if(!isWasmInitialized) {
8945                         throw new Error("initializeWasm() must be awaited first!");
8946                 }
8947                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_free(this_obj);
8948                 // debug statements here
8949         }
8950         // struct LDKChannelFeatures UnsignedChannelAnnouncement_get_features(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
8951         export function UnsignedChannelAnnouncement_get_features(this_ptr: number): number {
8952                 if(!isWasmInitialized) {
8953                         throw new Error("initializeWasm() must be awaited first!");
8954                 }
8955                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_features(this_ptr);
8956                 return nativeResponseValue;
8957         }
8958         // void UnsignedChannelAnnouncement_set_features(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
8959         export function UnsignedChannelAnnouncement_set_features(this_ptr: number, val: number): void {
8960                 if(!isWasmInitialized) {
8961                         throw new Error("initializeWasm() must be awaited first!");
8962                 }
8963                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_features(this_ptr, val);
8964                 // debug statements here
8965         }
8966         // const uint8_t (*UnsignedChannelAnnouncement_get_chain_hash(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr))[32];
8967         export function UnsignedChannelAnnouncement_get_chain_hash(this_ptr: number): Uint8Array {
8968                 if(!isWasmInitialized) {
8969                         throw new Error("initializeWasm() must be awaited first!");
8970                 }
8971                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_chain_hash(this_ptr);
8972                 return decodeArray(nativeResponseValue);
8973         }
8974         // void UnsignedChannelAnnouncement_set_chain_hash(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8975         export function UnsignedChannelAnnouncement_set_chain_hash(this_ptr: number, val: Uint8Array): void {
8976                 if(!isWasmInitialized) {
8977                         throw new Error("initializeWasm() must be awaited first!");
8978                 }
8979                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_chain_hash(this_ptr, encodeArray(val));
8980                 // debug statements here
8981         }
8982         // uint64_t UnsignedChannelAnnouncement_get_short_channel_id(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
8983         export function UnsignedChannelAnnouncement_get_short_channel_id(this_ptr: number): number {
8984                 if(!isWasmInitialized) {
8985                         throw new Error("initializeWasm() must be awaited first!");
8986                 }
8987                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_short_channel_id(this_ptr);
8988                 return nativeResponseValue;
8989         }
8990         // void UnsignedChannelAnnouncement_set_short_channel_id(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, uint64_t val);
8991         export function UnsignedChannelAnnouncement_set_short_channel_id(this_ptr: number, val: number): void {
8992                 if(!isWasmInitialized) {
8993                         throw new Error("initializeWasm() must be awaited first!");
8994                 }
8995                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_short_channel_id(this_ptr, val);
8996                 // debug statements here
8997         }
8998         // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
8999         export function UnsignedChannelAnnouncement_get_node_id_1(this_ptr: number): Uint8Array {
9000                 if(!isWasmInitialized) {
9001                         throw new Error("initializeWasm() must be awaited first!");
9002                 }
9003                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_node_id_1(this_ptr);
9004                 return decodeArray(nativeResponseValue);
9005         }
9006         // void UnsignedChannelAnnouncement_set_node_id_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9007         export function UnsignedChannelAnnouncement_set_node_id_1(this_ptr: number, val: Uint8Array): void {
9008                 if(!isWasmInitialized) {
9009                         throw new Error("initializeWasm() must be awaited first!");
9010                 }
9011                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_node_id_1(this_ptr, encodeArray(val));
9012                 // debug statements here
9013         }
9014         // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
9015         export function UnsignedChannelAnnouncement_get_node_id_2(this_ptr: number): Uint8Array {
9016                 if(!isWasmInitialized) {
9017                         throw new Error("initializeWasm() must be awaited first!");
9018                 }
9019                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_node_id_2(this_ptr);
9020                 return decodeArray(nativeResponseValue);
9021         }
9022         // void UnsignedChannelAnnouncement_set_node_id_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9023         export function UnsignedChannelAnnouncement_set_node_id_2(this_ptr: number, val: Uint8Array): void {
9024                 if(!isWasmInitialized) {
9025                         throw new Error("initializeWasm() must be awaited first!");
9026                 }
9027                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_node_id_2(this_ptr, encodeArray(val));
9028                 // debug statements here
9029         }
9030         // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
9031         export function UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr: number): Uint8Array {
9032                 if(!isWasmInitialized) {
9033                         throw new Error("initializeWasm() must be awaited first!");
9034                 }
9035                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr);
9036                 return decodeArray(nativeResponseValue);
9037         }
9038         // void UnsignedChannelAnnouncement_set_bitcoin_key_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9039         export function UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr: number, val: Uint8Array): void {
9040                 if(!isWasmInitialized) {
9041                         throw new Error("initializeWasm() must be awaited first!");
9042                 }
9043                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr, encodeArray(val));
9044                 // debug statements here
9045         }
9046         // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
9047         export function UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr: number): Uint8Array {
9048                 if(!isWasmInitialized) {
9049                         throw new Error("initializeWasm() must be awaited first!");
9050                 }
9051                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr);
9052                 return decodeArray(nativeResponseValue);
9053         }
9054         // void UnsignedChannelAnnouncement_set_bitcoin_key_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9055         export function UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr: number, val: Uint8Array): void {
9056                 if(!isWasmInitialized) {
9057                         throw new Error("initializeWasm() must be awaited first!");
9058                 }
9059                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr, encodeArray(val));
9060                 // debug statements here
9061         }
9062         // struct LDKUnsignedChannelAnnouncement UnsignedChannelAnnouncement_clone(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR orig);
9063         export function UnsignedChannelAnnouncement_clone(orig: number): number {
9064                 if(!isWasmInitialized) {
9065                         throw new Error("initializeWasm() must be awaited first!");
9066                 }
9067                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_clone(orig);
9068                 return nativeResponseValue;
9069         }
9070         // void ChannelAnnouncement_free(struct LDKChannelAnnouncement this_obj);
9071         export function ChannelAnnouncement_free(this_obj: number): void {
9072                 if(!isWasmInitialized) {
9073                         throw new Error("initializeWasm() must be awaited first!");
9074                 }
9075                 const nativeResponseValue = wasm.ChannelAnnouncement_free(this_obj);
9076                 // debug statements here
9077         }
9078         // struct LDKSignature ChannelAnnouncement_get_node_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
9079         export function ChannelAnnouncement_get_node_signature_1(this_ptr: number): Uint8Array {
9080                 if(!isWasmInitialized) {
9081                         throw new Error("initializeWasm() must be awaited first!");
9082                 }
9083                 const nativeResponseValue = wasm.ChannelAnnouncement_get_node_signature_1(this_ptr);
9084                 return decodeArray(nativeResponseValue);
9085         }
9086         // void ChannelAnnouncement_set_node_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
9087         export function ChannelAnnouncement_set_node_signature_1(this_ptr: number, val: Uint8Array): void {
9088                 if(!isWasmInitialized) {
9089                         throw new Error("initializeWasm() must be awaited first!");
9090                 }
9091                 const nativeResponseValue = wasm.ChannelAnnouncement_set_node_signature_1(this_ptr, encodeArray(val));
9092                 // debug statements here
9093         }
9094         // struct LDKSignature ChannelAnnouncement_get_node_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
9095         export function ChannelAnnouncement_get_node_signature_2(this_ptr: number): Uint8Array {
9096                 if(!isWasmInitialized) {
9097                         throw new Error("initializeWasm() must be awaited first!");
9098                 }
9099                 const nativeResponseValue = wasm.ChannelAnnouncement_get_node_signature_2(this_ptr);
9100                 return decodeArray(nativeResponseValue);
9101         }
9102         // void ChannelAnnouncement_set_node_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
9103         export function ChannelAnnouncement_set_node_signature_2(this_ptr: number, val: Uint8Array): void {
9104                 if(!isWasmInitialized) {
9105                         throw new Error("initializeWasm() must be awaited first!");
9106                 }
9107                 const nativeResponseValue = wasm.ChannelAnnouncement_set_node_signature_2(this_ptr, encodeArray(val));
9108                 // debug statements here
9109         }
9110         // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
9111         export function ChannelAnnouncement_get_bitcoin_signature_1(this_ptr: number): Uint8Array {
9112                 if(!isWasmInitialized) {
9113                         throw new Error("initializeWasm() must be awaited first!");
9114                 }
9115                 const nativeResponseValue = wasm.ChannelAnnouncement_get_bitcoin_signature_1(this_ptr);
9116                 return decodeArray(nativeResponseValue);
9117         }
9118         // void ChannelAnnouncement_set_bitcoin_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
9119         export function ChannelAnnouncement_set_bitcoin_signature_1(this_ptr: number, val: Uint8Array): void {
9120                 if(!isWasmInitialized) {
9121                         throw new Error("initializeWasm() must be awaited first!");
9122                 }
9123                 const nativeResponseValue = wasm.ChannelAnnouncement_set_bitcoin_signature_1(this_ptr, encodeArray(val));
9124                 // debug statements here
9125         }
9126         // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
9127         export function ChannelAnnouncement_get_bitcoin_signature_2(this_ptr: number): Uint8Array {
9128                 if(!isWasmInitialized) {
9129                         throw new Error("initializeWasm() must be awaited first!");
9130                 }
9131                 const nativeResponseValue = wasm.ChannelAnnouncement_get_bitcoin_signature_2(this_ptr);
9132                 return decodeArray(nativeResponseValue);
9133         }
9134         // void ChannelAnnouncement_set_bitcoin_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
9135         export function ChannelAnnouncement_set_bitcoin_signature_2(this_ptr: number, val: Uint8Array): void {
9136                 if(!isWasmInitialized) {
9137                         throw new Error("initializeWasm() must be awaited first!");
9138                 }
9139                 const nativeResponseValue = wasm.ChannelAnnouncement_set_bitcoin_signature_2(this_ptr, encodeArray(val));
9140                 // debug statements here
9141         }
9142         // struct LDKUnsignedChannelAnnouncement ChannelAnnouncement_get_contents(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
9143         export function ChannelAnnouncement_get_contents(this_ptr: number): number {
9144                 if(!isWasmInitialized) {
9145                         throw new Error("initializeWasm() must be awaited first!");
9146                 }
9147                 const nativeResponseValue = wasm.ChannelAnnouncement_get_contents(this_ptr);
9148                 return nativeResponseValue;
9149         }
9150         // void ChannelAnnouncement_set_contents(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedChannelAnnouncement val);
9151         export function ChannelAnnouncement_set_contents(this_ptr: number, val: number): void {
9152                 if(!isWasmInitialized) {
9153                         throw new Error("initializeWasm() must be awaited first!");
9154                 }
9155                 const nativeResponseValue = wasm.ChannelAnnouncement_set_contents(this_ptr, val);
9156                 // debug statements here
9157         }
9158         // 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);
9159         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 {
9160                 if(!isWasmInitialized) {
9161                         throw new Error("initializeWasm() must be awaited first!");
9162                 }
9163                 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);
9164                 return nativeResponseValue;
9165         }
9166         // struct LDKChannelAnnouncement ChannelAnnouncement_clone(const struct LDKChannelAnnouncement *NONNULL_PTR orig);
9167         export function ChannelAnnouncement_clone(orig: number): number {
9168                 if(!isWasmInitialized) {
9169                         throw new Error("initializeWasm() must be awaited first!");
9170                 }
9171                 const nativeResponseValue = wasm.ChannelAnnouncement_clone(orig);
9172                 return nativeResponseValue;
9173         }
9174         // void UnsignedChannelUpdate_free(struct LDKUnsignedChannelUpdate this_obj);
9175         export function UnsignedChannelUpdate_free(this_obj: number): void {
9176                 if(!isWasmInitialized) {
9177                         throw new Error("initializeWasm() must be awaited first!");
9178                 }
9179                 const nativeResponseValue = wasm.UnsignedChannelUpdate_free(this_obj);
9180                 // debug statements here
9181         }
9182         // const uint8_t (*UnsignedChannelUpdate_get_chain_hash(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr))[32];
9183         export function UnsignedChannelUpdate_get_chain_hash(this_ptr: number): Uint8Array {
9184                 if(!isWasmInitialized) {
9185                         throw new Error("initializeWasm() must be awaited first!");
9186                 }
9187                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_chain_hash(this_ptr);
9188                 return decodeArray(nativeResponseValue);
9189         }
9190         // void UnsignedChannelUpdate_set_chain_hash(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9191         export function UnsignedChannelUpdate_set_chain_hash(this_ptr: number, val: Uint8Array): void {
9192                 if(!isWasmInitialized) {
9193                         throw new Error("initializeWasm() must be awaited first!");
9194                 }
9195                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_chain_hash(this_ptr, encodeArray(val));
9196                 // debug statements here
9197         }
9198         // uint64_t UnsignedChannelUpdate_get_short_channel_id(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
9199         export function UnsignedChannelUpdate_get_short_channel_id(this_ptr: number): number {
9200                 if(!isWasmInitialized) {
9201                         throw new Error("initializeWasm() must be awaited first!");
9202                 }
9203                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_short_channel_id(this_ptr);
9204                 return nativeResponseValue;
9205         }
9206         // void UnsignedChannelUpdate_set_short_channel_id(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
9207         export function UnsignedChannelUpdate_set_short_channel_id(this_ptr: number, val: number): void {
9208                 if(!isWasmInitialized) {
9209                         throw new Error("initializeWasm() must be awaited first!");
9210                 }
9211                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_short_channel_id(this_ptr, val);
9212                 // debug statements here
9213         }
9214         // uint32_t UnsignedChannelUpdate_get_timestamp(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
9215         export function UnsignedChannelUpdate_get_timestamp(this_ptr: number): number {
9216                 if(!isWasmInitialized) {
9217                         throw new Error("initializeWasm() must be awaited first!");
9218                 }
9219                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_timestamp(this_ptr);
9220                 return nativeResponseValue;
9221         }
9222         // void UnsignedChannelUpdate_set_timestamp(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
9223         export function UnsignedChannelUpdate_set_timestamp(this_ptr: number, val: number): void {
9224                 if(!isWasmInitialized) {
9225                         throw new Error("initializeWasm() must be awaited first!");
9226                 }
9227                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_timestamp(this_ptr, val);
9228                 // debug statements here
9229         }
9230         // uint8_t UnsignedChannelUpdate_get_flags(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
9231         export function UnsignedChannelUpdate_get_flags(this_ptr: number): number {
9232                 if(!isWasmInitialized) {
9233                         throw new Error("initializeWasm() must be awaited first!");
9234                 }
9235                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_flags(this_ptr);
9236                 return nativeResponseValue;
9237         }
9238         // void UnsignedChannelUpdate_set_flags(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint8_t val);
9239         export function UnsignedChannelUpdate_set_flags(this_ptr: number, val: number): void {
9240                 if(!isWasmInitialized) {
9241                         throw new Error("initializeWasm() must be awaited first!");
9242                 }
9243                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_flags(this_ptr, val);
9244                 // debug statements here
9245         }
9246         // uint16_t UnsignedChannelUpdate_get_cltv_expiry_delta(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
9247         export function UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr: number): number {
9248                 if(!isWasmInitialized) {
9249                         throw new Error("initializeWasm() must be awaited first!");
9250                 }
9251                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr);
9252                 return nativeResponseValue;
9253         }
9254         // void UnsignedChannelUpdate_set_cltv_expiry_delta(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint16_t val);
9255         export function UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr: number, val: number): void {
9256                 if(!isWasmInitialized) {
9257                         throw new Error("initializeWasm() must be awaited first!");
9258                 }
9259                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr, val);
9260                 // debug statements here
9261         }
9262         // uint64_t UnsignedChannelUpdate_get_htlc_minimum_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
9263         export function UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr: number): number {
9264                 if(!isWasmInitialized) {
9265                         throw new Error("initializeWasm() must be awaited first!");
9266                 }
9267                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr);
9268                 return nativeResponseValue;
9269         }
9270         // void UnsignedChannelUpdate_set_htlc_minimum_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
9271         export function UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr: number, val: number): void {
9272                 if(!isWasmInitialized) {
9273                         throw new Error("initializeWasm() must be awaited first!");
9274                 }
9275                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr, val);
9276                 // debug statements here
9277         }
9278         // uint32_t UnsignedChannelUpdate_get_fee_base_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
9279         export function UnsignedChannelUpdate_get_fee_base_msat(this_ptr: number): number {
9280                 if(!isWasmInitialized) {
9281                         throw new Error("initializeWasm() must be awaited first!");
9282                 }
9283                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_fee_base_msat(this_ptr);
9284                 return nativeResponseValue;
9285         }
9286         // void UnsignedChannelUpdate_set_fee_base_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
9287         export function UnsignedChannelUpdate_set_fee_base_msat(this_ptr: number, val: number): void {
9288                 if(!isWasmInitialized) {
9289                         throw new Error("initializeWasm() must be awaited first!");
9290                 }
9291                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_base_msat(this_ptr, val);
9292                 // debug statements here
9293         }
9294         // uint32_t UnsignedChannelUpdate_get_fee_proportional_millionths(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
9295         export function UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr: number): number {
9296                 if(!isWasmInitialized) {
9297                         throw new Error("initializeWasm() must be awaited first!");
9298                 }
9299                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr);
9300                 return nativeResponseValue;
9301         }
9302         // void UnsignedChannelUpdate_set_fee_proportional_millionths(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
9303         export function UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr: number, val: number): void {
9304                 if(!isWasmInitialized) {
9305                         throw new Error("initializeWasm() must be awaited first!");
9306                 }
9307                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr, val);
9308                 // debug statements here
9309         }
9310         // struct LDKUnsignedChannelUpdate UnsignedChannelUpdate_clone(const struct LDKUnsignedChannelUpdate *NONNULL_PTR orig);
9311         export function UnsignedChannelUpdate_clone(orig: number): number {
9312                 if(!isWasmInitialized) {
9313                         throw new Error("initializeWasm() must be awaited first!");
9314                 }
9315                 const nativeResponseValue = wasm.UnsignedChannelUpdate_clone(orig);
9316                 return nativeResponseValue;
9317         }
9318         // void ChannelUpdate_free(struct LDKChannelUpdate this_obj);
9319         export function ChannelUpdate_free(this_obj: number): void {
9320                 if(!isWasmInitialized) {
9321                         throw new Error("initializeWasm() must be awaited first!");
9322                 }
9323                 const nativeResponseValue = wasm.ChannelUpdate_free(this_obj);
9324                 // debug statements here
9325         }
9326         // struct LDKSignature ChannelUpdate_get_signature(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
9327         export function ChannelUpdate_get_signature(this_ptr: number): Uint8Array {
9328                 if(!isWasmInitialized) {
9329                         throw new Error("initializeWasm() must be awaited first!");
9330                 }
9331                 const nativeResponseValue = wasm.ChannelUpdate_get_signature(this_ptr);
9332                 return decodeArray(nativeResponseValue);
9333         }
9334         // void ChannelUpdate_set_signature(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKSignature val);
9335         export function ChannelUpdate_set_signature(this_ptr: number, val: Uint8Array): void {
9336                 if(!isWasmInitialized) {
9337                         throw new Error("initializeWasm() must be awaited first!");
9338                 }
9339                 const nativeResponseValue = wasm.ChannelUpdate_set_signature(this_ptr, encodeArray(val));
9340                 // debug statements here
9341         }
9342         // struct LDKUnsignedChannelUpdate ChannelUpdate_get_contents(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
9343         export function ChannelUpdate_get_contents(this_ptr: number): number {
9344                 if(!isWasmInitialized) {
9345                         throw new Error("initializeWasm() must be awaited first!");
9346                 }
9347                 const nativeResponseValue = wasm.ChannelUpdate_get_contents(this_ptr);
9348                 return nativeResponseValue;
9349         }
9350         // void ChannelUpdate_set_contents(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKUnsignedChannelUpdate val);
9351         export function ChannelUpdate_set_contents(this_ptr: number, val: number): void {
9352                 if(!isWasmInitialized) {
9353                         throw new Error("initializeWasm() must be awaited first!");
9354                 }
9355                 const nativeResponseValue = wasm.ChannelUpdate_set_contents(this_ptr, val);
9356                 // debug statements here
9357         }
9358         // MUST_USE_RES struct LDKChannelUpdate ChannelUpdate_new(struct LDKSignature signature_arg, struct LDKUnsignedChannelUpdate contents_arg);
9359         export function ChannelUpdate_new(signature_arg: Uint8Array, contents_arg: number): number {
9360                 if(!isWasmInitialized) {
9361                         throw new Error("initializeWasm() must be awaited first!");
9362                 }
9363                 const nativeResponseValue = wasm.ChannelUpdate_new(encodeArray(signature_arg), contents_arg);
9364                 return nativeResponseValue;
9365         }
9366         // struct LDKChannelUpdate ChannelUpdate_clone(const struct LDKChannelUpdate *NONNULL_PTR orig);
9367         export function ChannelUpdate_clone(orig: number): number {
9368                 if(!isWasmInitialized) {
9369                         throw new Error("initializeWasm() must be awaited first!");
9370                 }
9371                 const nativeResponseValue = wasm.ChannelUpdate_clone(orig);
9372                 return nativeResponseValue;
9373         }
9374         // void QueryChannelRange_free(struct LDKQueryChannelRange this_obj);
9375         export function QueryChannelRange_free(this_obj: number): void {
9376                 if(!isWasmInitialized) {
9377                         throw new Error("initializeWasm() must be awaited first!");
9378                 }
9379                 const nativeResponseValue = wasm.QueryChannelRange_free(this_obj);
9380                 // debug statements here
9381         }
9382         // const uint8_t (*QueryChannelRange_get_chain_hash(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr))[32];
9383         export function QueryChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
9384                 if(!isWasmInitialized) {
9385                         throw new Error("initializeWasm() must be awaited first!");
9386                 }
9387                 const nativeResponseValue = wasm.QueryChannelRange_get_chain_hash(this_ptr);
9388                 return decodeArray(nativeResponseValue);
9389         }
9390         // void QueryChannelRange_set_chain_hash(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9391         export function QueryChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
9392                 if(!isWasmInitialized) {
9393                         throw new Error("initializeWasm() must be awaited first!");
9394                 }
9395                 const nativeResponseValue = wasm.QueryChannelRange_set_chain_hash(this_ptr, encodeArray(val));
9396                 // debug statements here
9397         }
9398         // uint32_t QueryChannelRange_get_first_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
9399         export function QueryChannelRange_get_first_blocknum(this_ptr: number): number {
9400                 if(!isWasmInitialized) {
9401                         throw new Error("initializeWasm() must be awaited first!");
9402                 }
9403                 const nativeResponseValue = wasm.QueryChannelRange_get_first_blocknum(this_ptr);
9404                 return nativeResponseValue;
9405         }
9406         // void QueryChannelRange_set_first_blocknum(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
9407         export function QueryChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
9408                 if(!isWasmInitialized) {
9409                         throw new Error("initializeWasm() must be awaited first!");
9410                 }
9411                 const nativeResponseValue = wasm.QueryChannelRange_set_first_blocknum(this_ptr, val);
9412                 // debug statements here
9413         }
9414         // uint32_t QueryChannelRange_get_number_of_blocks(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
9415         export function QueryChannelRange_get_number_of_blocks(this_ptr: number): number {
9416                 if(!isWasmInitialized) {
9417                         throw new Error("initializeWasm() must be awaited first!");
9418                 }
9419                 const nativeResponseValue = wasm.QueryChannelRange_get_number_of_blocks(this_ptr);
9420                 return nativeResponseValue;
9421         }
9422         // void QueryChannelRange_set_number_of_blocks(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
9423         export function QueryChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
9424                 if(!isWasmInitialized) {
9425                         throw new Error("initializeWasm() must be awaited first!");
9426                 }
9427                 const nativeResponseValue = wasm.QueryChannelRange_set_number_of_blocks(this_ptr, val);
9428                 // debug statements here
9429         }
9430         // MUST_USE_RES struct LDKQueryChannelRange QueryChannelRange_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg);
9431         export function QueryChannelRange_new(chain_hash_arg: Uint8Array, first_blocknum_arg: number, number_of_blocks_arg: number): number {
9432                 if(!isWasmInitialized) {
9433                         throw new Error("initializeWasm() must be awaited first!");
9434                 }
9435                 const nativeResponseValue = wasm.QueryChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg);
9436                 return nativeResponseValue;
9437         }
9438         // struct LDKQueryChannelRange QueryChannelRange_clone(const struct LDKQueryChannelRange *NONNULL_PTR orig);
9439         export function QueryChannelRange_clone(orig: number): number {
9440                 if(!isWasmInitialized) {
9441                         throw new Error("initializeWasm() must be awaited first!");
9442                 }
9443                 const nativeResponseValue = wasm.QueryChannelRange_clone(orig);
9444                 return nativeResponseValue;
9445         }
9446         // void ReplyChannelRange_free(struct LDKReplyChannelRange this_obj);
9447         export function ReplyChannelRange_free(this_obj: number): void {
9448                 if(!isWasmInitialized) {
9449                         throw new Error("initializeWasm() must be awaited first!");
9450                 }
9451                 const nativeResponseValue = wasm.ReplyChannelRange_free(this_obj);
9452                 // debug statements here
9453         }
9454         // const uint8_t (*ReplyChannelRange_get_chain_hash(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr))[32];
9455         export function ReplyChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
9456                 if(!isWasmInitialized) {
9457                         throw new Error("initializeWasm() must be awaited first!");
9458                 }
9459                 const nativeResponseValue = wasm.ReplyChannelRange_get_chain_hash(this_ptr);
9460                 return decodeArray(nativeResponseValue);
9461         }
9462         // void ReplyChannelRange_set_chain_hash(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9463         export function ReplyChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
9464                 if(!isWasmInitialized) {
9465                         throw new Error("initializeWasm() must be awaited first!");
9466                 }
9467                 const nativeResponseValue = wasm.ReplyChannelRange_set_chain_hash(this_ptr, encodeArray(val));
9468                 // debug statements here
9469         }
9470         // uint32_t ReplyChannelRange_get_first_blocknum(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
9471         export function ReplyChannelRange_get_first_blocknum(this_ptr: number): number {
9472                 if(!isWasmInitialized) {
9473                         throw new Error("initializeWasm() must be awaited first!");
9474                 }
9475                 const nativeResponseValue = wasm.ReplyChannelRange_get_first_blocknum(this_ptr);
9476                 return nativeResponseValue;
9477         }
9478         // void ReplyChannelRange_set_first_blocknum(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
9479         export function ReplyChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
9480                 if(!isWasmInitialized) {
9481                         throw new Error("initializeWasm() must be awaited first!");
9482                 }
9483                 const nativeResponseValue = wasm.ReplyChannelRange_set_first_blocknum(this_ptr, val);
9484                 // debug statements here
9485         }
9486         // uint32_t ReplyChannelRange_get_number_of_blocks(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
9487         export function ReplyChannelRange_get_number_of_blocks(this_ptr: number): number {
9488                 if(!isWasmInitialized) {
9489                         throw new Error("initializeWasm() must be awaited first!");
9490                 }
9491                 const nativeResponseValue = wasm.ReplyChannelRange_get_number_of_blocks(this_ptr);
9492                 return nativeResponseValue;
9493         }
9494         // void ReplyChannelRange_set_number_of_blocks(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
9495         export function ReplyChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
9496                 if(!isWasmInitialized) {
9497                         throw new Error("initializeWasm() must be awaited first!");
9498                 }
9499                 const nativeResponseValue = wasm.ReplyChannelRange_set_number_of_blocks(this_ptr, val);
9500                 // debug statements here
9501         }
9502         // bool ReplyChannelRange_get_sync_complete(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
9503         export function ReplyChannelRange_get_sync_complete(this_ptr: number): boolean {
9504                 if(!isWasmInitialized) {
9505                         throw new Error("initializeWasm() must be awaited first!");
9506                 }
9507                 const nativeResponseValue = wasm.ReplyChannelRange_get_sync_complete(this_ptr);
9508                 return nativeResponseValue;
9509         }
9510         // void ReplyChannelRange_set_sync_complete(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, bool val);
9511         export function ReplyChannelRange_set_sync_complete(this_ptr: number, val: boolean): void {
9512                 if(!isWasmInitialized) {
9513                         throw new Error("initializeWasm() must be awaited first!");
9514                 }
9515                 const nativeResponseValue = wasm.ReplyChannelRange_set_sync_complete(this_ptr, val);
9516                 // debug statements here
9517         }
9518         // void ReplyChannelRange_set_short_channel_ids(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
9519         export function ReplyChannelRange_set_short_channel_ids(this_ptr: number, val: number[]): void {
9520                 if(!isWasmInitialized) {
9521                         throw new Error("initializeWasm() must be awaited first!");
9522                 }
9523                 const nativeResponseValue = wasm.ReplyChannelRange_set_short_channel_ids(this_ptr, val);
9524                 // debug statements here
9525         }
9526         // 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);
9527         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 {
9528                 if(!isWasmInitialized) {
9529                         throw new Error("initializeWasm() must be awaited first!");
9530                 }
9531                 const nativeResponseValue = wasm.ReplyChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg, sync_complete_arg, short_channel_ids_arg);
9532                 return nativeResponseValue;
9533         }
9534         // struct LDKReplyChannelRange ReplyChannelRange_clone(const struct LDKReplyChannelRange *NONNULL_PTR orig);
9535         export function ReplyChannelRange_clone(orig: number): number {
9536                 if(!isWasmInitialized) {
9537                         throw new Error("initializeWasm() must be awaited first!");
9538                 }
9539                 const nativeResponseValue = wasm.ReplyChannelRange_clone(orig);
9540                 return nativeResponseValue;
9541         }
9542         // void QueryShortChannelIds_free(struct LDKQueryShortChannelIds this_obj);
9543         export function QueryShortChannelIds_free(this_obj: number): void {
9544                 if(!isWasmInitialized) {
9545                         throw new Error("initializeWasm() must be awaited first!");
9546                 }
9547                 const nativeResponseValue = wasm.QueryShortChannelIds_free(this_obj);
9548                 // debug statements here
9549         }
9550         // const uint8_t (*QueryShortChannelIds_get_chain_hash(const struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr))[32];
9551         export function QueryShortChannelIds_get_chain_hash(this_ptr: number): Uint8Array {
9552                 if(!isWasmInitialized) {
9553                         throw new Error("initializeWasm() must be awaited first!");
9554                 }
9555                 const nativeResponseValue = wasm.QueryShortChannelIds_get_chain_hash(this_ptr);
9556                 return decodeArray(nativeResponseValue);
9557         }
9558         // void QueryShortChannelIds_set_chain_hash(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9559         export function QueryShortChannelIds_set_chain_hash(this_ptr: number, val: Uint8Array): void {
9560                 if(!isWasmInitialized) {
9561                         throw new Error("initializeWasm() must be awaited first!");
9562                 }
9563                 const nativeResponseValue = wasm.QueryShortChannelIds_set_chain_hash(this_ptr, encodeArray(val));
9564                 // debug statements here
9565         }
9566         // void QueryShortChannelIds_set_short_channel_ids(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
9567         export function QueryShortChannelIds_set_short_channel_ids(this_ptr: number, val: number[]): void {
9568                 if(!isWasmInitialized) {
9569                         throw new Error("initializeWasm() must be awaited first!");
9570                 }
9571                 const nativeResponseValue = wasm.QueryShortChannelIds_set_short_channel_ids(this_ptr, val);
9572                 // debug statements here
9573         }
9574         // MUST_USE_RES struct LDKQueryShortChannelIds QueryShortChannelIds_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKCVec_u64Z short_channel_ids_arg);
9575         export function QueryShortChannelIds_new(chain_hash_arg: Uint8Array, short_channel_ids_arg: number[]): number {
9576                 if(!isWasmInitialized) {
9577                         throw new Error("initializeWasm() must be awaited first!");
9578                 }
9579                 const nativeResponseValue = wasm.QueryShortChannelIds_new(encodeArray(chain_hash_arg), short_channel_ids_arg);
9580                 return nativeResponseValue;
9581         }
9582         // struct LDKQueryShortChannelIds QueryShortChannelIds_clone(const struct LDKQueryShortChannelIds *NONNULL_PTR orig);
9583         export function QueryShortChannelIds_clone(orig: number): number {
9584                 if(!isWasmInitialized) {
9585                         throw new Error("initializeWasm() must be awaited first!");
9586                 }
9587                 const nativeResponseValue = wasm.QueryShortChannelIds_clone(orig);
9588                 return nativeResponseValue;
9589         }
9590         // void ReplyShortChannelIdsEnd_free(struct LDKReplyShortChannelIdsEnd this_obj);
9591         export function ReplyShortChannelIdsEnd_free(this_obj: number): void {
9592                 if(!isWasmInitialized) {
9593                         throw new Error("initializeWasm() must be awaited first!");
9594                 }
9595                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_free(this_obj);
9596                 // debug statements here
9597         }
9598         // const uint8_t (*ReplyShortChannelIdsEnd_get_chain_hash(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr))[32];
9599         export function ReplyShortChannelIdsEnd_get_chain_hash(this_ptr: number): Uint8Array {
9600                 if(!isWasmInitialized) {
9601                         throw new Error("initializeWasm() must be awaited first!");
9602                 }
9603                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_get_chain_hash(this_ptr);
9604                 return decodeArray(nativeResponseValue);
9605         }
9606         // void ReplyShortChannelIdsEnd_set_chain_hash(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9607         export function ReplyShortChannelIdsEnd_set_chain_hash(this_ptr: number, val: Uint8Array): void {
9608                 if(!isWasmInitialized) {
9609                         throw new Error("initializeWasm() must be awaited first!");
9610                 }
9611                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_set_chain_hash(this_ptr, encodeArray(val));
9612                 // debug statements here
9613         }
9614         // bool ReplyShortChannelIdsEnd_get_full_information(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr);
9615         export function ReplyShortChannelIdsEnd_get_full_information(this_ptr: number): boolean {
9616                 if(!isWasmInitialized) {
9617                         throw new Error("initializeWasm() must be awaited first!");
9618                 }
9619                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_get_full_information(this_ptr);
9620                 return nativeResponseValue;
9621         }
9622         // void ReplyShortChannelIdsEnd_set_full_information(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, bool val);
9623         export function ReplyShortChannelIdsEnd_set_full_information(this_ptr: number, val: boolean): void {
9624                 if(!isWasmInitialized) {
9625                         throw new Error("initializeWasm() must be awaited first!");
9626                 }
9627                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_set_full_information(this_ptr, val);
9628                 // debug statements here
9629         }
9630         // MUST_USE_RES struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_new(struct LDKThirtyTwoBytes chain_hash_arg, bool full_information_arg);
9631         export function ReplyShortChannelIdsEnd_new(chain_hash_arg: Uint8Array, full_information_arg: boolean): number {
9632                 if(!isWasmInitialized) {
9633                         throw new Error("initializeWasm() must be awaited first!");
9634                 }
9635                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_new(encodeArray(chain_hash_arg), full_information_arg);
9636                 return nativeResponseValue;
9637         }
9638         // struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_clone(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR orig);
9639         export function ReplyShortChannelIdsEnd_clone(orig: number): number {
9640                 if(!isWasmInitialized) {
9641                         throw new Error("initializeWasm() must be awaited first!");
9642                 }
9643                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_clone(orig);
9644                 return nativeResponseValue;
9645         }
9646         // void GossipTimestampFilter_free(struct LDKGossipTimestampFilter this_obj);
9647         export function GossipTimestampFilter_free(this_obj: number): void {
9648                 if(!isWasmInitialized) {
9649                         throw new Error("initializeWasm() must be awaited first!");
9650                 }
9651                 const nativeResponseValue = wasm.GossipTimestampFilter_free(this_obj);
9652                 // debug statements here
9653         }
9654         // const uint8_t (*GossipTimestampFilter_get_chain_hash(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr))[32];
9655         export function GossipTimestampFilter_get_chain_hash(this_ptr: number): Uint8Array {
9656                 if(!isWasmInitialized) {
9657                         throw new Error("initializeWasm() must be awaited first!");
9658                 }
9659                 const nativeResponseValue = wasm.GossipTimestampFilter_get_chain_hash(this_ptr);
9660                 return decodeArray(nativeResponseValue);
9661         }
9662         // void GossipTimestampFilter_set_chain_hash(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9663         export function GossipTimestampFilter_set_chain_hash(this_ptr: number, val: Uint8Array): void {
9664                 if(!isWasmInitialized) {
9665                         throw new Error("initializeWasm() must be awaited first!");
9666                 }
9667                 const nativeResponseValue = wasm.GossipTimestampFilter_set_chain_hash(this_ptr, encodeArray(val));
9668                 // debug statements here
9669         }
9670         // uint32_t GossipTimestampFilter_get_first_timestamp(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
9671         export function GossipTimestampFilter_get_first_timestamp(this_ptr: number): number {
9672                 if(!isWasmInitialized) {
9673                         throw new Error("initializeWasm() must be awaited first!");
9674                 }
9675                 const nativeResponseValue = wasm.GossipTimestampFilter_get_first_timestamp(this_ptr);
9676                 return nativeResponseValue;
9677         }
9678         // void GossipTimestampFilter_set_first_timestamp(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
9679         export function GossipTimestampFilter_set_first_timestamp(this_ptr: number, val: number): void {
9680                 if(!isWasmInitialized) {
9681                         throw new Error("initializeWasm() must be awaited first!");
9682                 }
9683                 const nativeResponseValue = wasm.GossipTimestampFilter_set_first_timestamp(this_ptr, val);
9684                 // debug statements here
9685         }
9686         // uint32_t GossipTimestampFilter_get_timestamp_range(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
9687         export function GossipTimestampFilter_get_timestamp_range(this_ptr: number): number {
9688                 if(!isWasmInitialized) {
9689                         throw new Error("initializeWasm() must be awaited first!");
9690                 }
9691                 const nativeResponseValue = wasm.GossipTimestampFilter_get_timestamp_range(this_ptr);
9692                 return nativeResponseValue;
9693         }
9694         // void GossipTimestampFilter_set_timestamp_range(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
9695         export function GossipTimestampFilter_set_timestamp_range(this_ptr: number, val: number): void {
9696                 if(!isWasmInitialized) {
9697                         throw new Error("initializeWasm() must be awaited first!");
9698                 }
9699                 const nativeResponseValue = wasm.GossipTimestampFilter_set_timestamp_range(this_ptr, val);
9700                 // debug statements here
9701         }
9702         // MUST_USE_RES struct LDKGossipTimestampFilter GossipTimestampFilter_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_timestamp_arg, uint32_t timestamp_range_arg);
9703         export function GossipTimestampFilter_new(chain_hash_arg: Uint8Array, first_timestamp_arg: number, timestamp_range_arg: number): number {
9704                 if(!isWasmInitialized) {
9705                         throw new Error("initializeWasm() must be awaited first!");
9706                 }
9707                 const nativeResponseValue = wasm.GossipTimestampFilter_new(encodeArray(chain_hash_arg), first_timestamp_arg, timestamp_range_arg);
9708                 return nativeResponseValue;
9709         }
9710         // struct LDKGossipTimestampFilter GossipTimestampFilter_clone(const struct LDKGossipTimestampFilter *NONNULL_PTR orig);
9711         export function GossipTimestampFilter_clone(orig: number): number {
9712                 if(!isWasmInitialized) {
9713                         throw new Error("initializeWasm() must be awaited first!");
9714                 }
9715                 const nativeResponseValue = wasm.GossipTimestampFilter_clone(orig);
9716                 return nativeResponseValue;
9717         }
9718         // void ErrorAction_free(struct LDKErrorAction this_ptr);
9719         export function ErrorAction_free(this_ptr: number): void {
9720                 if(!isWasmInitialized) {
9721                         throw new Error("initializeWasm() must be awaited first!");
9722                 }
9723                 const nativeResponseValue = wasm.ErrorAction_free(this_ptr);
9724                 // debug statements here
9725         }
9726         // struct LDKErrorAction ErrorAction_clone(const struct LDKErrorAction *NONNULL_PTR orig);
9727         export function ErrorAction_clone(orig: number): number {
9728                 if(!isWasmInitialized) {
9729                         throw new Error("initializeWasm() must be awaited first!");
9730                 }
9731                 const nativeResponseValue = wasm.ErrorAction_clone(orig);
9732                 return nativeResponseValue;
9733         }
9734         // void LightningError_free(struct LDKLightningError this_obj);
9735         export function LightningError_free(this_obj: number): void {
9736                 if(!isWasmInitialized) {
9737                         throw new Error("initializeWasm() must be awaited first!");
9738                 }
9739                 const nativeResponseValue = wasm.LightningError_free(this_obj);
9740                 // debug statements here
9741         }
9742         // struct LDKStr LightningError_get_err(const struct LDKLightningError *NONNULL_PTR this_ptr);
9743         export function LightningError_get_err(this_ptr: number): String {
9744                 if(!isWasmInitialized) {
9745                         throw new Error("initializeWasm() must be awaited first!");
9746                 }
9747                 const nativeResponseValue = wasm.LightningError_get_err(this_ptr);
9748                 return nativeResponseValue;
9749         }
9750         // void LightningError_set_err(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
9751         export function LightningError_set_err(this_ptr: number, val: Uint8Array): void {
9752                 if(!isWasmInitialized) {
9753                         throw new Error("initializeWasm() must be awaited first!");
9754                 }
9755                 const nativeResponseValue = wasm.LightningError_set_err(this_ptr, encodeArray(val));
9756                 // debug statements here
9757         }
9758         // struct LDKErrorAction LightningError_get_action(const struct LDKLightningError *NONNULL_PTR this_ptr);
9759         export function LightningError_get_action(this_ptr: number): number {
9760                 if(!isWasmInitialized) {
9761                         throw new Error("initializeWasm() must be awaited first!");
9762                 }
9763                 const nativeResponseValue = wasm.LightningError_get_action(this_ptr);
9764                 return nativeResponseValue;
9765         }
9766         // void LightningError_set_action(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKErrorAction val);
9767         export function LightningError_set_action(this_ptr: number, val: number): void {
9768                 if(!isWasmInitialized) {
9769                         throw new Error("initializeWasm() must be awaited first!");
9770                 }
9771                 const nativeResponseValue = wasm.LightningError_set_action(this_ptr, val);
9772                 // debug statements here
9773         }
9774         // MUST_USE_RES struct LDKLightningError LightningError_new(struct LDKCVec_u8Z err_arg, struct LDKErrorAction action_arg);
9775         export function LightningError_new(err_arg: Uint8Array, action_arg: number): number {
9776                 if(!isWasmInitialized) {
9777                         throw new Error("initializeWasm() must be awaited first!");
9778                 }
9779                 const nativeResponseValue = wasm.LightningError_new(encodeArray(err_arg), action_arg);
9780                 return nativeResponseValue;
9781         }
9782         // struct LDKLightningError LightningError_clone(const struct LDKLightningError *NONNULL_PTR orig);
9783         export function LightningError_clone(orig: number): number {
9784                 if(!isWasmInitialized) {
9785                         throw new Error("initializeWasm() must be awaited first!");
9786                 }
9787                 const nativeResponseValue = wasm.LightningError_clone(orig);
9788                 return nativeResponseValue;
9789         }
9790         // void CommitmentUpdate_free(struct LDKCommitmentUpdate this_obj);
9791         export function CommitmentUpdate_free(this_obj: number): void {
9792                 if(!isWasmInitialized) {
9793                         throw new Error("initializeWasm() must be awaited first!");
9794                 }
9795                 const nativeResponseValue = wasm.CommitmentUpdate_free(this_obj);
9796                 // debug statements here
9797         }
9798         // void CommitmentUpdate_set_update_add_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateAddHTLCZ val);
9799         export function CommitmentUpdate_set_update_add_htlcs(this_ptr: number, val: number[]): void {
9800                 if(!isWasmInitialized) {
9801                         throw new Error("initializeWasm() must be awaited first!");
9802                 }
9803                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_add_htlcs(this_ptr, val);
9804                 // debug statements here
9805         }
9806         // void CommitmentUpdate_set_update_fulfill_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFulfillHTLCZ val);
9807         export function CommitmentUpdate_set_update_fulfill_htlcs(this_ptr: number, val: number[]): void {
9808                 if(!isWasmInitialized) {
9809                         throw new Error("initializeWasm() must be awaited first!");
9810                 }
9811                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fulfill_htlcs(this_ptr, val);
9812                 // debug statements here
9813         }
9814         // void CommitmentUpdate_set_update_fail_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailHTLCZ val);
9815         export function CommitmentUpdate_set_update_fail_htlcs(this_ptr: number, val: number[]): void {
9816                 if(!isWasmInitialized) {
9817                         throw new Error("initializeWasm() must be awaited first!");
9818                 }
9819                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fail_htlcs(this_ptr, val);
9820                 // debug statements here
9821         }
9822         // void CommitmentUpdate_set_update_fail_malformed_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailMalformedHTLCZ val);
9823         export function CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr: number, val: number[]): void {
9824                 if(!isWasmInitialized) {
9825                         throw new Error("initializeWasm() must be awaited first!");
9826                 }
9827                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr, val);
9828                 // debug statements here
9829         }
9830         // struct LDKUpdateFee CommitmentUpdate_get_update_fee(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
9831         export function CommitmentUpdate_get_update_fee(this_ptr: number): number {
9832                 if(!isWasmInitialized) {
9833                         throw new Error("initializeWasm() must be awaited first!");
9834                 }
9835                 const nativeResponseValue = wasm.CommitmentUpdate_get_update_fee(this_ptr);
9836                 return nativeResponseValue;
9837         }
9838         // void CommitmentUpdate_set_update_fee(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKUpdateFee val);
9839         export function CommitmentUpdate_set_update_fee(this_ptr: number, val: number): void {
9840                 if(!isWasmInitialized) {
9841                         throw new Error("initializeWasm() must be awaited first!");
9842                 }
9843                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fee(this_ptr, val);
9844                 // debug statements here
9845         }
9846         // struct LDKCommitmentSigned CommitmentUpdate_get_commitment_signed(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
9847         export function CommitmentUpdate_get_commitment_signed(this_ptr: number): number {
9848                 if(!isWasmInitialized) {
9849                         throw new Error("initializeWasm() must be awaited first!");
9850                 }
9851                 const nativeResponseValue = wasm.CommitmentUpdate_get_commitment_signed(this_ptr);
9852                 return nativeResponseValue;
9853         }
9854         // void CommitmentUpdate_set_commitment_signed(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCommitmentSigned val);
9855         export function CommitmentUpdate_set_commitment_signed(this_ptr: number, val: number): void {
9856                 if(!isWasmInitialized) {
9857                         throw new Error("initializeWasm() must be awaited first!");
9858                 }
9859                 const nativeResponseValue = wasm.CommitmentUpdate_set_commitment_signed(this_ptr, val);
9860                 // debug statements here
9861         }
9862         // 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);
9863         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 {
9864                 if(!isWasmInitialized) {
9865                         throw new Error("initializeWasm() must be awaited first!");
9866                 }
9867                 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);
9868                 return nativeResponseValue;
9869         }
9870         // struct LDKCommitmentUpdate CommitmentUpdate_clone(const struct LDKCommitmentUpdate *NONNULL_PTR orig);
9871         export function CommitmentUpdate_clone(orig: number): number {
9872                 if(!isWasmInitialized) {
9873                         throw new Error("initializeWasm() must be awaited first!");
9874                 }
9875                 const nativeResponseValue = wasm.CommitmentUpdate_clone(orig);
9876                 return nativeResponseValue;
9877         }
9878         // void HTLCFailChannelUpdate_free(struct LDKHTLCFailChannelUpdate this_ptr);
9879         export function HTLCFailChannelUpdate_free(this_ptr: number): void {
9880                 if(!isWasmInitialized) {
9881                         throw new Error("initializeWasm() must be awaited first!");
9882                 }
9883                 const nativeResponseValue = wasm.HTLCFailChannelUpdate_free(this_ptr);
9884                 // debug statements here
9885         }
9886         // struct LDKHTLCFailChannelUpdate HTLCFailChannelUpdate_clone(const struct LDKHTLCFailChannelUpdate *NONNULL_PTR orig);
9887         export function HTLCFailChannelUpdate_clone(orig: number): number {
9888                 if(!isWasmInitialized) {
9889                         throw new Error("initializeWasm() must be awaited first!");
9890                 }
9891                 const nativeResponseValue = wasm.HTLCFailChannelUpdate_clone(orig);
9892                 return nativeResponseValue;
9893         }
9894         // void ChannelMessageHandler_free(struct LDKChannelMessageHandler this_ptr);
9895         export function ChannelMessageHandler_free(this_ptr: number): void {
9896                 if(!isWasmInitialized) {
9897                         throw new Error("initializeWasm() must be awaited first!");
9898                 }
9899                 const nativeResponseValue = wasm.ChannelMessageHandler_free(this_ptr);
9900                 // debug statements here
9901         }
9902         // void RoutingMessageHandler_free(struct LDKRoutingMessageHandler this_ptr);
9903         export function RoutingMessageHandler_free(this_ptr: number): void {
9904                 if(!isWasmInitialized) {
9905                         throw new Error("initializeWasm() must be awaited first!");
9906                 }
9907                 const nativeResponseValue = wasm.RoutingMessageHandler_free(this_ptr);
9908                 // debug statements here
9909         }
9910         // struct LDKCVec_u8Z AcceptChannel_write(const struct LDKAcceptChannel *NONNULL_PTR obj);
9911         export function AcceptChannel_write(obj: number): Uint8Array {
9912                 if(!isWasmInitialized) {
9913                         throw new Error("initializeWasm() must be awaited first!");
9914                 }
9915                 const nativeResponseValue = wasm.AcceptChannel_write(obj);
9916                 return decodeArray(nativeResponseValue);
9917         }
9918         // struct LDKCResult_AcceptChannelDecodeErrorZ AcceptChannel_read(struct LDKu8slice ser);
9919         export function AcceptChannel_read(ser: Uint8Array): number {
9920                 if(!isWasmInitialized) {
9921                         throw new Error("initializeWasm() must be awaited first!");
9922                 }
9923                 const nativeResponseValue = wasm.AcceptChannel_read(encodeArray(ser));
9924                 return nativeResponseValue;
9925         }
9926         // struct LDKCVec_u8Z AnnouncementSignatures_write(const struct LDKAnnouncementSignatures *NONNULL_PTR obj);
9927         export function AnnouncementSignatures_write(obj: number): Uint8Array {
9928                 if(!isWasmInitialized) {
9929                         throw new Error("initializeWasm() must be awaited first!");
9930                 }
9931                 const nativeResponseValue = wasm.AnnouncementSignatures_write(obj);
9932                 return decodeArray(nativeResponseValue);
9933         }
9934         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ AnnouncementSignatures_read(struct LDKu8slice ser);
9935         export function AnnouncementSignatures_read(ser: Uint8Array): number {
9936                 if(!isWasmInitialized) {
9937                         throw new Error("initializeWasm() must be awaited first!");
9938                 }
9939                 const nativeResponseValue = wasm.AnnouncementSignatures_read(encodeArray(ser));
9940                 return nativeResponseValue;
9941         }
9942         // struct LDKCVec_u8Z ChannelReestablish_write(const struct LDKChannelReestablish *NONNULL_PTR obj);
9943         export function ChannelReestablish_write(obj: number): Uint8Array {
9944                 if(!isWasmInitialized) {
9945                         throw new Error("initializeWasm() must be awaited first!");
9946                 }
9947                 const nativeResponseValue = wasm.ChannelReestablish_write(obj);
9948                 return decodeArray(nativeResponseValue);
9949         }
9950         // struct LDKCResult_ChannelReestablishDecodeErrorZ ChannelReestablish_read(struct LDKu8slice ser);
9951         export function ChannelReestablish_read(ser: Uint8Array): number {
9952                 if(!isWasmInitialized) {
9953                         throw new Error("initializeWasm() must be awaited first!");
9954                 }
9955                 const nativeResponseValue = wasm.ChannelReestablish_read(encodeArray(ser));
9956                 return nativeResponseValue;
9957         }
9958         // struct LDKCVec_u8Z ClosingSigned_write(const struct LDKClosingSigned *NONNULL_PTR obj);
9959         export function ClosingSigned_write(obj: number): Uint8Array {
9960                 if(!isWasmInitialized) {
9961                         throw new Error("initializeWasm() must be awaited first!");
9962                 }
9963                 const nativeResponseValue = wasm.ClosingSigned_write(obj);
9964                 return decodeArray(nativeResponseValue);
9965         }
9966         // struct LDKCResult_ClosingSignedDecodeErrorZ ClosingSigned_read(struct LDKu8slice ser);
9967         export function ClosingSigned_read(ser: Uint8Array): number {
9968                 if(!isWasmInitialized) {
9969                         throw new Error("initializeWasm() must be awaited first!");
9970                 }
9971                 const nativeResponseValue = wasm.ClosingSigned_read(encodeArray(ser));
9972                 return nativeResponseValue;
9973         }
9974         // struct LDKCVec_u8Z CommitmentSigned_write(const struct LDKCommitmentSigned *NONNULL_PTR obj);
9975         export function CommitmentSigned_write(obj: number): Uint8Array {
9976                 if(!isWasmInitialized) {
9977                         throw new Error("initializeWasm() must be awaited first!");
9978                 }
9979                 const nativeResponseValue = wasm.CommitmentSigned_write(obj);
9980                 return decodeArray(nativeResponseValue);
9981         }
9982         // struct LDKCResult_CommitmentSignedDecodeErrorZ CommitmentSigned_read(struct LDKu8slice ser);
9983         export function CommitmentSigned_read(ser: Uint8Array): number {
9984                 if(!isWasmInitialized) {
9985                         throw new Error("initializeWasm() must be awaited first!");
9986                 }
9987                 const nativeResponseValue = wasm.CommitmentSigned_read(encodeArray(ser));
9988                 return nativeResponseValue;
9989         }
9990         // struct LDKCVec_u8Z FundingCreated_write(const struct LDKFundingCreated *NONNULL_PTR obj);
9991         export function FundingCreated_write(obj: number): Uint8Array {
9992                 if(!isWasmInitialized) {
9993                         throw new Error("initializeWasm() must be awaited first!");
9994                 }
9995                 const nativeResponseValue = wasm.FundingCreated_write(obj);
9996                 return decodeArray(nativeResponseValue);
9997         }
9998         // struct LDKCResult_FundingCreatedDecodeErrorZ FundingCreated_read(struct LDKu8slice ser);
9999         export function FundingCreated_read(ser: Uint8Array): number {
10000                 if(!isWasmInitialized) {
10001                         throw new Error("initializeWasm() must be awaited first!");
10002                 }
10003                 const nativeResponseValue = wasm.FundingCreated_read(encodeArray(ser));
10004                 return nativeResponseValue;
10005         }
10006         // struct LDKCVec_u8Z FundingSigned_write(const struct LDKFundingSigned *NONNULL_PTR obj);
10007         export function FundingSigned_write(obj: number): Uint8Array {
10008                 if(!isWasmInitialized) {
10009                         throw new Error("initializeWasm() must be awaited first!");
10010                 }
10011                 const nativeResponseValue = wasm.FundingSigned_write(obj);
10012                 return decodeArray(nativeResponseValue);
10013         }
10014         // struct LDKCResult_FundingSignedDecodeErrorZ FundingSigned_read(struct LDKu8slice ser);
10015         export function FundingSigned_read(ser: Uint8Array): number {
10016                 if(!isWasmInitialized) {
10017                         throw new Error("initializeWasm() must be awaited first!");
10018                 }
10019                 const nativeResponseValue = wasm.FundingSigned_read(encodeArray(ser));
10020                 return nativeResponseValue;
10021         }
10022         // struct LDKCVec_u8Z FundingLocked_write(const struct LDKFundingLocked *NONNULL_PTR obj);
10023         export function FundingLocked_write(obj: number): Uint8Array {
10024                 if(!isWasmInitialized) {
10025                         throw new Error("initializeWasm() must be awaited first!");
10026                 }
10027                 const nativeResponseValue = wasm.FundingLocked_write(obj);
10028                 return decodeArray(nativeResponseValue);
10029         }
10030         // struct LDKCResult_FundingLockedDecodeErrorZ FundingLocked_read(struct LDKu8slice ser);
10031         export function FundingLocked_read(ser: Uint8Array): number {
10032                 if(!isWasmInitialized) {
10033                         throw new Error("initializeWasm() must be awaited first!");
10034                 }
10035                 const nativeResponseValue = wasm.FundingLocked_read(encodeArray(ser));
10036                 return nativeResponseValue;
10037         }
10038         // struct LDKCVec_u8Z Init_write(const struct LDKInit *NONNULL_PTR obj);
10039         export function Init_write(obj: number): Uint8Array {
10040                 if(!isWasmInitialized) {
10041                         throw new Error("initializeWasm() must be awaited first!");
10042                 }
10043                 const nativeResponseValue = wasm.Init_write(obj);
10044                 return decodeArray(nativeResponseValue);
10045         }
10046         // struct LDKCResult_InitDecodeErrorZ Init_read(struct LDKu8slice ser);
10047         export function Init_read(ser: Uint8Array): number {
10048                 if(!isWasmInitialized) {
10049                         throw new Error("initializeWasm() must be awaited first!");
10050                 }
10051                 const nativeResponseValue = wasm.Init_read(encodeArray(ser));
10052                 return nativeResponseValue;
10053         }
10054         // struct LDKCVec_u8Z OpenChannel_write(const struct LDKOpenChannel *NONNULL_PTR obj);
10055         export function OpenChannel_write(obj: number): Uint8Array {
10056                 if(!isWasmInitialized) {
10057                         throw new Error("initializeWasm() must be awaited first!");
10058                 }
10059                 const nativeResponseValue = wasm.OpenChannel_write(obj);
10060                 return decodeArray(nativeResponseValue);
10061         }
10062         // struct LDKCResult_OpenChannelDecodeErrorZ OpenChannel_read(struct LDKu8slice ser);
10063         export function OpenChannel_read(ser: Uint8Array): number {
10064                 if(!isWasmInitialized) {
10065                         throw new Error("initializeWasm() must be awaited first!");
10066                 }
10067                 const nativeResponseValue = wasm.OpenChannel_read(encodeArray(ser));
10068                 return nativeResponseValue;
10069         }
10070         // struct LDKCVec_u8Z RevokeAndACK_write(const struct LDKRevokeAndACK *NONNULL_PTR obj);
10071         export function RevokeAndACK_write(obj: number): Uint8Array {
10072                 if(!isWasmInitialized) {
10073                         throw new Error("initializeWasm() must be awaited first!");
10074                 }
10075                 const nativeResponseValue = wasm.RevokeAndACK_write(obj);
10076                 return decodeArray(nativeResponseValue);
10077         }
10078         // struct LDKCResult_RevokeAndACKDecodeErrorZ RevokeAndACK_read(struct LDKu8slice ser);
10079         export function RevokeAndACK_read(ser: Uint8Array): number {
10080                 if(!isWasmInitialized) {
10081                         throw new Error("initializeWasm() must be awaited first!");
10082                 }
10083                 const nativeResponseValue = wasm.RevokeAndACK_read(encodeArray(ser));
10084                 return nativeResponseValue;
10085         }
10086         // struct LDKCVec_u8Z Shutdown_write(const struct LDKShutdown *NONNULL_PTR obj);
10087         export function Shutdown_write(obj: number): Uint8Array {
10088                 if(!isWasmInitialized) {
10089                         throw new Error("initializeWasm() must be awaited first!");
10090                 }
10091                 const nativeResponseValue = wasm.Shutdown_write(obj);
10092                 return decodeArray(nativeResponseValue);
10093         }
10094         // struct LDKCResult_ShutdownDecodeErrorZ Shutdown_read(struct LDKu8slice ser);
10095         export function Shutdown_read(ser: Uint8Array): number {
10096                 if(!isWasmInitialized) {
10097                         throw new Error("initializeWasm() must be awaited first!");
10098                 }
10099                 const nativeResponseValue = wasm.Shutdown_read(encodeArray(ser));
10100                 return nativeResponseValue;
10101         }
10102         // struct LDKCVec_u8Z UpdateFailHTLC_write(const struct LDKUpdateFailHTLC *NONNULL_PTR obj);
10103         export function UpdateFailHTLC_write(obj: number): Uint8Array {
10104                 if(!isWasmInitialized) {
10105                         throw new Error("initializeWasm() must be awaited first!");
10106                 }
10107                 const nativeResponseValue = wasm.UpdateFailHTLC_write(obj);
10108                 return decodeArray(nativeResponseValue);
10109         }
10110         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ UpdateFailHTLC_read(struct LDKu8slice ser);
10111         export function UpdateFailHTLC_read(ser: Uint8Array): number {
10112                 if(!isWasmInitialized) {
10113                         throw new Error("initializeWasm() must be awaited first!");
10114                 }
10115                 const nativeResponseValue = wasm.UpdateFailHTLC_read(encodeArray(ser));
10116                 return nativeResponseValue;
10117         }
10118         // struct LDKCVec_u8Z UpdateFailMalformedHTLC_write(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR obj);
10119         export function UpdateFailMalformedHTLC_write(obj: number): Uint8Array {
10120                 if(!isWasmInitialized) {
10121                         throw new Error("initializeWasm() must be awaited first!");
10122                 }
10123                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_write(obj);
10124                 return decodeArray(nativeResponseValue);
10125         }
10126         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ UpdateFailMalformedHTLC_read(struct LDKu8slice ser);
10127         export function UpdateFailMalformedHTLC_read(ser: Uint8Array): number {
10128                 if(!isWasmInitialized) {
10129                         throw new Error("initializeWasm() must be awaited first!");
10130                 }
10131                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_read(encodeArray(ser));
10132                 return nativeResponseValue;
10133         }
10134         // struct LDKCVec_u8Z UpdateFee_write(const struct LDKUpdateFee *NONNULL_PTR obj);
10135         export function UpdateFee_write(obj: number): Uint8Array {
10136                 if(!isWasmInitialized) {
10137                         throw new Error("initializeWasm() must be awaited first!");
10138                 }
10139                 const nativeResponseValue = wasm.UpdateFee_write(obj);
10140                 return decodeArray(nativeResponseValue);
10141         }
10142         // struct LDKCResult_UpdateFeeDecodeErrorZ UpdateFee_read(struct LDKu8slice ser);
10143         export function UpdateFee_read(ser: Uint8Array): number {
10144                 if(!isWasmInitialized) {
10145                         throw new Error("initializeWasm() must be awaited first!");
10146                 }
10147                 const nativeResponseValue = wasm.UpdateFee_read(encodeArray(ser));
10148                 return nativeResponseValue;
10149         }
10150         // struct LDKCVec_u8Z UpdateFulfillHTLC_write(const struct LDKUpdateFulfillHTLC *NONNULL_PTR obj);
10151         export function UpdateFulfillHTLC_write(obj: number): Uint8Array {
10152                 if(!isWasmInitialized) {
10153                         throw new Error("initializeWasm() must be awaited first!");
10154                 }
10155                 const nativeResponseValue = wasm.UpdateFulfillHTLC_write(obj);
10156                 return decodeArray(nativeResponseValue);
10157         }
10158         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ UpdateFulfillHTLC_read(struct LDKu8slice ser);
10159         export function UpdateFulfillHTLC_read(ser: Uint8Array): number {
10160                 if(!isWasmInitialized) {
10161                         throw new Error("initializeWasm() must be awaited first!");
10162                 }
10163                 const nativeResponseValue = wasm.UpdateFulfillHTLC_read(encodeArray(ser));
10164                 return nativeResponseValue;
10165         }
10166         // struct LDKCVec_u8Z UpdateAddHTLC_write(const struct LDKUpdateAddHTLC *NONNULL_PTR obj);
10167         export function UpdateAddHTLC_write(obj: number): Uint8Array {
10168                 if(!isWasmInitialized) {
10169                         throw new Error("initializeWasm() must be awaited first!");
10170                 }
10171                 const nativeResponseValue = wasm.UpdateAddHTLC_write(obj);
10172                 return decodeArray(nativeResponseValue);
10173         }
10174         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ UpdateAddHTLC_read(struct LDKu8slice ser);
10175         export function UpdateAddHTLC_read(ser: Uint8Array): number {
10176                 if(!isWasmInitialized) {
10177                         throw new Error("initializeWasm() must be awaited first!");
10178                 }
10179                 const nativeResponseValue = wasm.UpdateAddHTLC_read(encodeArray(ser));
10180                 return nativeResponseValue;
10181         }
10182         // struct LDKCVec_u8Z Ping_write(const struct LDKPing *NONNULL_PTR obj);
10183         export function Ping_write(obj: number): Uint8Array {
10184                 if(!isWasmInitialized) {
10185                         throw new Error("initializeWasm() must be awaited first!");
10186                 }
10187                 const nativeResponseValue = wasm.Ping_write(obj);
10188                 return decodeArray(nativeResponseValue);
10189         }
10190         // struct LDKCResult_PingDecodeErrorZ Ping_read(struct LDKu8slice ser);
10191         export function Ping_read(ser: Uint8Array): number {
10192                 if(!isWasmInitialized) {
10193                         throw new Error("initializeWasm() must be awaited first!");
10194                 }
10195                 const nativeResponseValue = wasm.Ping_read(encodeArray(ser));
10196                 return nativeResponseValue;
10197         }
10198         // struct LDKCVec_u8Z Pong_write(const struct LDKPong *NONNULL_PTR obj);
10199         export function Pong_write(obj: number): Uint8Array {
10200                 if(!isWasmInitialized) {
10201                         throw new Error("initializeWasm() must be awaited first!");
10202                 }
10203                 const nativeResponseValue = wasm.Pong_write(obj);
10204                 return decodeArray(nativeResponseValue);
10205         }
10206         // struct LDKCResult_PongDecodeErrorZ Pong_read(struct LDKu8slice ser);
10207         export function Pong_read(ser: Uint8Array): number {
10208                 if(!isWasmInitialized) {
10209                         throw new Error("initializeWasm() must be awaited first!");
10210                 }
10211                 const nativeResponseValue = wasm.Pong_read(encodeArray(ser));
10212                 return nativeResponseValue;
10213         }
10214         // struct LDKCVec_u8Z UnsignedChannelAnnouncement_write(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR obj);
10215         export function UnsignedChannelAnnouncement_write(obj: number): Uint8Array {
10216                 if(!isWasmInitialized) {
10217                         throw new Error("initializeWasm() must be awaited first!");
10218                 }
10219                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_write(obj);
10220                 return decodeArray(nativeResponseValue);
10221         }
10222         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ UnsignedChannelAnnouncement_read(struct LDKu8slice ser);
10223         export function UnsignedChannelAnnouncement_read(ser: Uint8Array): number {
10224                 if(!isWasmInitialized) {
10225                         throw new Error("initializeWasm() must be awaited first!");
10226                 }
10227                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_read(encodeArray(ser));
10228                 return nativeResponseValue;
10229         }
10230         // struct LDKCVec_u8Z ChannelAnnouncement_write(const struct LDKChannelAnnouncement *NONNULL_PTR obj);
10231         export function ChannelAnnouncement_write(obj: number): Uint8Array {
10232                 if(!isWasmInitialized) {
10233                         throw new Error("initializeWasm() must be awaited first!");
10234                 }
10235                 const nativeResponseValue = wasm.ChannelAnnouncement_write(obj);
10236                 return decodeArray(nativeResponseValue);
10237         }
10238         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ ChannelAnnouncement_read(struct LDKu8slice ser);
10239         export function ChannelAnnouncement_read(ser: Uint8Array): number {
10240                 if(!isWasmInitialized) {
10241                         throw new Error("initializeWasm() must be awaited first!");
10242                 }
10243                 const nativeResponseValue = wasm.ChannelAnnouncement_read(encodeArray(ser));
10244                 return nativeResponseValue;
10245         }
10246         // struct LDKCVec_u8Z UnsignedChannelUpdate_write(const struct LDKUnsignedChannelUpdate *NONNULL_PTR obj);
10247         export function UnsignedChannelUpdate_write(obj: number): Uint8Array {
10248                 if(!isWasmInitialized) {
10249                         throw new Error("initializeWasm() must be awaited first!");
10250                 }
10251                 const nativeResponseValue = wasm.UnsignedChannelUpdate_write(obj);
10252                 return decodeArray(nativeResponseValue);
10253         }
10254         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ UnsignedChannelUpdate_read(struct LDKu8slice ser);
10255         export function UnsignedChannelUpdate_read(ser: Uint8Array): number {
10256                 if(!isWasmInitialized) {
10257                         throw new Error("initializeWasm() must be awaited first!");
10258                 }
10259                 const nativeResponseValue = wasm.UnsignedChannelUpdate_read(encodeArray(ser));
10260                 return nativeResponseValue;
10261         }
10262         // struct LDKCVec_u8Z ChannelUpdate_write(const struct LDKChannelUpdate *NONNULL_PTR obj);
10263         export function ChannelUpdate_write(obj: number): Uint8Array {
10264                 if(!isWasmInitialized) {
10265                         throw new Error("initializeWasm() must be awaited first!");
10266                 }
10267                 const nativeResponseValue = wasm.ChannelUpdate_write(obj);
10268                 return decodeArray(nativeResponseValue);
10269         }
10270         // struct LDKCResult_ChannelUpdateDecodeErrorZ ChannelUpdate_read(struct LDKu8slice ser);
10271         export function ChannelUpdate_read(ser: Uint8Array): number {
10272                 if(!isWasmInitialized) {
10273                         throw new Error("initializeWasm() must be awaited first!");
10274                 }
10275                 const nativeResponseValue = wasm.ChannelUpdate_read(encodeArray(ser));
10276                 return nativeResponseValue;
10277         }
10278         // struct LDKCVec_u8Z ErrorMessage_write(const struct LDKErrorMessage *NONNULL_PTR obj);
10279         export function ErrorMessage_write(obj: number): Uint8Array {
10280                 if(!isWasmInitialized) {
10281                         throw new Error("initializeWasm() must be awaited first!");
10282                 }
10283                 const nativeResponseValue = wasm.ErrorMessage_write(obj);
10284                 return decodeArray(nativeResponseValue);
10285         }
10286         // struct LDKCResult_ErrorMessageDecodeErrorZ ErrorMessage_read(struct LDKu8slice ser);
10287         export function ErrorMessage_read(ser: Uint8Array): number {
10288                 if(!isWasmInitialized) {
10289                         throw new Error("initializeWasm() must be awaited first!");
10290                 }
10291                 const nativeResponseValue = wasm.ErrorMessage_read(encodeArray(ser));
10292                 return nativeResponseValue;
10293         }
10294         // struct LDKCVec_u8Z UnsignedNodeAnnouncement_write(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR obj);
10295         export function UnsignedNodeAnnouncement_write(obj: number): Uint8Array {
10296                 if(!isWasmInitialized) {
10297                         throw new Error("initializeWasm() must be awaited first!");
10298                 }
10299                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_write(obj);
10300                 return decodeArray(nativeResponseValue);
10301         }
10302         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ UnsignedNodeAnnouncement_read(struct LDKu8slice ser);
10303         export function UnsignedNodeAnnouncement_read(ser: Uint8Array): number {
10304                 if(!isWasmInitialized) {
10305                         throw new Error("initializeWasm() must be awaited first!");
10306                 }
10307                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_read(encodeArray(ser));
10308                 return nativeResponseValue;
10309         }
10310         // struct LDKCVec_u8Z NodeAnnouncement_write(const struct LDKNodeAnnouncement *NONNULL_PTR obj);
10311         export function NodeAnnouncement_write(obj: number): Uint8Array {
10312                 if(!isWasmInitialized) {
10313                         throw new Error("initializeWasm() must be awaited first!");
10314                 }
10315                 const nativeResponseValue = wasm.NodeAnnouncement_write(obj);
10316                 return decodeArray(nativeResponseValue);
10317         }
10318         // struct LDKCResult_NodeAnnouncementDecodeErrorZ NodeAnnouncement_read(struct LDKu8slice ser);
10319         export function NodeAnnouncement_read(ser: Uint8Array): number {
10320                 if(!isWasmInitialized) {
10321                         throw new Error("initializeWasm() must be awaited first!");
10322                 }
10323                 const nativeResponseValue = wasm.NodeAnnouncement_read(encodeArray(ser));
10324                 return nativeResponseValue;
10325         }
10326         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ QueryShortChannelIds_read(struct LDKu8slice ser);
10327         export function QueryShortChannelIds_read(ser: Uint8Array): number {
10328                 if(!isWasmInitialized) {
10329                         throw new Error("initializeWasm() must be awaited first!");
10330                 }
10331                 const nativeResponseValue = wasm.QueryShortChannelIds_read(encodeArray(ser));
10332                 return nativeResponseValue;
10333         }
10334         // struct LDKCVec_u8Z QueryShortChannelIds_write(const struct LDKQueryShortChannelIds *NONNULL_PTR obj);
10335         export function QueryShortChannelIds_write(obj: number): Uint8Array {
10336                 if(!isWasmInitialized) {
10337                         throw new Error("initializeWasm() must be awaited first!");
10338                 }
10339                 const nativeResponseValue = wasm.QueryShortChannelIds_write(obj);
10340                 return decodeArray(nativeResponseValue);
10341         }
10342         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ ReplyShortChannelIdsEnd_read(struct LDKu8slice ser);
10343         export function ReplyShortChannelIdsEnd_read(ser: Uint8Array): number {
10344                 if(!isWasmInitialized) {
10345                         throw new Error("initializeWasm() must be awaited first!");
10346                 }
10347                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_read(encodeArray(ser));
10348                 return nativeResponseValue;
10349         }
10350         // struct LDKCVec_u8Z ReplyShortChannelIdsEnd_write(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR obj);
10351         export function ReplyShortChannelIdsEnd_write(obj: number): Uint8Array {
10352                 if(!isWasmInitialized) {
10353                         throw new Error("initializeWasm() must be awaited first!");
10354                 }
10355                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_write(obj);
10356                 return decodeArray(nativeResponseValue);
10357         }
10358         // MUST_USE_RES uint32_t QueryChannelRange_end_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_arg);
10359         export function QueryChannelRange_end_blocknum(this_arg: number): number {
10360                 if(!isWasmInitialized) {
10361                         throw new Error("initializeWasm() must be awaited first!");
10362                 }
10363                 const nativeResponseValue = wasm.QueryChannelRange_end_blocknum(this_arg);
10364                 return nativeResponseValue;
10365         }
10366         // struct LDKCResult_QueryChannelRangeDecodeErrorZ QueryChannelRange_read(struct LDKu8slice ser);
10367         export function QueryChannelRange_read(ser: Uint8Array): number {
10368                 if(!isWasmInitialized) {
10369                         throw new Error("initializeWasm() must be awaited first!");
10370                 }
10371                 const nativeResponseValue = wasm.QueryChannelRange_read(encodeArray(ser));
10372                 return nativeResponseValue;
10373         }
10374         // struct LDKCVec_u8Z QueryChannelRange_write(const struct LDKQueryChannelRange *NONNULL_PTR obj);
10375         export function QueryChannelRange_write(obj: number): Uint8Array {
10376                 if(!isWasmInitialized) {
10377                         throw new Error("initializeWasm() must be awaited first!");
10378                 }
10379                 const nativeResponseValue = wasm.QueryChannelRange_write(obj);
10380                 return decodeArray(nativeResponseValue);
10381         }
10382         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ ReplyChannelRange_read(struct LDKu8slice ser);
10383         export function ReplyChannelRange_read(ser: Uint8Array): number {
10384                 if(!isWasmInitialized) {
10385                         throw new Error("initializeWasm() must be awaited first!");
10386                 }
10387                 const nativeResponseValue = wasm.ReplyChannelRange_read(encodeArray(ser));
10388                 return nativeResponseValue;
10389         }
10390         // struct LDKCVec_u8Z ReplyChannelRange_write(const struct LDKReplyChannelRange *NONNULL_PTR obj);
10391         export function ReplyChannelRange_write(obj: number): Uint8Array {
10392                 if(!isWasmInitialized) {
10393                         throw new Error("initializeWasm() must be awaited first!");
10394                 }
10395                 const nativeResponseValue = wasm.ReplyChannelRange_write(obj);
10396                 return decodeArray(nativeResponseValue);
10397         }
10398         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ GossipTimestampFilter_read(struct LDKu8slice ser);
10399         export function GossipTimestampFilter_read(ser: Uint8Array): number {
10400                 if(!isWasmInitialized) {
10401                         throw new Error("initializeWasm() must be awaited first!");
10402                 }
10403                 const nativeResponseValue = wasm.GossipTimestampFilter_read(encodeArray(ser));
10404                 return nativeResponseValue;
10405         }
10406         // struct LDKCVec_u8Z GossipTimestampFilter_write(const struct LDKGossipTimestampFilter *NONNULL_PTR obj);
10407         export function GossipTimestampFilter_write(obj: number): Uint8Array {
10408                 if(!isWasmInitialized) {
10409                         throw new Error("initializeWasm() must be awaited first!");
10410                 }
10411                 const nativeResponseValue = wasm.GossipTimestampFilter_write(obj);
10412                 return decodeArray(nativeResponseValue);
10413         }
10414         // void IgnoringMessageHandler_free(struct LDKIgnoringMessageHandler this_obj);
10415         export function IgnoringMessageHandler_free(this_obj: number): void {
10416                 if(!isWasmInitialized) {
10417                         throw new Error("initializeWasm() must be awaited first!");
10418                 }
10419                 const nativeResponseValue = wasm.IgnoringMessageHandler_free(this_obj);
10420                 // debug statements here
10421         }
10422         // MUST_USE_RES struct LDKIgnoringMessageHandler IgnoringMessageHandler_new(void);
10423         export function IgnoringMessageHandler_new(): number {
10424                 if(!isWasmInitialized) {
10425                         throw new Error("initializeWasm() must be awaited first!");
10426                 }
10427                 const nativeResponseValue = wasm.IgnoringMessageHandler_new();
10428                 return nativeResponseValue;
10429         }
10430         // struct LDKMessageSendEventsProvider IgnoringMessageHandler_as_MessageSendEventsProvider(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
10431         export function IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
10432                 if(!isWasmInitialized) {
10433                         throw new Error("initializeWasm() must be awaited first!");
10434                 }
10435                 const nativeResponseValue = wasm.IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg);
10436                 return nativeResponseValue;
10437         }
10438         // struct LDKRoutingMessageHandler IgnoringMessageHandler_as_RoutingMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
10439         export function IgnoringMessageHandler_as_RoutingMessageHandler(this_arg: number): number {
10440                 if(!isWasmInitialized) {
10441                         throw new Error("initializeWasm() must be awaited first!");
10442                 }
10443                 const nativeResponseValue = wasm.IgnoringMessageHandler_as_RoutingMessageHandler(this_arg);
10444                 return nativeResponseValue;
10445         }
10446         // void ErroringMessageHandler_free(struct LDKErroringMessageHandler this_obj);
10447         export function ErroringMessageHandler_free(this_obj: number): void {
10448                 if(!isWasmInitialized) {
10449                         throw new Error("initializeWasm() must be awaited first!");
10450                 }
10451                 const nativeResponseValue = wasm.ErroringMessageHandler_free(this_obj);
10452                 // debug statements here
10453         }
10454         // MUST_USE_RES struct LDKErroringMessageHandler ErroringMessageHandler_new(void);
10455         export function ErroringMessageHandler_new(): number {
10456                 if(!isWasmInitialized) {
10457                         throw new Error("initializeWasm() must be awaited first!");
10458                 }
10459                 const nativeResponseValue = wasm.ErroringMessageHandler_new();
10460                 return nativeResponseValue;
10461         }
10462         // struct LDKMessageSendEventsProvider ErroringMessageHandler_as_MessageSendEventsProvider(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
10463         export function ErroringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
10464                 if(!isWasmInitialized) {
10465                         throw new Error("initializeWasm() must be awaited first!");
10466                 }
10467                 const nativeResponseValue = wasm.ErroringMessageHandler_as_MessageSendEventsProvider(this_arg);
10468                 return nativeResponseValue;
10469         }
10470         // struct LDKChannelMessageHandler ErroringMessageHandler_as_ChannelMessageHandler(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
10471         export function ErroringMessageHandler_as_ChannelMessageHandler(this_arg: number): number {
10472                 if(!isWasmInitialized) {
10473                         throw new Error("initializeWasm() must be awaited first!");
10474                 }
10475                 const nativeResponseValue = wasm.ErroringMessageHandler_as_ChannelMessageHandler(this_arg);
10476                 return nativeResponseValue;
10477         }
10478         // void MessageHandler_free(struct LDKMessageHandler this_obj);
10479         export function MessageHandler_free(this_obj: number): void {
10480                 if(!isWasmInitialized) {
10481                         throw new Error("initializeWasm() must be awaited first!");
10482                 }
10483                 const nativeResponseValue = wasm.MessageHandler_free(this_obj);
10484                 // debug statements here
10485         }
10486         // const struct LDKChannelMessageHandler *MessageHandler_get_chan_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
10487         export function MessageHandler_get_chan_handler(this_ptr: number): number {
10488                 if(!isWasmInitialized) {
10489                         throw new Error("initializeWasm() must be awaited first!");
10490                 }
10491                 const nativeResponseValue = wasm.MessageHandler_get_chan_handler(this_ptr);
10492                 return nativeResponseValue;
10493         }
10494         // void MessageHandler_set_chan_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKChannelMessageHandler val);
10495         export function MessageHandler_set_chan_handler(this_ptr: number, val: number): void {
10496                 if(!isWasmInitialized) {
10497                         throw new Error("initializeWasm() must be awaited first!");
10498                 }
10499                 const nativeResponseValue = wasm.MessageHandler_set_chan_handler(this_ptr, val);
10500                 // debug statements here
10501         }
10502         // const struct LDKRoutingMessageHandler *MessageHandler_get_route_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
10503         export function MessageHandler_get_route_handler(this_ptr: number): number {
10504                 if(!isWasmInitialized) {
10505                         throw new Error("initializeWasm() must be awaited first!");
10506                 }
10507                 const nativeResponseValue = wasm.MessageHandler_get_route_handler(this_ptr);
10508                 return nativeResponseValue;
10509         }
10510         // void MessageHandler_set_route_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKRoutingMessageHandler val);
10511         export function MessageHandler_set_route_handler(this_ptr: number, val: number): void {
10512                 if(!isWasmInitialized) {
10513                         throw new Error("initializeWasm() must be awaited first!");
10514                 }
10515                 const nativeResponseValue = wasm.MessageHandler_set_route_handler(this_ptr, val);
10516                 // debug statements here
10517         }
10518         // MUST_USE_RES struct LDKMessageHandler MessageHandler_new(struct LDKChannelMessageHandler chan_handler_arg, struct LDKRoutingMessageHandler route_handler_arg);
10519         export function MessageHandler_new(chan_handler_arg: number, route_handler_arg: number): number {
10520                 if(!isWasmInitialized) {
10521                         throw new Error("initializeWasm() must be awaited first!");
10522                 }
10523                 const nativeResponseValue = wasm.MessageHandler_new(chan_handler_arg, route_handler_arg);
10524                 return nativeResponseValue;
10525         }
10526         // struct LDKSocketDescriptor SocketDescriptor_clone(const struct LDKSocketDescriptor *NONNULL_PTR orig);
10527         export function SocketDescriptor_clone(orig: number): number {
10528                 if(!isWasmInitialized) {
10529                         throw new Error("initializeWasm() must be awaited first!");
10530                 }
10531                 const nativeResponseValue = wasm.SocketDescriptor_clone(orig);
10532                 return nativeResponseValue;
10533         }
10534         // void SocketDescriptor_free(struct LDKSocketDescriptor this_ptr);
10535         export function SocketDescriptor_free(this_ptr: number): void {
10536                 if(!isWasmInitialized) {
10537                         throw new Error("initializeWasm() must be awaited first!");
10538                 }
10539                 const nativeResponseValue = wasm.SocketDescriptor_free(this_ptr);
10540                 // debug statements here
10541         }
10542         // void PeerHandleError_free(struct LDKPeerHandleError this_obj);
10543         export function PeerHandleError_free(this_obj: number): void {
10544                 if(!isWasmInitialized) {
10545                         throw new Error("initializeWasm() must be awaited first!");
10546                 }
10547                 const nativeResponseValue = wasm.PeerHandleError_free(this_obj);
10548                 // debug statements here
10549         }
10550         // bool PeerHandleError_get_no_connection_possible(const struct LDKPeerHandleError *NONNULL_PTR this_ptr);
10551         export function PeerHandleError_get_no_connection_possible(this_ptr: number): boolean {
10552                 if(!isWasmInitialized) {
10553                         throw new Error("initializeWasm() must be awaited first!");
10554                 }
10555                 const nativeResponseValue = wasm.PeerHandleError_get_no_connection_possible(this_ptr);
10556                 return nativeResponseValue;
10557         }
10558         // void PeerHandleError_set_no_connection_possible(struct LDKPeerHandleError *NONNULL_PTR this_ptr, bool val);
10559         export function PeerHandleError_set_no_connection_possible(this_ptr: number, val: boolean): void {
10560                 if(!isWasmInitialized) {
10561                         throw new Error("initializeWasm() must be awaited first!");
10562                 }
10563                 const nativeResponseValue = wasm.PeerHandleError_set_no_connection_possible(this_ptr, val);
10564                 // debug statements here
10565         }
10566         // MUST_USE_RES struct LDKPeerHandleError PeerHandleError_new(bool no_connection_possible_arg);
10567         export function PeerHandleError_new(no_connection_possible_arg: boolean): number {
10568                 if(!isWasmInitialized) {
10569                         throw new Error("initializeWasm() must be awaited first!");
10570                 }
10571                 const nativeResponseValue = wasm.PeerHandleError_new(no_connection_possible_arg);
10572                 return nativeResponseValue;
10573         }
10574         // struct LDKPeerHandleError PeerHandleError_clone(const struct LDKPeerHandleError *NONNULL_PTR orig);
10575         export function PeerHandleError_clone(orig: number): number {
10576                 if(!isWasmInitialized) {
10577                         throw new Error("initializeWasm() must be awaited first!");
10578                 }
10579                 const nativeResponseValue = wasm.PeerHandleError_clone(orig);
10580                 return nativeResponseValue;
10581         }
10582         // void PeerManager_free(struct LDKPeerManager this_obj);
10583         export function PeerManager_free(this_obj: number): void {
10584                 if(!isWasmInitialized) {
10585                         throw new Error("initializeWasm() must be awaited first!");
10586                 }
10587                 const nativeResponseValue = wasm.PeerManager_free(this_obj);
10588                 // debug statements here
10589         }
10590         // 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);
10591         export function PeerManager_new(message_handler: number, our_node_secret: Uint8Array, ephemeral_random_data: Uint8Array, logger: number): number {
10592                 if(!isWasmInitialized) {
10593                         throw new Error("initializeWasm() must be awaited first!");
10594                 }
10595                 const nativeResponseValue = wasm.PeerManager_new(message_handler, encodeArray(our_node_secret), encodeArray(ephemeral_random_data), logger);
10596                 return nativeResponseValue;
10597         }
10598         // MUST_USE_RES struct LDKCVec_PublicKeyZ PeerManager_get_peer_node_ids(const struct LDKPeerManager *NONNULL_PTR this_arg);
10599         export function PeerManager_get_peer_node_ids(this_arg: number): Uint8Array[] {
10600                 if(!isWasmInitialized) {
10601                         throw new Error("initializeWasm() must be awaited first!");
10602                 }
10603                 const nativeResponseValue = wasm.PeerManager_get_peer_node_ids(this_arg);
10604                 return nativeResponseValue;
10605         }
10606         // 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);
10607         export function PeerManager_new_outbound_connection(this_arg: number, their_node_id: Uint8Array, descriptor: number): number {
10608                 if(!isWasmInitialized) {
10609                         throw new Error("initializeWasm() must be awaited first!");
10610                 }
10611                 const nativeResponseValue = wasm.PeerManager_new_outbound_connection(this_arg, encodeArray(their_node_id), descriptor);
10612                 return nativeResponseValue;
10613         }
10614         // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_new_inbound_connection(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor descriptor);
10615         export function PeerManager_new_inbound_connection(this_arg: number, descriptor: number): number {
10616                 if(!isWasmInitialized) {
10617                         throw new Error("initializeWasm() must be awaited first!");
10618                 }
10619                 const nativeResponseValue = wasm.PeerManager_new_inbound_connection(this_arg, descriptor);
10620                 return nativeResponseValue;
10621         }
10622         // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_write_buffer_space_avail(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor *NONNULL_PTR descriptor);
10623         export function PeerManager_write_buffer_space_avail(this_arg: number, descriptor: number): number {
10624                 if(!isWasmInitialized) {
10625                         throw new Error("initializeWasm() must be awaited first!");
10626                 }
10627                 const nativeResponseValue = wasm.PeerManager_write_buffer_space_avail(this_arg, descriptor);
10628                 return nativeResponseValue;
10629         }
10630         // 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);
10631         export function PeerManager_read_event(this_arg: number, peer_descriptor: number, data: Uint8Array): number {
10632                 if(!isWasmInitialized) {
10633                         throw new Error("initializeWasm() must be awaited first!");
10634                 }
10635                 const nativeResponseValue = wasm.PeerManager_read_event(this_arg, peer_descriptor, encodeArray(data));
10636                 return nativeResponseValue;
10637         }
10638         // void PeerManager_process_events(const struct LDKPeerManager *NONNULL_PTR this_arg);
10639         export function PeerManager_process_events(this_arg: number): void {
10640                 if(!isWasmInitialized) {
10641                         throw new Error("initializeWasm() must be awaited first!");
10642                 }
10643                 const nativeResponseValue = wasm.PeerManager_process_events(this_arg);
10644                 // debug statements here
10645         }
10646         // void PeerManager_socket_disconnected(const struct LDKPeerManager *NONNULL_PTR this_arg, const struct LDKSocketDescriptor *NONNULL_PTR descriptor);
10647         export function PeerManager_socket_disconnected(this_arg: number, descriptor: number): void {
10648                 if(!isWasmInitialized) {
10649                         throw new Error("initializeWasm() must be awaited first!");
10650                 }
10651                 const nativeResponseValue = wasm.PeerManager_socket_disconnected(this_arg, descriptor);
10652                 // debug statements here
10653         }
10654         // void PeerManager_disconnect_by_node_id(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKPublicKey node_id, bool no_connection_possible);
10655         export function PeerManager_disconnect_by_node_id(this_arg: number, node_id: Uint8Array, no_connection_possible: boolean): void {
10656                 if(!isWasmInitialized) {
10657                         throw new Error("initializeWasm() must be awaited first!");
10658                 }
10659                 const nativeResponseValue = wasm.PeerManager_disconnect_by_node_id(this_arg, encodeArray(node_id), no_connection_possible);
10660                 // debug statements here
10661         }
10662         // void PeerManager_timer_tick_occurred(const struct LDKPeerManager *NONNULL_PTR this_arg);
10663         export function PeerManager_timer_tick_occurred(this_arg: number): void {
10664                 if(!isWasmInitialized) {
10665                         throw new Error("initializeWasm() must be awaited first!");
10666                 }
10667                 const nativeResponseValue = wasm.PeerManager_timer_tick_occurred(this_arg);
10668                 // debug statements here
10669         }
10670         // struct LDKThirtyTwoBytes build_commitment_secret(const uint8_t (*commitment_seed)[32], uint64_t idx);
10671         export function build_commitment_secret(commitment_seed: Uint8Array, idx: number): Uint8Array {
10672                 if(!isWasmInitialized) {
10673                         throw new Error("initializeWasm() must be awaited first!");
10674                 }
10675                 const nativeResponseValue = wasm.build_commitment_secret(encodeArray(commitment_seed), idx);
10676                 return decodeArray(nativeResponseValue);
10677         }
10678         // struct LDKCResult_SecretKeyErrorZ derive_private_key(struct LDKPublicKey per_commitment_point, const uint8_t (*base_secret)[32]);
10679         export function derive_private_key(per_commitment_point: Uint8Array, base_secret: Uint8Array): number {
10680                 if(!isWasmInitialized) {
10681                         throw new Error("initializeWasm() must be awaited first!");
10682                 }
10683                 const nativeResponseValue = wasm.derive_private_key(encodeArray(per_commitment_point), encodeArray(base_secret));
10684                 return nativeResponseValue;
10685         }
10686         // struct LDKCResult_PublicKeyErrorZ derive_public_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey base_point);
10687         export function derive_public_key(per_commitment_point: Uint8Array, base_point: Uint8Array): number {
10688                 if(!isWasmInitialized) {
10689                         throw new Error("initializeWasm() must be awaited first!");
10690                 }
10691                 const nativeResponseValue = wasm.derive_public_key(encodeArray(per_commitment_point), encodeArray(base_point));
10692                 return nativeResponseValue;
10693         }
10694         // struct LDKCResult_SecretKeyErrorZ derive_private_revocation_key(const uint8_t (*per_commitment_secret)[32], const uint8_t (*countersignatory_revocation_base_secret)[32]);
10695         export function derive_private_revocation_key(per_commitment_secret: Uint8Array, countersignatory_revocation_base_secret: Uint8Array): number {
10696                 if(!isWasmInitialized) {
10697                         throw new Error("initializeWasm() must be awaited first!");
10698                 }
10699                 const nativeResponseValue = wasm.derive_private_revocation_key(encodeArray(per_commitment_secret), encodeArray(countersignatory_revocation_base_secret));
10700                 return nativeResponseValue;
10701         }
10702         // struct LDKCResult_PublicKeyErrorZ derive_public_revocation_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey countersignatory_revocation_base_point);
10703         export function derive_public_revocation_key(per_commitment_point: Uint8Array, countersignatory_revocation_base_point: Uint8Array): number {
10704                 if(!isWasmInitialized) {
10705                         throw new Error("initializeWasm() must be awaited first!");
10706                 }
10707                 const nativeResponseValue = wasm.derive_public_revocation_key(encodeArray(per_commitment_point), encodeArray(countersignatory_revocation_base_point));
10708                 return nativeResponseValue;
10709         }
10710         // void TxCreationKeys_free(struct LDKTxCreationKeys this_obj);
10711         export function TxCreationKeys_free(this_obj: number): void {
10712                 if(!isWasmInitialized) {
10713                         throw new Error("initializeWasm() must be awaited first!");
10714                 }
10715                 const nativeResponseValue = wasm.TxCreationKeys_free(this_obj);
10716                 // debug statements here
10717         }
10718         // struct LDKPublicKey TxCreationKeys_get_per_commitment_point(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
10719         export function TxCreationKeys_get_per_commitment_point(this_ptr: number): Uint8Array {
10720                 if(!isWasmInitialized) {
10721                         throw new Error("initializeWasm() must be awaited first!");
10722                 }
10723                 const nativeResponseValue = wasm.TxCreationKeys_get_per_commitment_point(this_ptr);
10724                 return decodeArray(nativeResponseValue);
10725         }
10726         // void TxCreationKeys_set_per_commitment_point(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10727         export function TxCreationKeys_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
10728                 if(!isWasmInitialized) {
10729                         throw new Error("initializeWasm() must be awaited first!");
10730                 }
10731                 const nativeResponseValue = wasm.TxCreationKeys_set_per_commitment_point(this_ptr, encodeArray(val));
10732                 // debug statements here
10733         }
10734         // struct LDKPublicKey TxCreationKeys_get_revocation_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
10735         export function TxCreationKeys_get_revocation_key(this_ptr: number): Uint8Array {
10736                 if(!isWasmInitialized) {
10737                         throw new Error("initializeWasm() must be awaited first!");
10738                 }
10739                 const nativeResponseValue = wasm.TxCreationKeys_get_revocation_key(this_ptr);
10740                 return decodeArray(nativeResponseValue);
10741         }
10742         // void TxCreationKeys_set_revocation_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10743         export function TxCreationKeys_set_revocation_key(this_ptr: number, val: Uint8Array): void {
10744                 if(!isWasmInitialized) {
10745                         throw new Error("initializeWasm() must be awaited first!");
10746                 }
10747                 const nativeResponseValue = wasm.TxCreationKeys_set_revocation_key(this_ptr, encodeArray(val));
10748                 // debug statements here
10749         }
10750         // struct LDKPublicKey TxCreationKeys_get_broadcaster_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
10751         export function TxCreationKeys_get_broadcaster_htlc_key(this_ptr: number): Uint8Array {
10752                 if(!isWasmInitialized) {
10753                         throw new Error("initializeWasm() must be awaited first!");
10754                 }
10755                 const nativeResponseValue = wasm.TxCreationKeys_get_broadcaster_htlc_key(this_ptr);
10756                 return decodeArray(nativeResponseValue);
10757         }
10758         // void TxCreationKeys_set_broadcaster_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10759         export function TxCreationKeys_set_broadcaster_htlc_key(this_ptr: number, val: Uint8Array): void {
10760                 if(!isWasmInitialized) {
10761                         throw new Error("initializeWasm() must be awaited first!");
10762                 }
10763                 const nativeResponseValue = wasm.TxCreationKeys_set_broadcaster_htlc_key(this_ptr, encodeArray(val));
10764                 // debug statements here
10765         }
10766         // struct LDKPublicKey TxCreationKeys_get_countersignatory_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
10767         export function TxCreationKeys_get_countersignatory_htlc_key(this_ptr: number): Uint8Array {
10768                 if(!isWasmInitialized) {
10769                         throw new Error("initializeWasm() must be awaited first!");
10770                 }
10771                 const nativeResponseValue = wasm.TxCreationKeys_get_countersignatory_htlc_key(this_ptr);
10772                 return decodeArray(nativeResponseValue);
10773         }
10774         // void TxCreationKeys_set_countersignatory_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10775         export function TxCreationKeys_set_countersignatory_htlc_key(this_ptr: number, val: Uint8Array): void {
10776                 if(!isWasmInitialized) {
10777                         throw new Error("initializeWasm() must be awaited first!");
10778                 }
10779                 const nativeResponseValue = wasm.TxCreationKeys_set_countersignatory_htlc_key(this_ptr, encodeArray(val));
10780                 // debug statements here
10781         }
10782         // struct LDKPublicKey TxCreationKeys_get_broadcaster_delayed_payment_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
10783         export function TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr: number): Uint8Array {
10784                 if(!isWasmInitialized) {
10785                         throw new Error("initializeWasm() must be awaited first!");
10786                 }
10787                 const nativeResponseValue = wasm.TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr);
10788                 return decodeArray(nativeResponseValue);
10789         }
10790         // void TxCreationKeys_set_broadcaster_delayed_payment_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10791         export function TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr: number, val: Uint8Array): void {
10792                 if(!isWasmInitialized) {
10793                         throw new Error("initializeWasm() must be awaited first!");
10794                 }
10795                 const nativeResponseValue = wasm.TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr, encodeArray(val));
10796                 // debug statements here
10797         }
10798         // 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);
10799         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 {
10800                 if(!isWasmInitialized) {
10801                         throw new Error("initializeWasm() must be awaited first!");
10802                 }
10803                 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));
10804                 return nativeResponseValue;
10805         }
10806         // struct LDKTxCreationKeys TxCreationKeys_clone(const struct LDKTxCreationKeys *NONNULL_PTR orig);
10807         export function TxCreationKeys_clone(orig: number): number {
10808                 if(!isWasmInitialized) {
10809                         throw new Error("initializeWasm() must be awaited first!");
10810                 }
10811                 const nativeResponseValue = wasm.TxCreationKeys_clone(orig);
10812                 return nativeResponseValue;
10813         }
10814         // struct LDKCVec_u8Z TxCreationKeys_write(const struct LDKTxCreationKeys *NONNULL_PTR obj);
10815         export function TxCreationKeys_write(obj: number): Uint8Array {
10816                 if(!isWasmInitialized) {
10817                         throw new Error("initializeWasm() must be awaited first!");
10818                 }
10819                 const nativeResponseValue = wasm.TxCreationKeys_write(obj);
10820                 return decodeArray(nativeResponseValue);
10821         }
10822         // struct LDKCResult_TxCreationKeysDecodeErrorZ TxCreationKeys_read(struct LDKu8slice ser);
10823         export function TxCreationKeys_read(ser: Uint8Array): number {
10824                 if(!isWasmInitialized) {
10825                         throw new Error("initializeWasm() must be awaited first!");
10826                 }
10827                 const nativeResponseValue = wasm.TxCreationKeys_read(encodeArray(ser));
10828                 return nativeResponseValue;
10829         }
10830         // void ChannelPublicKeys_free(struct LDKChannelPublicKeys this_obj);
10831         export function ChannelPublicKeys_free(this_obj: number): void {
10832                 if(!isWasmInitialized) {
10833                         throw new Error("initializeWasm() must be awaited first!");
10834                 }
10835                 const nativeResponseValue = wasm.ChannelPublicKeys_free(this_obj);
10836                 // debug statements here
10837         }
10838         // struct LDKPublicKey ChannelPublicKeys_get_funding_pubkey(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
10839         export function ChannelPublicKeys_get_funding_pubkey(this_ptr: number): Uint8Array {
10840                 if(!isWasmInitialized) {
10841                         throw new Error("initializeWasm() must be awaited first!");
10842                 }
10843                 const nativeResponseValue = wasm.ChannelPublicKeys_get_funding_pubkey(this_ptr);
10844                 return decodeArray(nativeResponseValue);
10845         }
10846         // void ChannelPublicKeys_set_funding_pubkey(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10847         export function ChannelPublicKeys_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
10848                 if(!isWasmInitialized) {
10849                         throw new Error("initializeWasm() must be awaited first!");
10850                 }
10851                 const nativeResponseValue = wasm.ChannelPublicKeys_set_funding_pubkey(this_ptr, encodeArray(val));
10852                 // debug statements here
10853         }
10854         // struct LDKPublicKey ChannelPublicKeys_get_revocation_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
10855         export function ChannelPublicKeys_get_revocation_basepoint(this_ptr: number): Uint8Array {
10856                 if(!isWasmInitialized) {
10857                         throw new Error("initializeWasm() must be awaited first!");
10858                 }
10859                 const nativeResponseValue = wasm.ChannelPublicKeys_get_revocation_basepoint(this_ptr);
10860                 return decodeArray(nativeResponseValue);
10861         }
10862         // void ChannelPublicKeys_set_revocation_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10863         export function ChannelPublicKeys_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
10864                 if(!isWasmInitialized) {
10865                         throw new Error("initializeWasm() must be awaited first!");
10866                 }
10867                 const nativeResponseValue = wasm.ChannelPublicKeys_set_revocation_basepoint(this_ptr, encodeArray(val));
10868                 // debug statements here
10869         }
10870         // struct LDKPublicKey ChannelPublicKeys_get_payment_point(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
10871         export function ChannelPublicKeys_get_payment_point(this_ptr: number): Uint8Array {
10872                 if(!isWasmInitialized) {
10873                         throw new Error("initializeWasm() must be awaited first!");
10874                 }
10875                 const nativeResponseValue = wasm.ChannelPublicKeys_get_payment_point(this_ptr);
10876                 return decodeArray(nativeResponseValue);
10877         }
10878         // void ChannelPublicKeys_set_payment_point(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10879         export function ChannelPublicKeys_set_payment_point(this_ptr: number, val: Uint8Array): void {
10880                 if(!isWasmInitialized) {
10881                         throw new Error("initializeWasm() must be awaited first!");
10882                 }
10883                 const nativeResponseValue = wasm.ChannelPublicKeys_set_payment_point(this_ptr, encodeArray(val));
10884                 // debug statements here
10885         }
10886         // struct LDKPublicKey ChannelPublicKeys_get_delayed_payment_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
10887         export function ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
10888                 if(!isWasmInitialized) {
10889                         throw new Error("initializeWasm() must be awaited first!");
10890                 }
10891                 const nativeResponseValue = wasm.ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr);
10892                 return decodeArray(nativeResponseValue);
10893         }
10894         // void ChannelPublicKeys_set_delayed_payment_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10895         export function ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
10896                 if(!isWasmInitialized) {
10897                         throw new Error("initializeWasm() must be awaited first!");
10898                 }
10899                 const nativeResponseValue = wasm.ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
10900                 // debug statements here
10901         }
10902         // struct LDKPublicKey ChannelPublicKeys_get_htlc_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
10903         export function ChannelPublicKeys_get_htlc_basepoint(this_ptr: number): Uint8Array {
10904                 if(!isWasmInitialized) {
10905                         throw new Error("initializeWasm() must be awaited first!");
10906                 }
10907                 const nativeResponseValue = wasm.ChannelPublicKeys_get_htlc_basepoint(this_ptr);
10908                 return decodeArray(nativeResponseValue);
10909         }
10910         // void ChannelPublicKeys_set_htlc_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10911         export function ChannelPublicKeys_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
10912                 if(!isWasmInitialized) {
10913                         throw new Error("initializeWasm() must be awaited first!");
10914                 }
10915                 const nativeResponseValue = wasm.ChannelPublicKeys_set_htlc_basepoint(this_ptr, encodeArray(val));
10916                 // debug statements here
10917         }
10918         // 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);
10919         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 {
10920                 if(!isWasmInitialized) {
10921                         throw new Error("initializeWasm() must be awaited first!");
10922                 }
10923                 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));
10924                 return nativeResponseValue;
10925         }
10926         // struct LDKChannelPublicKeys ChannelPublicKeys_clone(const struct LDKChannelPublicKeys *NONNULL_PTR orig);
10927         export function ChannelPublicKeys_clone(orig: number): number {
10928                 if(!isWasmInitialized) {
10929                         throw new Error("initializeWasm() must be awaited first!");
10930                 }
10931                 const nativeResponseValue = wasm.ChannelPublicKeys_clone(orig);
10932                 return nativeResponseValue;
10933         }
10934         // struct LDKCVec_u8Z ChannelPublicKeys_write(const struct LDKChannelPublicKeys *NONNULL_PTR obj);
10935         export function ChannelPublicKeys_write(obj: number): Uint8Array {
10936                 if(!isWasmInitialized) {
10937                         throw new Error("initializeWasm() must be awaited first!");
10938                 }
10939                 const nativeResponseValue = wasm.ChannelPublicKeys_write(obj);
10940                 return decodeArray(nativeResponseValue);
10941         }
10942         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ ChannelPublicKeys_read(struct LDKu8slice ser);
10943         export function ChannelPublicKeys_read(ser: Uint8Array): number {
10944                 if(!isWasmInitialized) {
10945                         throw new Error("initializeWasm() must be awaited first!");
10946                 }
10947                 const nativeResponseValue = wasm.ChannelPublicKeys_read(encodeArray(ser));
10948                 return nativeResponseValue;
10949         }
10950         // 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);
10951         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 {
10952                 if(!isWasmInitialized) {
10953                         throw new Error("initializeWasm() must be awaited first!");
10954                 }
10955                 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));
10956                 return nativeResponseValue;
10957         }
10958         // 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);
10959         export function TxCreationKeys_from_channel_static_keys(per_commitment_point: Uint8Array, broadcaster_keys: number, countersignatory_keys: number): number {
10960                 if(!isWasmInitialized) {
10961                         throw new Error("initializeWasm() must be awaited first!");
10962                 }
10963                 const nativeResponseValue = wasm.TxCreationKeys_from_channel_static_keys(encodeArray(per_commitment_point), broadcaster_keys, countersignatory_keys);
10964                 return nativeResponseValue;
10965         }
10966         // struct LDKCVec_u8Z get_revokeable_redeemscript(struct LDKPublicKey revocation_key, uint16_t contest_delay, struct LDKPublicKey broadcaster_delayed_payment_key);
10967         export function get_revokeable_redeemscript(revocation_key: Uint8Array, contest_delay: number, broadcaster_delayed_payment_key: Uint8Array): Uint8Array {
10968                 if(!isWasmInitialized) {
10969                         throw new Error("initializeWasm() must be awaited first!");
10970                 }
10971                 const nativeResponseValue = wasm.get_revokeable_redeemscript(encodeArray(revocation_key), contest_delay, encodeArray(broadcaster_delayed_payment_key));
10972                 return decodeArray(nativeResponseValue);
10973         }
10974         // void HTLCOutputInCommitment_free(struct LDKHTLCOutputInCommitment this_obj);
10975         export function HTLCOutputInCommitment_free(this_obj: number): void {
10976                 if(!isWasmInitialized) {
10977                         throw new Error("initializeWasm() must be awaited first!");
10978                 }
10979                 const nativeResponseValue = wasm.HTLCOutputInCommitment_free(this_obj);
10980                 // debug statements here
10981         }
10982         // bool HTLCOutputInCommitment_get_offered(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
10983         export function HTLCOutputInCommitment_get_offered(this_ptr: number): boolean {
10984                 if(!isWasmInitialized) {
10985                         throw new Error("initializeWasm() must be awaited first!");
10986                 }
10987                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_offered(this_ptr);
10988                 return nativeResponseValue;
10989         }
10990         // void HTLCOutputInCommitment_set_offered(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, bool val);
10991         export function HTLCOutputInCommitment_set_offered(this_ptr: number, val: boolean): void {
10992                 if(!isWasmInitialized) {
10993                         throw new Error("initializeWasm() must be awaited first!");
10994                 }
10995                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_offered(this_ptr, val);
10996                 // debug statements here
10997         }
10998         // uint64_t HTLCOutputInCommitment_get_amount_msat(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
10999         export function HTLCOutputInCommitment_get_amount_msat(this_ptr: number): number {
11000                 if(!isWasmInitialized) {
11001                         throw new Error("initializeWasm() must be awaited first!");
11002                 }
11003                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_amount_msat(this_ptr);
11004                 return nativeResponseValue;
11005         }
11006         // void HTLCOutputInCommitment_set_amount_msat(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint64_t val);
11007         export function HTLCOutputInCommitment_set_amount_msat(this_ptr: number, val: number): void {
11008                 if(!isWasmInitialized) {
11009                         throw new Error("initializeWasm() must be awaited first!");
11010                 }
11011                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_amount_msat(this_ptr, val);
11012                 // debug statements here
11013         }
11014         // uint32_t HTLCOutputInCommitment_get_cltv_expiry(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
11015         export function HTLCOutputInCommitment_get_cltv_expiry(this_ptr: number): number {
11016                 if(!isWasmInitialized) {
11017                         throw new Error("initializeWasm() must be awaited first!");
11018                 }
11019                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_cltv_expiry(this_ptr);
11020                 return nativeResponseValue;
11021         }
11022         // void HTLCOutputInCommitment_set_cltv_expiry(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint32_t val);
11023         export function HTLCOutputInCommitment_set_cltv_expiry(this_ptr: number, val: number): void {
11024                 if(!isWasmInitialized) {
11025                         throw new Error("initializeWasm() must be awaited first!");
11026                 }
11027                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_cltv_expiry(this_ptr, val);
11028                 // debug statements here
11029         }
11030         // const uint8_t (*HTLCOutputInCommitment_get_payment_hash(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr))[32];
11031         export function HTLCOutputInCommitment_get_payment_hash(this_ptr: number): Uint8Array {
11032                 if(!isWasmInitialized) {
11033                         throw new Error("initializeWasm() must be awaited first!");
11034                 }
11035                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_payment_hash(this_ptr);
11036                 return decodeArray(nativeResponseValue);
11037         }
11038         // void HTLCOutputInCommitment_set_payment_hash(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11039         export function HTLCOutputInCommitment_set_payment_hash(this_ptr: number, val: Uint8Array): void {
11040                 if(!isWasmInitialized) {
11041                         throw new Error("initializeWasm() must be awaited first!");
11042                 }
11043                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_payment_hash(this_ptr, encodeArray(val));
11044                 // debug statements here
11045         }
11046         // struct LDKCOption_u32Z HTLCOutputInCommitment_get_transaction_output_index(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
11047         export function HTLCOutputInCommitment_get_transaction_output_index(this_ptr: number): number {
11048                 if(!isWasmInitialized) {
11049                         throw new Error("initializeWasm() must be awaited first!");
11050                 }
11051                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_transaction_output_index(this_ptr);
11052                 return nativeResponseValue;
11053         }
11054         // void HTLCOutputInCommitment_set_transaction_output_index(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKCOption_u32Z val);
11055         export function HTLCOutputInCommitment_set_transaction_output_index(this_ptr: number, val: number): void {
11056                 if(!isWasmInitialized) {
11057                         throw new Error("initializeWasm() must be awaited first!");
11058                 }
11059                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_transaction_output_index(this_ptr, val);
11060                 // debug statements here
11061         }
11062         // 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);
11063         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 {
11064                 if(!isWasmInitialized) {
11065                         throw new Error("initializeWasm() must be awaited first!");
11066                 }
11067                 const nativeResponseValue = wasm.HTLCOutputInCommitment_new(offered_arg, amount_msat_arg, cltv_expiry_arg, encodeArray(payment_hash_arg), transaction_output_index_arg);
11068                 return nativeResponseValue;
11069         }
11070         // struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_clone(const struct LDKHTLCOutputInCommitment *NONNULL_PTR orig);
11071         export function HTLCOutputInCommitment_clone(orig: number): number {
11072                 if(!isWasmInitialized) {
11073                         throw new Error("initializeWasm() must be awaited first!");
11074                 }
11075                 const nativeResponseValue = wasm.HTLCOutputInCommitment_clone(orig);
11076                 return nativeResponseValue;
11077         }
11078         // struct LDKCVec_u8Z HTLCOutputInCommitment_write(const struct LDKHTLCOutputInCommitment *NONNULL_PTR obj);
11079         export function HTLCOutputInCommitment_write(obj: number): Uint8Array {
11080                 if(!isWasmInitialized) {
11081                         throw new Error("initializeWasm() must be awaited first!");
11082                 }
11083                 const nativeResponseValue = wasm.HTLCOutputInCommitment_write(obj);
11084                 return decodeArray(nativeResponseValue);
11085         }
11086         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ HTLCOutputInCommitment_read(struct LDKu8slice ser);
11087         export function HTLCOutputInCommitment_read(ser: Uint8Array): number {
11088                 if(!isWasmInitialized) {
11089                         throw new Error("initializeWasm() must be awaited first!");
11090                 }
11091                 const nativeResponseValue = wasm.HTLCOutputInCommitment_read(encodeArray(ser));
11092                 return nativeResponseValue;
11093         }
11094         // struct LDKCVec_u8Z get_htlc_redeemscript(const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc, const struct LDKTxCreationKeys *NONNULL_PTR keys);
11095         export function get_htlc_redeemscript(htlc: number, keys: number): Uint8Array {
11096                 if(!isWasmInitialized) {
11097                         throw new Error("initializeWasm() must be awaited first!");
11098                 }
11099                 const nativeResponseValue = wasm.get_htlc_redeemscript(htlc, keys);
11100                 return decodeArray(nativeResponseValue);
11101         }
11102         // struct LDKCVec_u8Z make_funding_redeemscript(struct LDKPublicKey broadcaster, struct LDKPublicKey countersignatory);
11103         export function make_funding_redeemscript(broadcaster: Uint8Array, countersignatory: Uint8Array): Uint8Array {
11104                 if(!isWasmInitialized) {
11105                         throw new Error("initializeWasm() must be awaited first!");
11106                 }
11107                 const nativeResponseValue = wasm.make_funding_redeemscript(encodeArray(broadcaster), encodeArray(countersignatory));
11108                 return decodeArray(nativeResponseValue);
11109         }
11110         // struct LDKTransaction build_htlc_transaction(const uint8_t (*prev_hash)[32], uint32_t feerate_per_kw, uint16_t contest_delay, const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc, struct LDKPublicKey broadcaster_delayed_payment_key, struct LDKPublicKey revocation_key);
11111         export function build_htlc_transaction(prev_hash: Uint8Array, feerate_per_kw: number, contest_delay: number, htlc: number, broadcaster_delayed_payment_key: Uint8Array, revocation_key: Uint8Array): Uint8Array {
11112                 if(!isWasmInitialized) {
11113                         throw new Error("initializeWasm() must be awaited first!");
11114                 }
11115                 const nativeResponseValue = wasm.build_htlc_transaction(encodeArray(prev_hash), feerate_per_kw, contest_delay, htlc, encodeArray(broadcaster_delayed_payment_key), encodeArray(revocation_key));
11116                 return decodeArray(nativeResponseValue);
11117         }
11118         // void ChannelTransactionParameters_free(struct LDKChannelTransactionParameters this_obj);
11119         export function ChannelTransactionParameters_free(this_obj: number): void {
11120                 if(!isWasmInitialized) {
11121                         throw new Error("initializeWasm() must be awaited first!");
11122                 }
11123                 const nativeResponseValue = wasm.ChannelTransactionParameters_free(this_obj);
11124                 // debug statements here
11125         }
11126         // struct LDKChannelPublicKeys ChannelTransactionParameters_get_holder_pubkeys(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
11127         export function ChannelTransactionParameters_get_holder_pubkeys(this_ptr: number): number {
11128                 if(!isWasmInitialized) {
11129                         throw new Error("initializeWasm() must be awaited first!");
11130                 }
11131                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_holder_pubkeys(this_ptr);
11132                 return nativeResponseValue;
11133         }
11134         // void ChannelTransactionParameters_set_holder_pubkeys(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
11135         export function ChannelTransactionParameters_set_holder_pubkeys(this_ptr: number, val: number): void {
11136                 if(!isWasmInitialized) {
11137                         throw new Error("initializeWasm() must be awaited first!");
11138                 }
11139                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_holder_pubkeys(this_ptr, val);
11140                 // debug statements here
11141         }
11142         // uint16_t ChannelTransactionParameters_get_holder_selected_contest_delay(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
11143         export function ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr: number): number {
11144                 if(!isWasmInitialized) {
11145                         throw new Error("initializeWasm() must be awaited first!");
11146                 }
11147                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr);
11148                 return nativeResponseValue;
11149         }
11150         // void ChannelTransactionParameters_set_holder_selected_contest_delay(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
11151         export function ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr: number, val: number): void {
11152                 if(!isWasmInitialized) {
11153                         throw new Error("initializeWasm() must be awaited first!");
11154                 }
11155                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr, val);
11156                 // debug statements here
11157         }
11158         // bool ChannelTransactionParameters_get_is_outbound_from_holder(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
11159         export function ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr: number): boolean {
11160                 if(!isWasmInitialized) {
11161                         throw new Error("initializeWasm() must be awaited first!");
11162                 }
11163                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr);
11164                 return nativeResponseValue;
11165         }
11166         // void ChannelTransactionParameters_set_is_outbound_from_holder(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, bool val);
11167         export function ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr: number, val: boolean): void {
11168                 if(!isWasmInitialized) {
11169                         throw new Error("initializeWasm() must be awaited first!");
11170                 }
11171                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr, val);
11172                 // debug statements here
11173         }
11174         // struct LDKCounterpartyChannelTransactionParameters ChannelTransactionParameters_get_counterparty_parameters(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
11175         export function ChannelTransactionParameters_get_counterparty_parameters(this_ptr: number): number {
11176                 if(!isWasmInitialized) {
11177                         throw new Error("initializeWasm() must be awaited first!");
11178                 }
11179                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_counterparty_parameters(this_ptr);
11180                 return nativeResponseValue;
11181         }
11182         // void ChannelTransactionParameters_set_counterparty_parameters(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKCounterpartyChannelTransactionParameters val);
11183         export function ChannelTransactionParameters_set_counterparty_parameters(this_ptr: number, val: number): void {
11184                 if(!isWasmInitialized) {
11185                         throw new Error("initializeWasm() must be awaited first!");
11186                 }
11187                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_counterparty_parameters(this_ptr, val);
11188                 // debug statements here
11189         }
11190         // struct LDKOutPoint ChannelTransactionParameters_get_funding_outpoint(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
11191         export function ChannelTransactionParameters_get_funding_outpoint(this_ptr: number): number {
11192                 if(!isWasmInitialized) {
11193                         throw new Error("initializeWasm() must be awaited first!");
11194                 }
11195                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_funding_outpoint(this_ptr);
11196                 return nativeResponseValue;
11197         }
11198         // void ChannelTransactionParameters_set_funding_outpoint(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKOutPoint val);
11199         export function ChannelTransactionParameters_set_funding_outpoint(this_ptr: number, val: number): void {
11200                 if(!isWasmInitialized) {
11201                         throw new Error("initializeWasm() must be awaited first!");
11202                 }
11203                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_funding_outpoint(this_ptr, val);
11204                 // debug statements here
11205         }
11206         // 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);
11207         export function ChannelTransactionParameters_new(holder_pubkeys_arg: number, holder_selected_contest_delay_arg: number, is_outbound_from_holder_arg: boolean, counterparty_parameters_arg: number, funding_outpoint_arg: number): number {
11208                 if(!isWasmInitialized) {
11209                         throw new Error("initializeWasm() must be awaited first!");
11210                 }
11211                 const nativeResponseValue = wasm.ChannelTransactionParameters_new(holder_pubkeys_arg, holder_selected_contest_delay_arg, is_outbound_from_holder_arg, counterparty_parameters_arg, funding_outpoint_arg);
11212                 return nativeResponseValue;
11213         }
11214         // struct LDKChannelTransactionParameters ChannelTransactionParameters_clone(const struct LDKChannelTransactionParameters *NONNULL_PTR orig);
11215         export function ChannelTransactionParameters_clone(orig: number): number {
11216                 if(!isWasmInitialized) {
11217                         throw new Error("initializeWasm() must be awaited first!");
11218                 }
11219                 const nativeResponseValue = wasm.ChannelTransactionParameters_clone(orig);
11220                 return nativeResponseValue;
11221         }
11222         // void CounterpartyChannelTransactionParameters_free(struct LDKCounterpartyChannelTransactionParameters this_obj);
11223         export function CounterpartyChannelTransactionParameters_free(this_obj: number): void {
11224                 if(!isWasmInitialized) {
11225                         throw new Error("initializeWasm() must be awaited first!");
11226                 }
11227                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_free(this_obj);
11228                 // debug statements here
11229         }
11230         // struct LDKChannelPublicKeys CounterpartyChannelTransactionParameters_get_pubkeys(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
11231         export function CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr: number): number {
11232                 if(!isWasmInitialized) {
11233                         throw new Error("initializeWasm() must be awaited first!");
11234                 }
11235                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr);
11236                 return nativeResponseValue;
11237         }
11238         // void CounterpartyChannelTransactionParameters_set_pubkeys(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
11239         export function CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr: number, val: number): void {
11240                 if(!isWasmInitialized) {
11241                         throw new Error("initializeWasm() must be awaited first!");
11242                 }
11243                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr, val);
11244                 // debug statements here
11245         }
11246         // uint16_t CounterpartyChannelTransactionParameters_get_selected_contest_delay(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
11247         export function CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr: number): number {
11248                 if(!isWasmInitialized) {
11249                         throw new Error("initializeWasm() must be awaited first!");
11250                 }
11251                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr);
11252                 return nativeResponseValue;
11253         }
11254         // void CounterpartyChannelTransactionParameters_set_selected_contest_delay(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
11255         export function CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr: number, val: number): void {
11256                 if(!isWasmInitialized) {
11257                         throw new Error("initializeWasm() must be awaited first!");
11258                 }
11259                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr, val);
11260                 // debug statements here
11261         }
11262         // MUST_USE_RES struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_new(struct LDKChannelPublicKeys pubkeys_arg, uint16_t selected_contest_delay_arg);
11263         export function CounterpartyChannelTransactionParameters_new(pubkeys_arg: number, selected_contest_delay_arg: number): number {
11264                 if(!isWasmInitialized) {
11265                         throw new Error("initializeWasm() must be awaited first!");
11266                 }
11267                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_new(pubkeys_arg, selected_contest_delay_arg);
11268                 return nativeResponseValue;
11269         }
11270         // struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_clone(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR orig);
11271         export function CounterpartyChannelTransactionParameters_clone(orig: number): number {
11272                 if(!isWasmInitialized) {
11273                         throw new Error("initializeWasm() must be awaited first!");
11274                 }
11275                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_clone(orig);
11276                 return nativeResponseValue;
11277         }
11278         // MUST_USE_RES bool ChannelTransactionParameters_is_populated(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
11279         export function ChannelTransactionParameters_is_populated(this_arg: number): boolean {
11280                 if(!isWasmInitialized) {
11281                         throw new Error("initializeWasm() must be awaited first!");
11282                 }
11283                 const nativeResponseValue = wasm.ChannelTransactionParameters_is_populated(this_arg);
11284                 return nativeResponseValue;
11285         }
11286         // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_holder_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
11287         export function ChannelTransactionParameters_as_holder_broadcastable(this_arg: number): number {
11288                 if(!isWasmInitialized) {
11289                         throw new Error("initializeWasm() must be awaited first!");
11290                 }
11291                 const nativeResponseValue = wasm.ChannelTransactionParameters_as_holder_broadcastable(this_arg);
11292                 return nativeResponseValue;
11293         }
11294         // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_counterparty_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
11295         export function ChannelTransactionParameters_as_counterparty_broadcastable(this_arg: number): number {
11296                 if(!isWasmInitialized) {
11297                         throw new Error("initializeWasm() must be awaited first!");
11298                 }
11299                 const nativeResponseValue = wasm.ChannelTransactionParameters_as_counterparty_broadcastable(this_arg);
11300                 return nativeResponseValue;
11301         }
11302         // struct LDKCVec_u8Z CounterpartyChannelTransactionParameters_write(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR obj);
11303         export function CounterpartyChannelTransactionParameters_write(obj: number): Uint8Array {
11304                 if(!isWasmInitialized) {
11305                         throw new Error("initializeWasm() must be awaited first!");
11306                 }
11307                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_write(obj);
11308                 return decodeArray(nativeResponseValue);
11309         }
11310         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CounterpartyChannelTransactionParameters_read(struct LDKu8slice ser);
11311         export function CounterpartyChannelTransactionParameters_read(ser: Uint8Array): number {
11312                 if(!isWasmInitialized) {
11313                         throw new Error("initializeWasm() must be awaited first!");
11314                 }
11315                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_read(encodeArray(ser));
11316                 return nativeResponseValue;
11317         }
11318         // struct LDKCVec_u8Z ChannelTransactionParameters_write(const struct LDKChannelTransactionParameters *NONNULL_PTR obj);
11319         export function ChannelTransactionParameters_write(obj: number): Uint8Array {
11320                 if(!isWasmInitialized) {
11321                         throw new Error("initializeWasm() must be awaited first!");
11322                 }
11323                 const nativeResponseValue = wasm.ChannelTransactionParameters_write(obj);
11324                 return decodeArray(nativeResponseValue);
11325         }
11326         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ ChannelTransactionParameters_read(struct LDKu8slice ser);
11327         export function ChannelTransactionParameters_read(ser: Uint8Array): number {
11328                 if(!isWasmInitialized) {
11329                         throw new Error("initializeWasm() must be awaited first!");
11330                 }
11331                 const nativeResponseValue = wasm.ChannelTransactionParameters_read(encodeArray(ser));
11332                 return nativeResponseValue;
11333         }
11334         // void DirectedChannelTransactionParameters_free(struct LDKDirectedChannelTransactionParameters this_obj);
11335         export function DirectedChannelTransactionParameters_free(this_obj: number): void {
11336                 if(!isWasmInitialized) {
11337                         throw new Error("initializeWasm() must be awaited first!");
11338                 }
11339                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_free(this_obj);
11340                 // debug statements here
11341         }
11342         // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_broadcaster_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
11343         export function DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg: number): number {
11344                 if(!isWasmInitialized) {
11345                         throw new Error("initializeWasm() must be awaited first!");
11346                 }
11347                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg);
11348                 return nativeResponseValue;
11349         }
11350         // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_countersignatory_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
11351         export function DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg: number): number {
11352                 if(!isWasmInitialized) {
11353                         throw new Error("initializeWasm() must be awaited first!");
11354                 }
11355                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg);
11356                 return nativeResponseValue;
11357         }
11358         // MUST_USE_RES uint16_t DirectedChannelTransactionParameters_contest_delay(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
11359         export function DirectedChannelTransactionParameters_contest_delay(this_arg: number): number {
11360                 if(!isWasmInitialized) {
11361                         throw new Error("initializeWasm() must be awaited first!");
11362                 }
11363                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_contest_delay(this_arg);
11364                 return nativeResponseValue;
11365         }
11366         // MUST_USE_RES bool DirectedChannelTransactionParameters_is_outbound(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
11367         export function DirectedChannelTransactionParameters_is_outbound(this_arg: number): boolean {
11368                 if(!isWasmInitialized) {
11369                         throw new Error("initializeWasm() must be awaited first!");
11370                 }
11371                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_is_outbound(this_arg);
11372                 return nativeResponseValue;
11373         }
11374         // MUST_USE_RES struct LDKOutPoint DirectedChannelTransactionParameters_funding_outpoint(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
11375         export function DirectedChannelTransactionParameters_funding_outpoint(this_arg: number): number {
11376                 if(!isWasmInitialized) {
11377                         throw new Error("initializeWasm() must be awaited first!");
11378                 }
11379                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_funding_outpoint(this_arg);
11380                 return nativeResponseValue;
11381         }
11382         // void HolderCommitmentTransaction_free(struct LDKHolderCommitmentTransaction this_obj);
11383         export function HolderCommitmentTransaction_free(this_obj: number): void {
11384                 if(!isWasmInitialized) {
11385                         throw new Error("initializeWasm() must be awaited first!");
11386                 }
11387                 const nativeResponseValue = wasm.HolderCommitmentTransaction_free(this_obj);
11388                 // debug statements here
11389         }
11390         // struct LDKSignature HolderCommitmentTransaction_get_counterparty_sig(const struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr);
11391         export function HolderCommitmentTransaction_get_counterparty_sig(this_ptr: number): Uint8Array {
11392                 if(!isWasmInitialized) {
11393                         throw new Error("initializeWasm() must be awaited first!");
11394                 }
11395                 const nativeResponseValue = wasm.HolderCommitmentTransaction_get_counterparty_sig(this_ptr);
11396                 return decodeArray(nativeResponseValue);
11397         }
11398         // void HolderCommitmentTransaction_set_counterparty_sig(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKSignature val);
11399         export function HolderCommitmentTransaction_set_counterparty_sig(this_ptr: number, val: Uint8Array): void {
11400                 if(!isWasmInitialized) {
11401                         throw new Error("initializeWasm() must be awaited first!");
11402                 }
11403                 const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_sig(this_ptr, encodeArray(val));
11404                 // debug statements here
11405         }
11406         // void HolderCommitmentTransaction_set_counterparty_htlc_sigs(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
11407         export function HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr: number, val: Uint8Array[]): void {
11408                 if(!isWasmInitialized) {
11409                         throw new Error("initializeWasm() must be awaited first!");
11410                 }
11411                 const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr, val);
11412                 // debug statements here
11413         }
11414         // struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_clone(const struct LDKHolderCommitmentTransaction *NONNULL_PTR orig);
11415         export function HolderCommitmentTransaction_clone(orig: number): number {
11416                 if(!isWasmInitialized) {
11417                         throw new Error("initializeWasm() must be awaited first!");
11418                 }
11419                 const nativeResponseValue = wasm.HolderCommitmentTransaction_clone(orig);
11420                 return nativeResponseValue;
11421         }
11422         // struct LDKCVec_u8Z HolderCommitmentTransaction_write(const struct LDKHolderCommitmentTransaction *NONNULL_PTR obj);
11423         export function HolderCommitmentTransaction_write(obj: number): Uint8Array {
11424                 if(!isWasmInitialized) {
11425                         throw new Error("initializeWasm() must be awaited first!");
11426                 }
11427                 const nativeResponseValue = wasm.HolderCommitmentTransaction_write(obj);
11428                 return decodeArray(nativeResponseValue);
11429         }
11430         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ HolderCommitmentTransaction_read(struct LDKu8slice ser);
11431         export function HolderCommitmentTransaction_read(ser: Uint8Array): number {
11432                 if(!isWasmInitialized) {
11433                         throw new Error("initializeWasm() must be awaited first!");
11434                 }
11435                 const nativeResponseValue = wasm.HolderCommitmentTransaction_read(encodeArray(ser));
11436                 return nativeResponseValue;
11437         }
11438         // 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);
11439         export function HolderCommitmentTransaction_new(commitment_tx: number, counterparty_sig: Uint8Array, counterparty_htlc_sigs: Uint8Array[], holder_funding_key: Uint8Array, counterparty_funding_key: Uint8Array): number {
11440                 if(!isWasmInitialized) {
11441                         throw new Error("initializeWasm() must be awaited first!");
11442                 }
11443                 const nativeResponseValue = wasm.HolderCommitmentTransaction_new(commitment_tx, encodeArray(counterparty_sig), counterparty_htlc_sigs, encodeArray(holder_funding_key), encodeArray(counterparty_funding_key));
11444                 return nativeResponseValue;
11445         }
11446         // void BuiltCommitmentTransaction_free(struct LDKBuiltCommitmentTransaction this_obj);
11447         export function BuiltCommitmentTransaction_free(this_obj: number): void {
11448                 if(!isWasmInitialized) {
11449                         throw new Error("initializeWasm() must be awaited first!");
11450                 }
11451                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_free(this_obj);
11452                 // debug statements here
11453         }
11454         // struct LDKTransaction BuiltCommitmentTransaction_get_transaction(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr);
11455         export function BuiltCommitmentTransaction_get_transaction(this_ptr: number): Uint8Array {
11456                 if(!isWasmInitialized) {
11457                         throw new Error("initializeWasm() must be awaited first!");
11458                 }
11459                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_transaction(this_ptr);
11460                 return decodeArray(nativeResponseValue);
11461         }
11462         // void BuiltCommitmentTransaction_set_transaction(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKTransaction val);
11463         export function BuiltCommitmentTransaction_set_transaction(this_ptr: number, val: Uint8Array): void {
11464                 if(!isWasmInitialized) {
11465                         throw new Error("initializeWasm() must be awaited first!");
11466                 }
11467                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_set_transaction(this_ptr, encodeArray(val));
11468                 // debug statements here
11469         }
11470         // const uint8_t (*BuiltCommitmentTransaction_get_txid(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr))[32];
11471         export function BuiltCommitmentTransaction_get_txid(this_ptr: number): Uint8Array {
11472                 if(!isWasmInitialized) {
11473                         throw new Error("initializeWasm() must be awaited first!");
11474                 }
11475                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_txid(this_ptr);
11476                 return decodeArray(nativeResponseValue);
11477         }
11478         // void BuiltCommitmentTransaction_set_txid(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11479         export function BuiltCommitmentTransaction_set_txid(this_ptr: number, val: Uint8Array): void {
11480                 if(!isWasmInitialized) {
11481                         throw new Error("initializeWasm() must be awaited first!");
11482                 }
11483                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_set_txid(this_ptr, encodeArray(val));
11484                 // debug statements here
11485         }
11486         // MUST_USE_RES struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_new(struct LDKTransaction transaction_arg, struct LDKThirtyTwoBytes txid_arg);
11487         export function BuiltCommitmentTransaction_new(transaction_arg: Uint8Array, txid_arg: Uint8Array): number {
11488                 if(!isWasmInitialized) {
11489                         throw new Error("initializeWasm() must be awaited first!");
11490                 }
11491                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_new(encodeArray(transaction_arg), encodeArray(txid_arg));
11492                 return nativeResponseValue;
11493         }
11494         // struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_clone(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR orig);
11495         export function BuiltCommitmentTransaction_clone(orig: number): number {
11496                 if(!isWasmInitialized) {
11497                         throw new Error("initializeWasm() must be awaited first!");
11498                 }
11499                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_clone(orig);
11500                 return nativeResponseValue;
11501         }
11502         // struct LDKCVec_u8Z BuiltCommitmentTransaction_write(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR obj);
11503         export function BuiltCommitmentTransaction_write(obj: number): Uint8Array {
11504                 if(!isWasmInitialized) {
11505                         throw new Error("initializeWasm() must be awaited first!");
11506                 }
11507                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_write(obj);
11508                 return decodeArray(nativeResponseValue);
11509         }
11510         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ BuiltCommitmentTransaction_read(struct LDKu8slice ser);
11511         export function BuiltCommitmentTransaction_read(ser: Uint8Array): number {
11512                 if(!isWasmInitialized) {
11513                         throw new Error("initializeWasm() must be awaited first!");
11514                 }
11515                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_read(encodeArray(ser));
11516                 return nativeResponseValue;
11517         }
11518         // 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);
11519         export function BuiltCommitmentTransaction_get_sighash_all(this_arg: number, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
11520                 if(!isWasmInitialized) {
11521                         throw new Error("initializeWasm() must be awaited first!");
11522                 }
11523                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_sighash_all(this_arg, encodeArray(funding_redeemscript), channel_value_satoshis);
11524                 return decodeArray(nativeResponseValue);
11525         }
11526         // 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);
11527         export function BuiltCommitmentTransaction_sign(this_arg: number, funding_key: Uint8Array, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
11528                 if(!isWasmInitialized) {
11529                         throw new Error("initializeWasm() must be awaited first!");
11530                 }
11531                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_sign(this_arg, encodeArray(funding_key), encodeArray(funding_redeemscript), channel_value_satoshis);
11532                 return decodeArray(nativeResponseValue);
11533         }
11534         // void CommitmentTransaction_free(struct LDKCommitmentTransaction this_obj);
11535         export function CommitmentTransaction_free(this_obj: number): void {
11536                 if(!isWasmInitialized) {
11537                         throw new Error("initializeWasm() must be awaited first!");
11538                 }
11539                 const nativeResponseValue = wasm.CommitmentTransaction_free(this_obj);
11540                 // debug statements here
11541         }
11542         // struct LDKCommitmentTransaction CommitmentTransaction_clone(const struct LDKCommitmentTransaction *NONNULL_PTR orig);
11543         export function CommitmentTransaction_clone(orig: number): number {
11544                 if(!isWasmInitialized) {
11545                         throw new Error("initializeWasm() must be awaited first!");
11546                 }
11547                 const nativeResponseValue = wasm.CommitmentTransaction_clone(orig);
11548                 return nativeResponseValue;
11549         }
11550         // struct LDKCVec_u8Z CommitmentTransaction_write(const struct LDKCommitmentTransaction *NONNULL_PTR obj);
11551         export function CommitmentTransaction_write(obj: number): Uint8Array {
11552                 if(!isWasmInitialized) {
11553                         throw new Error("initializeWasm() must be awaited first!");
11554                 }
11555                 const nativeResponseValue = wasm.CommitmentTransaction_write(obj);
11556                 return decodeArray(nativeResponseValue);
11557         }
11558         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CommitmentTransaction_read(struct LDKu8slice ser);
11559         export function CommitmentTransaction_read(ser: Uint8Array): number {
11560                 if(!isWasmInitialized) {
11561                         throw new Error("initializeWasm() must be awaited first!");
11562                 }
11563                 const nativeResponseValue = wasm.CommitmentTransaction_read(encodeArray(ser));
11564                 return nativeResponseValue;
11565         }
11566         // MUST_USE_RES uint64_t CommitmentTransaction_commitment_number(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
11567         export function CommitmentTransaction_commitment_number(this_arg: number): number {
11568                 if(!isWasmInitialized) {
11569                         throw new Error("initializeWasm() must be awaited first!");
11570                 }
11571                 const nativeResponseValue = wasm.CommitmentTransaction_commitment_number(this_arg);
11572                 return nativeResponseValue;
11573         }
11574         // MUST_USE_RES uint64_t CommitmentTransaction_to_broadcaster_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
11575         export function CommitmentTransaction_to_broadcaster_value_sat(this_arg: number): number {
11576                 if(!isWasmInitialized) {
11577                         throw new Error("initializeWasm() must be awaited first!");
11578                 }
11579                 const nativeResponseValue = wasm.CommitmentTransaction_to_broadcaster_value_sat(this_arg);
11580                 return nativeResponseValue;
11581         }
11582         // MUST_USE_RES uint64_t CommitmentTransaction_to_countersignatory_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
11583         export function CommitmentTransaction_to_countersignatory_value_sat(this_arg: number): number {
11584                 if(!isWasmInitialized) {
11585                         throw new Error("initializeWasm() must be awaited first!");
11586                 }
11587                 const nativeResponseValue = wasm.CommitmentTransaction_to_countersignatory_value_sat(this_arg);
11588                 return nativeResponseValue;
11589         }
11590         // MUST_USE_RES uint32_t CommitmentTransaction_feerate_per_kw(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
11591         export function CommitmentTransaction_feerate_per_kw(this_arg: number): number {
11592                 if(!isWasmInitialized) {
11593                         throw new Error("initializeWasm() must be awaited first!");
11594                 }
11595                 const nativeResponseValue = wasm.CommitmentTransaction_feerate_per_kw(this_arg);
11596                 return nativeResponseValue;
11597         }
11598         // MUST_USE_RES struct LDKTrustedCommitmentTransaction CommitmentTransaction_trust(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
11599         export function CommitmentTransaction_trust(this_arg: number): number {
11600                 if(!isWasmInitialized) {
11601                         throw new Error("initializeWasm() must be awaited first!");
11602                 }
11603                 const nativeResponseValue = wasm.CommitmentTransaction_trust(this_arg);
11604                 return nativeResponseValue;
11605         }
11606         // 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);
11607         export function CommitmentTransaction_verify(this_arg: number, channel_parameters: number, broadcaster_keys: number, countersignatory_keys: number): number {
11608                 if(!isWasmInitialized) {
11609                         throw new Error("initializeWasm() must be awaited first!");
11610                 }
11611                 const nativeResponseValue = wasm.CommitmentTransaction_verify(this_arg, channel_parameters, broadcaster_keys, countersignatory_keys);
11612                 return nativeResponseValue;
11613         }
11614         // void TrustedCommitmentTransaction_free(struct LDKTrustedCommitmentTransaction this_obj);
11615         export function TrustedCommitmentTransaction_free(this_obj: number): void {
11616                 if(!isWasmInitialized) {
11617                         throw new Error("initializeWasm() must be awaited first!");
11618                 }
11619                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_free(this_obj);
11620                 // debug statements here
11621         }
11622         // MUST_USE_RES struct LDKThirtyTwoBytes TrustedCommitmentTransaction_txid(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
11623         export function TrustedCommitmentTransaction_txid(this_arg: number): Uint8Array {
11624                 if(!isWasmInitialized) {
11625                         throw new Error("initializeWasm() must be awaited first!");
11626                 }
11627                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_txid(this_arg);
11628                 return decodeArray(nativeResponseValue);
11629         }
11630         // MUST_USE_RES struct LDKBuiltCommitmentTransaction TrustedCommitmentTransaction_built_transaction(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
11631         export function TrustedCommitmentTransaction_built_transaction(this_arg: number): number {
11632                 if(!isWasmInitialized) {
11633                         throw new Error("initializeWasm() must be awaited first!");
11634                 }
11635                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_built_transaction(this_arg);
11636                 return nativeResponseValue;
11637         }
11638         // MUST_USE_RES struct LDKTxCreationKeys TrustedCommitmentTransaction_keys(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
11639         export function TrustedCommitmentTransaction_keys(this_arg: number): number {
11640                 if(!isWasmInitialized) {
11641                         throw new Error("initializeWasm() must be awaited first!");
11642                 }
11643                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_keys(this_arg);
11644                 return nativeResponseValue;
11645         }
11646         // 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);
11647         export function TrustedCommitmentTransaction_get_htlc_sigs(this_arg: number, htlc_base_key: Uint8Array, channel_parameters: number): number {
11648                 if(!isWasmInitialized) {
11649                         throw new Error("initializeWasm() must be awaited first!");
11650                 }
11651                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_get_htlc_sigs(this_arg, encodeArray(htlc_base_key), channel_parameters);
11652                 return nativeResponseValue;
11653         }
11654         // uint64_t get_commitment_transaction_number_obscure_factor(struct LDKPublicKey broadcaster_payment_basepoint, struct LDKPublicKey countersignatory_payment_basepoint, bool outbound_from_broadcaster);
11655         export function get_commitment_transaction_number_obscure_factor(broadcaster_payment_basepoint: Uint8Array, countersignatory_payment_basepoint: Uint8Array, outbound_from_broadcaster: boolean): number {
11656                 if(!isWasmInitialized) {
11657                         throw new Error("initializeWasm() must be awaited first!");
11658                 }
11659                 const nativeResponseValue = wasm.get_commitment_transaction_number_obscure_factor(encodeArray(broadcaster_payment_basepoint), encodeArray(countersignatory_payment_basepoint), outbound_from_broadcaster);
11660                 return nativeResponseValue;
11661         }
11662         // struct LDKInitFeatures InitFeatures_clone(const struct LDKInitFeatures *NONNULL_PTR orig);
11663         export function InitFeatures_clone(orig: number): number {
11664                 if(!isWasmInitialized) {
11665                         throw new Error("initializeWasm() must be awaited first!");
11666                 }
11667                 const nativeResponseValue = wasm.InitFeatures_clone(orig);
11668                 return nativeResponseValue;
11669         }
11670         // struct LDKNodeFeatures NodeFeatures_clone(const struct LDKNodeFeatures *NONNULL_PTR orig);
11671         export function NodeFeatures_clone(orig: number): number {
11672                 if(!isWasmInitialized) {
11673                         throw new Error("initializeWasm() must be awaited first!");
11674                 }
11675                 const nativeResponseValue = wasm.NodeFeatures_clone(orig);
11676                 return nativeResponseValue;
11677         }
11678         // struct LDKChannelFeatures ChannelFeatures_clone(const struct LDKChannelFeatures *NONNULL_PTR orig);
11679         export function ChannelFeatures_clone(orig: number): number {
11680                 if(!isWasmInitialized) {
11681                         throw new Error("initializeWasm() must be awaited first!");
11682                 }
11683                 const nativeResponseValue = wasm.ChannelFeatures_clone(orig);
11684                 return nativeResponseValue;
11685         }
11686         // struct LDKInvoiceFeatures InvoiceFeatures_clone(const struct LDKInvoiceFeatures *NONNULL_PTR orig);
11687         export function InvoiceFeatures_clone(orig: number): number {
11688                 if(!isWasmInitialized) {
11689                         throw new Error("initializeWasm() must be awaited first!");
11690                 }
11691                 const nativeResponseValue = wasm.InvoiceFeatures_clone(orig);
11692                 return nativeResponseValue;
11693         }
11694         // void InitFeatures_free(struct LDKInitFeatures this_obj);
11695         export function InitFeatures_free(this_obj: number): void {
11696                 if(!isWasmInitialized) {
11697                         throw new Error("initializeWasm() must be awaited first!");
11698                 }
11699                 const nativeResponseValue = wasm.InitFeatures_free(this_obj);
11700                 // debug statements here
11701         }
11702         // void NodeFeatures_free(struct LDKNodeFeatures this_obj);
11703         export function NodeFeatures_free(this_obj: number): void {
11704                 if(!isWasmInitialized) {
11705                         throw new Error("initializeWasm() must be awaited first!");
11706                 }
11707                 const nativeResponseValue = wasm.NodeFeatures_free(this_obj);
11708                 // debug statements here
11709         }
11710         // void ChannelFeatures_free(struct LDKChannelFeatures this_obj);
11711         export function ChannelFeatures_free(this_obj: number): void {
11712                 if(!isWasmInitialized) {
11713                         throw new Error("initializeWasm() must be awaited first!");
11714                 }
11715                 const nativeResponseValue = wasm.ChannelFeatures_free(this_obj);
11716                 // debug statements here
11717         }
11718         // void InvoiceFeatures_free(struct LDKInvoiceFeatures this_obj);
11719         export function InvoiceFeatures_free(this_obj: number): void {
11720                 if(!isWasmInitialized) {
11721                         throw new Error("initializeWasm() must be awaited first!");
11722                 }
11723                 const nativeResponseValue = wasm.InvoiceFeatures_free(this_obj);
11724                 // debug statements here
11725         }
11726         // MUST_USE_RES struct LDKInitFeatures InitFeatures_empty(void);
11727         export function InitFeatures_empty(): number {
11728                 if(!isWasmInitialized) {
11729                         throw new Error("initializeWasm() must be awaited first!");
11730                 }
11731                 const nativeResponseValue = wasm.InitFeatures_empty();
11732                 return nativeResponseValue;
11733         }
11734         // MUST_USE_RES struct LDKInitFeatures InitFeatures_known(void);
11735         export function InitFeatures_known(): number {
11736                 if(!isWasmInitialized) {
11737                         throw new Error("initializeWasm() must be awaited first!");
11738                 }
11739                 const nativeResponseValue = wasm.InitFeatures_known();
11740                 return nativeResponseValue;
11741         }
11742         // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_empty(void);
11743         export function NodeFeatures_empty(): number {
11744                 if(!isWasmInitialized) {
11745                         throw new Error("initializeWasm() must be awaited first!");
11746                 }
11747                 const nativeResponseValue = wasm.NodeFeatures_empty();
11748                 return nativeResponseValue;
11749         }
11750         // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_known(void);
11751         export function NodeFeatures_known(): number {
11752                 if(!isWasmInitialized) {
11753                         throw new Error("initializeWasm() must be awaited first!");
11754                 }
11755                 const nativeResponseValue = wasm.NodeFeatures_known();
11756                 return nativeResponseValue;
11757         }
11758         // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_empty(void);
11759         export function ChannelFeatures_empty(): number {
11760                 if(!isWasmInitialized) {
11761                         throw new Error("initializeWasm() must be awaited first!");
11762                 }
11763                 const nativeResponseValue = wasm.ChannelFeatures_empty();
11764                 return nativeResponseValue;
11765         }
11766         // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_known(void);
11767         export function ChannelFeatures_known(): number {
11768                 if(!isWasmInitialized) {
11769                         throw new Error("initializeWasm() must be awaited first!");
11770                 }
11771                 const nativeResponseValue = wasm.ChannelFeatures_known();
11772                 return nativeResponseValue;
11773         }
11774         // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_empty(void);
11775         export function InvoiceFeatures_empty(): number {
11776                 if(!isWasmInitialized) {
11777                         throw new Error("initializeWasm() must be awaited first!");
11778                 }
11779                 const nativeResponseValue = wasm.InvoiceFeatures_empty();
11780                 return nativeResponseValue;
11781         }
11782         // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_known(void);
11783         export function InvoiceFeatures_known(): number {
11784                 if(!isWasmInitialized) {
11785                         throw new Error("initializeWasm() must be awaited first!");
11786                 }
11787                 const nativeResponseValue = wasm.InvoiceFeatures_known();
11788                 return nativeResponseValue;
11789         }
11790         // struct LDKCVec_u8Z InitFeatures_write(const struct LDKInitFeatures *NONNULL_PTR obj);
11791         export function InitFeatures_write(obj: number): Uint8Array {
11792                 if(!isWasmInitialized) {
11793                         throw new Error("initializeWasm() must be awaited first!");
11794                 }
11795                 const nativeResponseValue = wasm.InitFeatures_write(obj);
11796                 return decodeArray(nativeResponseValue);
11797         }
11798         // struct LDKCVec_u8Z NodeFeatures_write(const struct LDKNodeFeatures *NONNULL_PTR obj);
11799         export function NodeFeatures_write(obj: number): Uint8Array {
11800                 if(!isWasmInitialized) {
11801                         throw new Error("initializeWasm() must be awaited first!");
11802                 }
11803                 const nativeResponseValue = wasm.NodeFeatures_write(obj);
11804                 return decodeArray(nativeResponseValue);
11805         }
11806         // struct LDKCVec_u8Z ChannelFeatures_write(const struct LDKChannelFeatures *NONNULL_PTR obj);
11807         export function ChannelFeatures_write(obj: number): Uint8Array {
11808                 if(!isWasmInitialized) {
11809                         throw new Error("initializeWasm() must be awaited first!");
11810                 }
11811                 const nativeResponseValue = wasm.ChannelFeatures_write(obj);
11812                 return decodeArray(nativeResponseValue);
11813         }
11814         // struct LDKCVec_u8Z InvoiceFeatures_write(const struct LDKInvoiceFeatures *NONNULL_PTR obj);
11815         export function InvoiceFeatures_write(obj: number): Uint8Array {
11816                 if(!isWasmInitialized) {
11817                         throw new Error("initializeWasm() must be awaited first!");
11818                 }
11819                 const nativeResponseValue = wasm.InvoiceFeatures_write(obj);
11820                 return decodeArray(nativeResponseValue);
11821         }
11822         // struct LDKCResult_InitFeaturesDecodeErrorZ InitFeatures_read(struct LDKu8slice ser);
11823         export function InitFeatures_read(ser: Uint8Array): number {
11824                 if(!isWasmInitialized) {
11825                         throw new Error("initializeWasm() must be awaited first!");
11826                 }
11827                 const nativeResponseValue = wasm.InitFeatures_read(encodeArray(ser));
11828                 return nativeResponseValue;
11829         }
11830         // struct LDKCResult_NodeFeaturesDecodeErrorZ NodeFeatures_read(struct LDKu8slice ser);
11831         export function NodeFeatures_read(ser: Uint8Array): number {
11832                 if(!isWasmInitialized) {
11833                         throw new Error("initializeWasm() must be awaited first!");
11834                 }
11835                 const nativeResponseValue = wasm.NodeFeatures_read(encodeArray(ser));
11836                 return nativeResponseValue;
11837         }
11838         // struct LDKCResult_ChannelFeaturesDecodeErrorZ ChannelFeatures_read(struct LDKu8slice ser);
11839         export function ChannelFeatures_read(ser: Uint8Array): number {
11840                 if(!isWasmInitialized) {
11841                         throw new Error("initializeWasm() must be awaited first!");
11842                 }
11843                 const nativeResponseValue = wasm.ChannelFeatures_read(encodeArray(ser));
11844                 return nativeResponseValue;
11845         }
11846         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ InvoiceFeatures_read(struct LDKu8slice ser);
11847         export function InvoiceFeatures_read(ser: Uint8Array): number {
11848                 if(!isWasmInitialized) {
11849                         throw new Error("initializeWasm() must be awaited first!");
11850                 }
11851                 const nativeResponseValue = wasm.InvoiceFeatures_read(encodeArray(ser));
11852                 return nativeResponseValue;
11853         }
11854         // void RouteHop_free(struct LDKRouteHop this_obj);
11855         export function RouteHop_free(this_obj: number): void {
11856                 if(!isWasmInitialized) {
11857                         throw new Error("initializeWasm() must be awaited first!");
11858                 }
11859                 const nativeResponseValue = wasm.RouteHop_free(this_obj);
11860                 // debug statements here
11861         }
11862         // struct LDKPublicKey RouteHop_get_pubkey(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11863         export function RouteHop_get_pubkey(this_ptr: number): Uint8Array {
11864                 if(!isWasmInitialized) {
11865                         throw new Error("initializeWasm() must be awaited first!");
11866                 }
11867                 const nativeResponseValue = wasm.RouteHop_get_pubkey(this_ptr);
11868                 return decodeArray(nativeResponseValue);
11869         }
11870         // void RouteHop_set_pubkey(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11871         export function RouteHop_set_pubkey(this_ptr: number, val: Uint8Array): void {
11872                 if(!isWasmInitialized) {
11873                         throw new Error("initializeWasm() must be awaited first!");
11874                 }
11875                 const nativeResponseValue = wasm.RouteHop_set_pubkey(this_ptr, encodeArray(val));
11876                 // debug statements here
11877         }
11878         // struct LDKNodeFeatures RouteHop_get_node_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11879         export function RouteHop_get_node_features(this_ptr: number): number {
11880                 if(!isWasmInitialized) {
11881                         throw new Error("initializeWasm() must be awaited first!");
11882                 }
11883                 const nativeResponseValue = wasm.RouteHop_get_node_features(this_ptr);
11884                 return nativeResponseValue;
11885         }
11886         // void RouteHop_set_node_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
11887         export function RouteHop_set_node_features(this_ptr: number, val: number): void {
11888                 if(!isWasmInitialized) {
11889                         throw new Error("initializeWasm() must be awaited first!");
11890                 }
11891                 const nativeResponseValue = wasm.RouteHop_set_node_features(this_ptr, val);
11892                 // debug statements here
11893         }
11894         // uint64_t RouteHop_get_short_channel_id(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11895         export function RouteHop_get_short_channel_id(this_ptr: number): number {
11896                 if(!isWasmInitialized) {
11897                         throw new Error("initializeWasm() must be awaited first!");
11898                 }
11899                 const nativeResponseValue = wasm.RouteHop_get_short_channel_id(this_ptr);
11900                 return nativeResponseValue;
11901         }
11902         // void RouteHop_set_short_channel_id(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
11903         export function RouteHop_set_short_channel_id(this_ptr: number, val: number): void {
11904                 if(!isWasmInitialized) {
11905                         throw new Error("initializeWasm() must be awaited first!");
11906                 }
11907                 const nativeResponseValue = wasm.RouteHop_set_short_channel_id(this_ptr, val);
11908                 // debug statements here
11909         }
11910         // struct LDKChannelFeatures RouteHop_get_channel_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11911         export function RouteHop_get_channel_features(this_ptr: number): number {
11912                 if(!isWasmInitialized) {
11913                         throw new Error("initializeWasm() must be awaited first!");
11914                 }
11915                 const nativeResponseValue = wasm.RouteHop_get_channel_features(this_ptr);
11916                 return nativeResponseValue;
11917         }
11918         // void RouteHop_set_channel_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
11919         export function RouteHop_set_channel_features(this_ptr: number, val: number): void {
11920                 if(!isWasmInitialized) {
11921                         throw new Error("initializeWasm() must be awaited first!");
11922                 }
11923                 const nativeResponseValue = wasm.RouteHop_set_channel_features(this_ptr, val);
11924                 // debug statements here
11925         }
11926         // uint64_t RouteHop_get_fee_msat(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11927         export function RouteHop_get_fee_msat(this_ptr: number): number {
11928                 if(!isWasmInitialized) {
11929                         throw new Error("initializeWasm() must be awaited first!");
11930                 }
11931                 const nativeResponseValue = wasm.RouteHop_get_fee_msat(this_ptr);
11932                 return nativeResponseValue;
11933         }
11934         // void RouteHop_set_fee_msat(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
11935         export function RouteHop_set_fee_msat(this_ptr: number, val: number): void {
11936                 if(!isWasmInitialized) {
11937                         throw new Error("initializeWasm() must be awaited first!");
11938                 }
11939                 const nativeResponseValue = wasm.RouteHop_set_fee_msat(this_ptr, val);
11940                 // debug statements here
11941         }
11942         // uint32_t RouteHop_get_cltv_expiry_delta(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11943         export function RouteHop_get_cltv_expiry_delta(this_ptr: number): number {
11944                 if(!isWasmInitialized) {
11945                         throw new Error("initializeWasm() must be awaited first!");
11946                 }
11947                 const nativeResponseValue = wasm.RouteHop_get_cltv_expiry_delta(this_ptr);
11948                 return nativeResponseValue;
11949         }
11950         // void RouteHop_set_cltv_expiry_delta(struct LDKRouteHop *NONNULL_PTR this_ptr, uint32_t val);
11951         export function RouteHop_set_cltv_expiry_delta(this_ptr: number, val: number): void {
11952                 if(!isWasmInitialized) {
11953                         throw new Error("initializeWasm() must be awaited first!");
11954                 }
11955                 const nativeResponseValue = wasm.RouteHop_set_cltv_expiry_delta(this_ptr, val);
11956                 // debug statements here
11957         }
11958         // 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);
11959         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 {
11960                 if(!isWasmInitialized) {
11961                         throw new Error("initializeWasm() must be awaited first!");
11962                 }
11963                 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);
11964                 return nativeResponseValue;
11965         }
11966         // struct LDKRouteHop RouteHop_clone(const struct LDKRouteHop *NONNULL_PTR orig);
11967         export function RouteHop_clone(orig: number): number {
11968                 if(!isWasmInitialized) {
11969                         throw new Error("initializeWasm() must be awaited first!");
11970                 }
11971                 const nativeResponseValue = wasm.RouteHop_clone(orig);
11972                 return nativeResponseValue;
11973         }
11974         // void Route_free(struct LDKRoute this_obj);
11975         export function Route_free(this_obj: number): void {
11976                 if(!isWasmInitialized) {
11977                         throw new Error("initializeWasm() must be awaited first!");
11978                 }
11979                 const nativeResponseValue = wasm.Route_free(this_obj);
11980                 // debug statements here
11981         }
11982         // void Route_set_paths(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKCVec_CVec_RouteHopZZ val);
11983         export function Route_set_paths(this_ptr: number, val: number[][]): void {
11984                 if(!isWasmInitialized) {
11985                         throw new Error("initializeWasm() must be awaited first!");
11986                 }
11987                 const nativeResponseValue = wasm.Route_set_paths(this_ptr, val);
11988                 // debug statements here
11989         }
11990         // MUST_USE_RES struct LDKRoute Route_new(struct LDKCVec_CVec_RouteHopZZ paths_arg);
11991         export function Route_new(paths_arg: number[][]): number {
11992                 if(!isWasmInitialized) {
11993                         throw new Error("initializeWasm() must be awaited first!");
11994                 }
11995                 const nativeResponseValue = wasm.Route_new(paths_arg);
11996                 return nativeResponseValue;
11997         }
11998         // struct LDKRoute Route_clone(const struct LDKRoute *NONNULL_PTR orig);
11999         export function Route_clone(orig: number): number {
12000                 if(!isWasmInitialized) {
12001                         throw new Error("initializeWasm() must be awaited first!");
12002                 }
12003                 const nativeResponseValue = wasm.Route_clone(orig);
12004                 return nativeResponseValue;
12005         }
12006         // struct LDKCVec_u8Z Route_write(const struct LDKRoute *NONNULL_PTR obj);
12007         export function Route_write(obj: number): Uint8Array {
12008                 if(!isWasmInitialized) {
12009                         throw new Error("initializeWasm() must be awaited first!");
12010                 }
12011                 const nativeResponseValue = wasm.Route_write(obj);
12012                 return decodeArray(nativeResponseValue);
12013         }
12014         // struct LDKCResult_RouteDecodeErrorZ Route_read(struct LDKu8slice ser);
12015         export function Route_read(ser: Uint8Array): number {
12016                 if(!isWasmInitialized) {
12017                         throw new Error("initializeWasm() must be awaited first!");
12018                 }
12019                 const nativeResponseValue = wasm.Route_read(encodeArray(ser));
12020                 return nativeResponseValue;
12021         }
12022         // void RouteHint_free(struct LDKRouteHint this_obj);
12023         export function RouteHint_free(this_obj: number): void {
12024                 if(!isWasmInitialized) {
12025                         throw new Error("initializeWasm() must be awaited first!");
12026                 }
12027                 const nativeResponseValue = wasm.RouteHint_free(this_obj);
12028                 // debug statements here
12029         }
12030         // struct LDKPublicKey RouteHint_get_src_node_id(const struct LDKRouteHint *NONNULL_PTR this_ptr);
12031         export function RouteHint_get_src_node_id(this_ptr: number): Uint8Array {
12032                 if(!isWasmInitialized) {
12033                         throw new Error("initializeWasm() must be awaited first!");
12034                 }
12035                 const nativeResponseValue = wasm.RouteHint_get_src_node_id(this_ptr);
12036                 return decodeArray(nativeResponseValue);
12037         }
12038         // void RouteHint_set_src_node_id(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12039         export function RouteHint_set_src_node_id(this_ptr: number, val: Uint8Array): void {
12040                 if(!isWasmInitialized) {
12041                         throw new Error("initializeWasm() must be awaited first!");
12042                 }
12043                 const nativeResponseValue = wasm.RouteHint_set_src_node_id(this_ptr, encodeArray(val));
12044                 // debug statements here
12045         }
12046         // uint64_t RouteHint_get_short_channel_id(const struct LDKRouteHint *NONNULL_PTR this_ptr);
12047         export function RouteHint_get_short_channel_id(this_ptr: number): number {
12048                 if(!isWasmInitialized) {
12049                         throw new Error("initializeWasm() must be awaited first!");
12050                 }
12051                 const nativeResponseValue = wasm.RouteHint_get_short_channel_id(this_ptr);
12052                 return nativeResponseValue;
12053         }
12054         // void RouteHint_set_short_channel_id(struct LDKRouteHint *NONNULL_PTR this_ptr, uint64_t val);
12055         export function RouteHint_set_short_channel_id(this_ptr: number, val: number): void {
12056                 if(!isWasmInitialized) {
12057                         throw new Error("initializeWasm() must be awaited first!");
12058                 }
12059                 const nativeResponseValue = wasm.RouteHint_set_short_channel_id(this_ptr, val);
12060                 // debug statements here
12061         }
12062         // struct LDKRoutingFees RouteHint_get_fees(const struct LDKRouteHint *NONNULL_PTR this_ptr);
12063         export function RouteHint_get_fees(this_ptr: number): number {
12064                 if(!isWasmInitialized) {
12065                         throw new Error("initializeWasm() must be awaited first!");
12066                 }
12067                 const nativeResponseValue = wasm.RouteHint_get_fees(this_ptr);
12068                 return nativeResponseValue;
12069         }
12070         // void RouteHint_set_fees(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
12071         export function RouteHint_set_fees(this_ptr: number, val: number): void {
12072                 if(!isWasmInitialized) {
12073                         throw new Error("initializeWasm() must be awaited first!");
12074                 }
12075                 const nativeResponseValue = wasm.RouteHint_set_fees(this_ptr, val);
12076                 // debug statements here
12077         }
12078         // uint16_t RouteHint_get_cltv_expiry_delta(const struct LDKRouteHint *NONNULL_PTR this_ptr);
12079         export function RouteHint_get_cltv_expiry_delta(this_ptr: number): number {
12080                 if(!isWasmInitialized) {
12081                         throw new Error("initializeWasm() must be awaited first!");
12082                 }
12083                 const nativeResponseValue = wasm.RouteHint_get_cltv_expiry_delta(this_ptr);
12084                 return nativeResponseValue;
12085         }
12086         // void RouteHint_set_cltv_expiry_delta(struct LDKRouteHint *NONNULL_PTR this_ptr, uint16_t val);
12087         export function RouteHint_set_cltv_expiry_delta(this_ptr: number, val: number): void {
12088                 if(!isWasmInitialized) {
12089                         throw new Error("initializeWasm() must be awaited first!");
12090                 }
12091                 const nativeResponseValue = wasm.RouteHint_set_cltv_expiry_delta(this_ptr, val);
12092                 // debug statements here
12093         }
12094         // struct LDKCOption_u64Z RouteHint_get_htlc_minimum_msat(const struct LDKRouteHint *NONNULL_PTR this_ptr);
12095         export function RouteHint_get_htlc_minimum_msat(this_ptr: number): number {
12096                 if(!isWasmInitialized) {
12097                         throw new Error("initializeWasm() must be awaited first!");
12098                 }
12099                 const nativeResponseValue = wasm.RouteHint_get_htlc_minimum_msat(this_ptr);
12100                 return nativeResponseValue;
12101         }
12102         // void RouteHint_set_htlc_minimum_msat(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
12103         export function RouteHint_set_htlc_minimum_msat(this_ptr: number, val: number): void {
12104                 if(!isWasmInitialized) {
12105                         throw new Error("initializeWasm() must be awaited first!");
12106                 }
12107                 const nativeResponseValue = wasm.RouteHint_set_htlc_minimum_msat(this_ptr, val);
12108                 // debug statements here
12109         }
12110         // struct LDKCOption_u64Z RouteHint_get_htlc_maximum_msat(const struct LDKRouteHint *NONNULL_PTR this_ptr);
12111         export function RouteHint_get_htlc_maximum_msat(this_ptr: number): number {
12112                 if(!isWasmInitialized) {
12113                         throw new Error("initializeWasm() must be awaited first!");
12114                 }
12115                 const nativeResponseValue = wasm.RouteHint_get_htlc_maximum_msat(this_ptr);
12116                 return nativeResponseValue;
12117         }
12118         // void RouteHint_set_htlc_maximum_msat(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
12119         export function RouteHint_set_htlc_maximum_msat(this_ptr: number, val: number): void {
12120                 if(!isWasmInitialized) {
12121                         throw new Error("initializeWasm() must be awaited first!");
12122                 }
12123                 const nativeResponseValue = wasm.RouteHint_set_htlc_maximum_msat(this_ptr, val);
12124                 // debug statements here
12125         }
12126         // MUST_USE_RES struct LDKRouteHint RouteHint_new(struct LDKPublicKey src_node_id_arg, uint64_t short_channel_id_arg, struct LDKRoutingFees fees_arg, uint16_t cltv_expiry_delta_arg, struct LDKCOption_u64Z htlc_minimum_msat_arg, struct LDKCOption_u64Z htlc_maximum_msat_arg);
12127         export function RouteHint_new(src_node_id_arg: Uint8Array, short_channel_id_arg: number, fees_arg: number, cltv_expiry_delta_arg: number, htlc_minimum_msat_arg: number, htlc_maximum_msat_arg: number): number {
12128                 if(!isWasmInitialized) {
12129                         throw new Error("initializeWasm() must be awaited first!");
12130                 }
12131                 const nativeResponseValue = wasm.RouteHint_new(encodeArray(src_node_id_arg), short_channel_id_arg, fees_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg);
12132                 return nativeResponseValue;
12133         }
12134         // struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
12135         export function RouteHint_clone(orig: number): number {
12136                 if(!isWasmInitialized) {
12137                         throw new Error("initializeWasm() must be awaited first!");
12138                 }
12139                 const nativeResponseValue = wasm.RouteHint_clone(orig);
12140                 return nativeResponseValue;
12141         }
12142         // struct LDKCResult_RouteLightningErrorZ get_route(struct LDKPublicKey our_node_id, const struct LDKNetworkGraph *NONNULL_PTR network, struct LDKPublicKey payee, struct LDKInvoiceFeatures payee_features, struct LDKCVec_ChannelDetailsZ *first_hops, struct LDKCVec_RouteHintZ last_hops, uint64_t final_value_msat, uint32_t final_cltv, struct LDKLogger logger);
12143         export function get_route(our_node_id: Uint8Array, network: number, payee: Uint8Array, payee_features: number, first_hops: number[], last_hops: number[], final_value_msat: number, final_cltv: number, logger: number): number {
12144                 if(!isWasmInitialized) {
12145                         throw new Error("initializeWasm() must be awaited first!");
12146                 }
12147                 const nativeResponseValue = wasm.get_route(encodeArray(our_node_id), network, encodeArray(payee), payee_features, first_hops, last_hops, final_value_msat, final_cltv, logger);
12148                 return nativeResponseValue;
12149         }
12150         // void NetworkGraph_free(struct LDKNetworkGraph this_obj);
12151         export function NetworkGraph_free(this_obj: number): void {
12152                 if(!isWasmInitialized) {
12153                         throw new Error("initializeWasm() must be awaited first!");
12154                 }
12155                 const nativeResponseValue = wasm.NetworkGraph_free(this_obj);
12156                 // debug statements here
12157         }
12158         // struct LDKNetworkGraph NetworkGraph_clone(const struct LDKNetworkGraph *NONNULL_PTR orig);
12159         export function NetworkGraph_clone(orig: number): number {
12160                 if(!isWasmInitialized) {
12161                         throw new Error("initializeWasm() must be awaited first!");
12162                 }
12163                 const nativeResponseValue = wasm.NetworkGraph_clone(orig);
12164                 return nativeResponseValue;
12165         }
12166         // void LockedNetworkGraph_free(struct LDKLockedNetworkGraph this_obj);
12167         export function LockedNetworkGraph_free(this_obj: number): void {
12168                 if(!isWasmInitialized) {
12169                         throw new Error("initializeWasm() must be awaited first!");
12170                 }
12171                 const nativeResponseValue = wasm.LockedNetworkGraph_free(this_obj);
12172                 // debug statements here
12173         }
12174         // void NetGraphMsgHandler_free(struct LDKNetGraphMsgHandler this_obj);
12175         export function NetGraphMsgHandler_free(this_obj: number): void {
12176                 if(!isWasmInitialized) {
12177                         throw new Error("initializeWasm() must be awaited first!");
12178                 }
12179                 const nativeResponseValue = wasm.NetGraphMsgHandler_free(this_obj);
12180                 // debug statements here
12181         }
12182         // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_new(struct LDKThirtyTwoBytes genesis_hash, struct LDKAccess *chain_access, struct LDKLogger logger);
12183         export function NetGraphMsgHandler_new(genesis_hash: Uint8Array, chain_access: number, logger: number): number {
12184                 if(!isWasmInitialized) {
12185                         throw new Error("initializeWasm() must be awaited first!");
12186                 }
12187                 const nativeResponseValue = wasm.NetGraphMsgHandler_new(encodeArray(genesis_hash), chain_access, logger);
12188                 return nativeResponseValue;
12189         }
12190         // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_from_net_graph(struct LDKAccess *chain_access, struct LDKLogger logger, struct LDKNetworkGraph network_graph);
12191         export function NetGraphMsgHandler_from_net_graph(chain_access: number, logger: number, network_graph: number): number {
12192                 if(!isWasmInitialized) {
12193                         throw new Error("initializeWasm() must be awaited first!");
12194                 }
12195                 const nativeResponseValue = wasm.NetGraphMsgHandler_from_net_graph(chain_access, logger, network_graph);
12196                 return nativeResponseValue;
12197         }
12198         // void NetGraphMsgHandler_add_chain_access(struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg, struct LDKAccess *chain_access);
12199         export function NetGraphMsgHandler_add_chain_access(this_arg: number, chain_access: number): void {
12200                 if(!isWasmInitialized) {
12201                         throw new Error("initializeWasm() must be awaited first!");
12202                 }
12203                 const nativeResponseValue = wasm.NetGraphMsgHandler_add_chain_access(this_arg, chain_access);
12204                 // debug statements here
12205         }
12206         // MUST_USE_RES struct LDKLockedNetworkGraph NetGraphMsgHandler_read_locked_graph(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
12207         export function NetGraphMsgHandler_read_locked_graph(this_arg: number): number {
12208                 if(!isWasmInitialized) {
12209                         throw new Error("initializeWasm() must be awaited first!");
12210                 }
12211                 const nativeResponseValue = wasm.NetGraphMsgHandler_read_locked_graph(this_arg);
12212                 return nativeResponseValue;
12213         }
12214         // MUST_USE_RES struct LDKNetworkGraph LockedNetworkGraph_graph(const struct LDKLockedNetworkGraph *NONNULL_PTR this_arg);
12215         export function LockedNetworkGraph_graph(this_arg: number): number {
12216                 if(!isWasmInitialized) {
12217                         throw new Error("initializeWasm() must be awaited first!");
12218                 }
12219                 const nativeResponseValue = wasm.LockedNetworkGraph_graph(this_arg);
12220                 return nativeResponseValue;
12221         }
12222         // struct LDKRoutingMessageHandler NetGraphMsgHandler_as_RoutingMessageHandler(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
12223         export function NetGraphMsgHandler_as_RoutingMessageHandler(this_arg: number): number {
12224                 if(!isWasmInitialized) {
12225                         throw new Error("initializeWasm() must be awaited first!");
12226                 }
12227                 const nativeResponseValue = wasm.NetGraphMsgHandler_as_RoutingMessageHandler(this_arg);
12228                 return nativeResponseValue;
12229         }
12230         // struct LDKMessageSendEventsProvider NetGraphMsgHandler_as_MessageSendEventsProvider(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
12231         export function NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg: number): number {
12232                 if(!isWasmInitialized) {
12233                         throw new Error("initializeWasm() must be awaited first!");
12234                 }
12235                 const nativeResponseValue = wasm.NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg);
12236                 return nativeResponseValue;
12237         }
12238         // void DirectionalChannelInfo_free(struct LDKDirectionalChannelInfo this_obj);
12239         export function DirectionalChannelInfo_free(this_obj: number): void {
12240                 if(!isWasmInitialized) {
12241                         throw new Error("initializeWasm() must be awaited first!");
12242                 }
12243                 const nativeResponseValue = wasm.DirectionalChannelInfo_free(this_obj);
12244                 // debug statements here
12245         }
12246         // uint32_t DirectionalChannelInfo_get_last_update(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
12247         export function DirectionalChannelInfo_get_last_update(this_ptr: number): number {
12248                 if(!isWasmInitialized) {
12249                         throw new Error("initializeWasm() must be awaited first!");
12250                 }
12251                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_last_update(this_ptr);
12252                 return nativeResponseValue;
12253         }
12254         // void DirectionalChannelInfo_set_last_update(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint32_t val);
12255         export function DirectionalChannelInfo_set_last_update(this_ptr: number, val: number): void {
12256                 if(!isWasmInitialized) {
12257                         throw new Error("initializeWasm() must be awaited first!");
12258                 }
12259                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update(this_ptr, val);
12260                 // debug statements here
12261         }
12262         // bool DirectionalChannelInfo_get_enabled(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
12263         export function DirectionalChannelInfo_get_enabled(this_ptr: number): boolean {
12264                 if(!isWasmInitialized) {
12265                         throw new Error("initializeWasm() must be awaited first!");
12266                 }
12267                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_enabled(this_ptr);
12268                 return nativeResponseValue;
12269         }
12270         // void DirectionalChannelInfo_set_enabled(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, bool val);
12271         export function DirectionalChannelInfo_set_enabled(this_ptr: number, val: boolean): void {
12272                 if(!isWasmInitialized) {
12273                         throw new Error("initializeWasm() must be awaited first!");
12274                 }
12275                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_enabled(this_ptr, val);
12276                 // debug statements here
12277         }
12278         // uint16_t DirectionalChannelInfo_get_cltv_expiry_delta(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
12279         export function DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr: number): number {
12280                 if(!isWasmInitialized) {
12281                         throw new Error("initializeWasm() must be awaited first!");
12282                 }
12283                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr);
12284                 return nativeResponseValue;
12285         }
12286         // void DirectionalChannelInfo_set_cltv_expiry_delta(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint16_t val);
12287         export function DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr: number, val: number): void {
12288                 if(!isWasmInitialized) {
12289                         throw new Error("initializeWasm() must be awaited first!");
12290                 }
12291                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr, val);
12292                 // debug statements here
12293         }
12294         // uint64_t DirectionalChannelInfo_get_htlc_minimum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
12295         export function DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr: number): number {
12296                 if(!isWasmInitialized) {
12297                         throw new Error("initializeWasm() must be awaited first!");
12298                 }
12299                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr);
12300                 return nativeResponseValue;
12301         }
12302         // void DirectionalChannelInfo_set_htlc_minimum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint64_t val);
12303         export function DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr: number, val: number): void {
12304                 if(!isWasmInitialized) {
12305                         throw new Error("initializeWasm() must be awaited first!");
12306                 }
12307                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr, val);
12308                 // debug statements here
12309         }
12310         // struct LDKCOption_u64Z DirectionalChannelInfo_get_htlc_maximum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
12311         export function DirectionalChannelInfo_get_htlc_maximum_msat(this_ptr: number): number {
12312                 if(!isWasmInitialized) {
12313                         throw new Error("initializeWasm() must be awaited first!");
12314                 }
12315                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_htlc_maximum_msat(this_ptr);
12316                 return nativeResponseValue;
12317         }
12318         // void DirectionalChannelInfo_set_htlc_maximum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
12319         export function DirectionalChannelInfo_set_htlc_maximum_msat(this_ptr: number, val: number): void {
12320                 if(!isWasmInitialized) {
12321                         throw new Error("initializeWasm() must be awaited first!");
12322                 }
12323                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_htlc_maximum_msat(this_ptr, val);
12324                 // debug statements here
12325         }
12326         // struct LDKRoutingFees DirectionalChannelInfo_get_fees(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
12327         export function DirectionalChannelInfo_get_fees(this_ptr: number): number {
12328                 if(!isWasmInitialized) {
12329                         throw new Error("initializeWasm() must be awaited first!");
12330                 }
12331                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_fees(this_ptr);
12332                 return nativeResponseValue;
12333         }
12334         // void DirectionalChannelInfo_set_fees(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
12335         export function DirectionalChannelInfo_set_fees(this_ptr: number, val: number): void {
12336                 if(!isWasmInitialized) {
12337                         throw new Error("initializeWasm() must be awaited first!");
12338                 }
12339                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_fees(this_ptr, val);
12340                 // debug statements here
12341         }
12342         // struct LDKChannelUpdate DirectionalChannelInfo_get_last_update_message(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
12343         export function DirectionalChannelInfo_get_last_update_message(this_ptr: number): number {
12344                 if(!isWasmInitialized) {
12345                         throw new Error("initializeWasm() must be awaited first!");
12346                 }
12347                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_last_update_message(this_ptr);
12348                 return nativeResponseValue;
12349         }
12350         // void DirectionalChannelInfo_set_last_update_message(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelUpdate val);
12351         export function DirectionalChannelInfo_set_last_update_message(this_ptr: number, val: number): void {
12352                 if(!isWasmInitialized) {
12353                         throw new Error("initializeWasm() must be awaited first!");
12354                 }
12355                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update_message(this_ptr, val);
12356                 // debug statements here
12357         }
12358         // 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);
12359         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 {
12360                 if(!isWasmInitialized) {
12361                         throw new Error("initializeWasm() must be awaited first!");
12362                 }
12363                 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);
12364                 return nativeResponseValue;
12365         }
12366         // struct LDKDirectionalChannelInfo DirectionalChannelInfo_clone(const struct LDKDirectionalChannelInfo *NONNULL_PTR orig);
12367         export function DirectionalChannelInfo_clone(orig: number): number {
12368                 if(!isWasmInitialized) {
12369                         throw new Error("initializeWasm() must be awaited first!");
12370                 }
12371                 const nativeResponseValue = wasm.DirectionalChannelInfo_clone(orig);
12372                 return nativeResponseValue;
12373         }
12374         // struct LDKCVec_u8Z DirectionalChannelInfo_write(const struct LDKDirectionalChannelInfo *NONNULL_PTR obj);
12375         export function DirectionalChannelInfo_write(obj: number): Uint8Array {
12376                 if(!isWasmInitialized) {
12377                         throw new Error("initializeWasm() must be awaited first!");
12378                 }
12379                 const nativeResponseValue = wasm.DirectionalChannelInfo_write(obj);
12380                 return decodeArray(nativeResponseValue);
12381         }
12382         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ DirectionalChannelInfo_read(struct LDKu8slice ser);
12383         export function DirectionalChannelInfo_read(ser: Uint8Array): number {
12384                 if(!isWasmInitialized) {
12385                         throw new Error("initializeWasm() must be awaited first!");
12386                 }
12387                 const nativeResponseValue = wasm.DirectionalChannelInfo_read(encodeArray(ser));
12388                 return nativeResponseValue;
12389         }
12390         // void ChannelInfo_free(struct LDKChannelInfo this_obj);
12391         export function ChannelInfo_free(this_obj: number): void {
12392                 if(!isWasmInitialized) {
12393                         throw new Error("initializeWasm() must be awaited first!");
12394                 }
12395                 const nativeResponseValue = wasm.ChannelInfo_free(this_obj);
12396                 // debug statements here
12397         }
12398         // struct LDKChannelFeatures ChannelInfo_get_features(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
12399         export function ChannelInfo_get_features(this_ptr: number): number {
12400                 if(!isWasmInitialized) {
12401                         throw new Error("initializeWasm() must be awaited first!");
12402                 }
12403                 const nativeResponseValue = wasm.ChannelInfo_get_features(this_ptr);
12404                 return nativeResponseValue;
12405         }
12406         // void ChannelInfo_set_features(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
12407         export function ChannelInfo_set_features(this_ptr: number, val: number): void {
12408                 if(!isWasmInitialized) {
12409                         throw new Error("initializeWasm() must be awaited first!");
12410                 }
12411                 const nativeResponseValue = wasm.ChannelInfo_set_features(this_ptr, val);
12412                 // debug statements here
12413         }
12414         // struct LDKPublicKey ChannelInfo_get_node_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
12415         export function ChannelInfo_get_node_one(this_ptr: number): Uint8Array {
12416                 if(!isWasmInitialized) {
12417                         throw new Error("initializeWasm() must be awaited first!");
12418                 }
12419                 const nativeResponseValue = wasm.ChannelInfo_get_node_one(this_ptr);
12420                 return decodeArray(nativeResponseValue);
12421         }
12422         // void ChannelInfo_set_node_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12423         export function ChannelInfo_set_node_one(this_ptr: number, val: Uint8Array): void {
12424                 if(!isWasmInitialized) {
12425                         throw new Error("initializeWasm() must be awaited first!");
12426                 }
12427                 const nativeResponseValue = wasm.ChannelInfo_set_node_one(this_ptr, encodeArray(val));
12428                 // debug statements here
12429         }
12430         // struct LDKDirectionalChannelInfo ChannelInfo_get_one_to_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
12431         export function ChannelInfo_get_one_to_two(this_ptr: number): number {
12432                 if(!isWasmInitialized) {
12433                         throw new Error("initializeWasm() must be awaited first!");
12434                 }
12435                 const nativeResponseValue = wasm.ChannelInfo_get_one_to_two(this_ptr);
12436                 return nativeResponseValue;
12437         }
12438         // void ChannelInfo_set_one_to_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
12439         export function ChannelInfo_set_one_to_two(this_ptr: number, val: number): void {
12440                 if(!isWasmInitialized) {
12441                         throw new Error("initializeWasm() must be awaited first!");
12442                 }
12443                 const nativeResponseValue = wasm.ChannelInfo_set_one_to_two(this_ptr, val);
12444                 // debug statements here
12445         }
12446         // struct LDKPublicKey ChannelInfo_get_node_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
12447         export function ChannelInfo_get_node_two(this_ptr: number): Uint8Array {
12448                 if(!isWasmInitialized) {
12449                         throw new Error("initializeWasm() must be awaited first!");
12450                 }
12451                 const nativeResponseValue = wasm.ChannelInfo_get_node_two(this_ptr);
12452                 return decodeArray(nativeResponseValue);
12453         }
12454         // void ChannelInfo_set_node_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12455         export function ChannelInfo_set_node_two(this_ptr: number, val: Uint8Array): void {
12456                 if(!isWasmInitialized) {
12457                         throw new Error("initializeWasm() must be awaited first!");
12458                 }
12459                 const nativeResponseValue = wasm.ChannelInfo_set_node_two(this_ptr, encodeArray(val));
12460                 // debug statements here
12461         }
12462         // struct LDKDirectionalChannelInfo ChannelInfo_get_two_to_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
12463         export function ChannelInfo_get_two_to_one(this_ptr: number): number {
12464                 if(!isWasmInitialized) {
12465                         throw new Error("initializeWasm() must be awaited first!");
12466                 }
12467                 const nativeResponseValue = wasm.ChannelInfo_get_two_to_one(this_ptr);
12468                 return nativeResponseValue;
12469         }
12470         // void ChannelInfo_set_two_to_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
12471         export function ChannelInfo_set_two_to_one(this_ptr: number, val: number): void {
12472                 if(!isWasmInitialized) {
12473                         throw new Error("initializeWasm() must be awaited first!");
12474                 }
12475                 const nativeResponseValue = wasm.ChannelInfo_set_two_to_one(this_ptr, val);
12476                 // debug statements here
12477         }
12478         // struct LDKCOption_u64Z ChannelInfo_get_capacity_sats(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
12479         export function ChannelInfo_get_capacity_sats(this_ptr: number): number {
12480                 if(!isWasmInitialized) {
12481                         throw new Error("initializeWasm() must be awaited first!");
12482                 }
12483                 const nativeResponseValue = wasm.ChannelInfo_get_capacity_sats(this_ptr);
12484                 return nativeResponseValue;
12485         }
12486         // void ChannelInfo_set_capacity_sats(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
12487         export function ChannelInfo_set_capacity_sats(this_ptr: number, val: number): void {
12488                 if(!isWasmInitialized) {
12489                         throw new Error("initializeWasm() must be awaited first!");
12490                 }
12491                 const nativeResponseValue = wasm.ChannelInfo_set_capacity_sats(this_ptr, val);
12492                 // debug statements here
12493         }
12494         // struct LDKChannelAnnouncement ChannelInfo_get_announcement_message(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
12495         export function ChannelInfo_get_announcement_message(this_ptr: number): number {
12496                 if(!isWasmInitialized) {
12497                         throw new Error("initializeWasm() must be awaited first!");
12498                 }
12499                 const nativeResponseValue = wasm.ChannelInfo_get_announcement_message(this_ptr);
12500                 return nativeResponseValue;
12501         }
12502         // void ChannelInfo_set_announcement_message(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelAnnouncement val);
12503         export function ChannelInfo_set_announcement_message(this_ptr: number, val: number): void {
12504                 if(!isWasmInitialized) {
12505                         throw new Error("initializeWasm() must be awaited first!");
12506                 }
12507                 const nativeResponseValue = wasm.ChannelInfo_set_announcement_message(this_ptr, val);
12508                 // debug statements here
12509         }
12510         // MUST_USE_RES struct LDKChannelInfo ChannelInfo_new(struct LDKChannelFeatures features_arg, struct LDKPublicKey node_one_arg, struct LDKDirectionalChannelInfo one_to_two_arg, struct LDKPublicKey node_two_arg, struct LDKDirectionalChannelInfo two_to_one_arg, struct LDKCOption_u64Z capacity_sats_arg, struct LDKChannelAnnouncement announcement_message_arg);
12511         export function ChannelInfo_new(features_arg: number, node_one_arg: Uint8Array, one_to_two_arg: number, node_two_arg: Uint8Array, two_to_one_arg: number, capacity_sats_arg: number, announcement_message_arg: number): number {
12512                 if(!isWasmInitialized) {
12513                         throw new Error("initializeWasm() must be awaited first!");
12514                 }
12515                 const nativeResponseValue = wasm.ChannelInfo_new(features_arg, encodeArray(node_one_arg), one_to_two_arg, encodeArray(node_two_arg), two_to_one_arg, capacity_sats_arg, announcement_message_arg);
12516                 return nativeResponseValue;
12517         }
12518         // struct LDKChannelInfo ChannelInfo_clone(const struct LDKChannelInfo *NONNULL_PTR orig);
12519         export function ChannelInfo_clone(orig: number): number {
12520                 if(!isWasmInitialized) {
12521                         throw new Error("initializeWasm() must be awaited first!");
12522                 }
12523                 const nativeResponseValue = wasm.ChannelInfo_clone(orig);
12524                 return nativeResponseValue;
12525         }
12526         // struct LDKCVec_u8Z ChannelInfo_write(const struct LDKChannelInfo *NONNULL_PTR obj);
12527         export function ChannelInfo_write(obj: number): Uint8Array {
12528                 if(!isWasmInitialized) {
12529                         throw new Error("initializeWasm() must be awaited first!");
12530                 }
12531                 const nativeResponseValue = wasm.ChannelInfo_write(obj);
12532                 return decodeArray(nativeResponseValue);
12533         }
12534         // struct LDKCResult_ChannelInfoDecodeErrorZ ChannelInfo_read(struct LDKu8slice ser);
12535         export function ChannelInfo_read(ser: Uint8Array): number {
12536                 if(!isWasmInitialized) {
12537                         throw new Error("initializeWasm() must be awaited first!");
12538                 }
12539                 const nativeResponseValue = wasm.ChannelInfo_read(encodeArray(ser));
12540                 return nativeResponseValue;
12541         }
12542         // void RoutingFees_free(struct LDKRoutingFees this_obj);
12543         export function RoutingFees_free(this_obj: number): void {
12544                 if(!isWasmInitialized) {
12545                         throw new Error("initializeWasm() must be awaited first!");
12546                 }
12547                 const nativeResponseValue = wasm.RoutingFees_free(this_obj);
12548                 // debug statements here
12549         }
12550         // uint32_t RoutingFees_get_base_msat(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
12551         export function RoutingFees_get_base_msat(this_ptr: number): number {
12552                 if(!isWasmInitialized) {
12553                         throw new Error("initializeWasm() must be awaited first!");
12554                 }
12555                 const nativeResponseValue = wasm.RoutingFees_get_base_msat(this_ptr);
12556                 return nativeResponseValue;
12557         }
12558         // void RoutingFees_set_base_msat(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
12559         export function RoutingFees_set_base_msat(this_ptr: number, val: number): void {
12560                 if(!isWasmInitialized) {
12561                         throw new Error("initializeWasm() must be awaited first!");
12562                 }
12563                 const nativeResponseValue = wasm.RoutingFees_set_base_msat(this_ptr, val);
12564                 // debug statements here
12565         }
12566         // uint32_t RoutingFees_get_proportional_millionths(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
12567         export function RoutingFees_get_proportional_millionths(this_ptr: number): number {
12568                 if(!isWasmInitialized) {
12569                         throw new Error("initializeWasm() must be awaited first!");
12570                 }
12571                 const nativeResponseValue = wasm.RoutingFees_get_proportional_millionths(this_ptr);
12572                 return nativeResponseValue;
12573         }
12574         // void RoutingFees_set_proportional_millionths(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
12575         export function RoutingFees_set_proportional_millionths(this_ptr: number, val: number): void {
12576                 if(!isWasmInitialized) {
12577                         throw new Error("initializeWasm() must be awaited first!");
12578                 }
12579                 const nativeResponseValue = wasm.RoutingFees_set_proportional_millionths(this_ptr, val);
12580                 // debug statements here
12581         }
12582         // MUST_USE_RES struct LDKRoutingFees RoutingFees_new(uint32_t base_msat_arg, uint32_t proportional_millionths_arg);
12583         export function RoutingFees_new(base_msat_arg: number, proportional_millionths_arg: number): number {
12584                 if(!isWasmInitialized) {
12585                         throw new Error("initializeWasm() must be awaited first!");
12586                 }
12587                 const nativeResponseValue = wasm.RoutingFees_new(base_msat_arg, proportional_millionths_arg);
12588                 return nativeResponseValue;
12589         }
12590         // struct LDKRoutingFees RoutingFees_clone(const struct LDKRoutingFees *NONNULL_PTR orig);
12591         export function RoutingFees_clone(orig: number): number {
12592                 if(!isWasmInitialized) {
12593                         throw new Error("initializeWasm() must be awaited first!");
12594                 }
12595                 const nativeResponseValue = wasm.RoutingFees_clone(orig);
12596                 return nativeResponseValue;
12597         }
12598         // struct LDKCResult_RoutingFeesDecodeErrorZ RoutingFees_read(struct LDKu8slice ser);
12599         export function RoutingFees_read(ser: Uint8Array): number {
12600                 if(!isWasmInitialized) {
12601                         throw new Error("initializeWasm() must be awaited first!");
12602                 }
12603                 const nativeResponseValue = wasm.RoutingFees_read(encodeArray(ser));
12604                 return nativeResponseValue;
12605         }
12606         // struct LDKCVec_u8Z RoutingFees_write(const struct LDKRoutingFees *NONNULL_PTR obj);
12607         export function RoutingFees_write(obj: number): Uint8Array {
12608                 if(!isWasmInitialized) {
12609                         throw new Error("initializeWasm() must be awaited first!");
12610                 }
12611                 const nativeResponseValue = wasm.RoutingFees_write(obj);
12612                 return decodeArray(nativeResponseValue);
12613         }
12614         // void NodeAnnouncementInfo_free(struct LDKNodeAnnouncementInfo this_obj);
12615         export function NodeAnnouncementInfo_free(this_obj: number): void {
12616                 if(!isWasmInitialized) {
12617                         throw new Error("initializeWasm() must be awaited first!");
12618                 }
12619                 const nativeResponseValue = wasm.NodeAnnouncementInfo_free(this_obj);
12620                 // debug statements here
12621         }
12622         // struct LDKNodeFeatures NodeAnnouncementInfo_get_features(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
12623         export function NodeAnnouncementInfo_get_features(this_ptr: number): number {
12624                 if(!isWasmInitialized) {
12625                         throw new Error("initializeWasm() must be awaited first!");
12626                 }
12627                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_features(this_ptr);
12628                 return nativeResponseValue;
12629         }
12630         // void NodeAnnouncementInfo_set_features(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
12631         export function NodeAnnouncementInfo_set_features(this_ptr: number, val: number): void {
12632                 if(!isWasmInitialized) {
12633                         throw new Error("initializeWasm() must be awaited first!");
12634                 }
12635                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_features(this_ptr, val);
12636                 // debug statements here
12637         }
12638         // uint32_t NodeAnnouncementInfo_get_last_update(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
12639         export function NodeAnnouncementInfo_get_last_update(this_ptr: number): number {
12640                 if(!isWasmInitialized) {
12641                         throw new Error("initializeWasm() must be awaited first!");
12642                 }
12643                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_last_update(this_ptr);
12644                 return nativeResponseValue;
12645         }
12646         // void NodeAnnouncementInfo_set_last_update(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, uint32_t val);
12647         export function NodeAnnouncementInfo_set_last_update(this_ptr: number, val: number): void {
12648                 if(!isWasmInitialized) {
12649                         throw new Error("initializeWasm() must be awaited first!");
12650                 }
12651                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_last_update(this_ptr, val);
12652                 // debug statements here
12653         }
12654         // const uint8_t (*NodeAnnouncementInfo_get_rgb(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[3];
12655         export function NodeAnnouncementInfo_get_rgb(this_ptr: number): Uint8Array {
12656                 if(!isWasmInitialized) {
12657                         throw new Error("initializeWasm() must be awaited first!");
12658                 }
12659                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_rgb(this_ptr);
12660                 return decodeArray(nativeResponseValue);
12661         }
12662         // void NodeAnnouncementInfo_set_rgb(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
12663         export function NodeAnnouncementInfo_set_rgb(this_ptr: number, val: Uint8Array): void {
12664                 if(!isWasmInitialized) {
12665                         throw new Error("initializeWasm() must be awaited first!");
12666                 }
12667                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_rgb(this_ptr, encodeArray(val));
12668                 // debug statements here
12669         }
12670         // const uint8_t (*NodeAnnouncementInfo_get_alias(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[32];
12671         export function NodeAnnouncementInfo_get_alias(this_ptr: number): Uint8Array {
12672                 if(!isWasmInitialized) {
12673                         throw new Error("initializeWasm() must be awaited first!");
12674                 }
12675                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_alias(this_ptr);
12676                 return decodeArray(nativeResponseValue);
12677         }
12678         // void NodeAnnouncementInfo_set_alias(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12679         export function NodeAnnouncementInfo_set_alias(this_ptr: number, val: Uint8Array): void {
12680                 if(!isWasmInitialized) {
12681                         throw new Error("initializeWasm() must be awaited first!");
12682                 }
12683                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_alias(this_ptr, encodeArray(val));
12684                 // debug statements here
12685         }
12686         // void NodeAnnouncementInfo_set_addresses(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
12687         export function NodeAnnouncementInfo_set_addresses(this_ptr: number, val: number[]): void {
12688                 if(!isWasmInitialized) {
12689                         throw new Error("initializeWasm() must be awaited first!");
12690                 }
12691                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_addresses(this_ptr, val);
12692                 // debug statements here
12693         }
12694         // struct LDKNodeAnnouncement NodeAnnouncementInfo_get_announcement_message(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
12695         export function NodeAnnouncementInfo_get_announcement_message(this_ptr: number): number {
12696                 if(!isWasmInitialized) {
12697                         throw new Error("initializeWasm() must be awaited first!");
12698                 }
12699                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_announcement_message(this_ptr);
12700                 return nativeResponseValue;
12701         }
12702         // void NodeAnnouncementInfo_set_announcement_message(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncement val);
12703         export function NodeAnnouncementInfo_set_announcement_message(this_ptr: number, val: number): void {
12704                 if(!isWasmInitialized) {
12705                         throw new Error("initializeWasm() must be awaited first!");
12706                 }
12707                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_announcement_message(this_ptr, val);
12708                 // debug statements here
12709         }
12710         // 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);
12711         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 {
12712                 if(!isWasmInitialized) {
12713                         throw new Error("initializeWasm() must be awaited first!");
12714                 }
12715                 const nativeResponseValue = wasm.NodeAnnouncementInfo_new(features_arg, last_update_arg, encodeArray(rgb_arg), encodeArray(alias_arg), addresses_arg, announcement_message_arg);
12716                 return nativeResponseValue;
12717         }
12718         // struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_clone(const struct LDKNodeAnnouncementInfo *NONNULL_PTR orig);
12719         export function NodeAnnouncementInfo_clone(orig: number): number {
12720                 if(!isWasmInitialized) {
12721                         throw new Error("initializeWasm() must be awaited first!");
12722                 }
12723                 const nativeResponseValue = wasm.NodeAnnouncementInfo_clone(orig);
12724                 return nativeResponseValue;
12725         }
12726         // struct LDKCVec_u8Z NodeAnnouncementInfo_write(const struct LDKNodeAnnouncementInfo *NONNULL_PTR obj);
12727         export function NodeAnnouncementInfo_write(obj: number): Uint8Array {
12728                 if(!isWasmInitialized) {
12729                         throw new Error("initializeWasm() must be awaited first!");
12730                 }
12731                 const nativeResponseValue = wasm.NodeAnnouncementInfo_write(obj);
12732                 return decodeArray(nativeResponseValue);
12733         }
12734         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ NodeAnnouncementInfo_read(struct LDKu8slice ser);
12735         export function NodeAnnouncementInfo_read(ser: Uint8Array): number {
12736                 if(!isWasmInitialized) {
12737                         throw new Error("initializeWasm() must be awaited first!");
12738                 }
12739                 const nativeResponseValue = wasm.NodeAnnouncementInfo_read(encodeArray(ser));
12740                 return nativeResponseValue;
12741         }
12742         // void NodeInfo_free(struct LDKNodeInfo this_obj);
12743         export function NodeInfo_free(this_obj: number): void {
12744                 if(!isWasmInitialized) {
12745                         throw new Error("initializeWasm() must be awaited first!");
12746                 }
12747                 const nativeResponseValue = wasm.NodeInfo_free(this_obj);
12748                 // debug statements here
12749         }
12750         // void NodeInfo_set_channels(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
12751         export function NodeInfo_set_channels(this_ptr: number, val: number[]): void {
12752                 if(!isWasmInitialized) {
12753                         throw new Error("initializeWasm() must be awaited first!");
12754                 }
12755                 const nativeResponseValue = wasm.NodeInfo_set_channels(this_ptr, val);
12756                 // debug statements here
12757         }
12758         // struct LDKRoutingFees NodeInfo_get_lowest_inbound_channel_fees(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
12759         export function NodeInfo_get_lowest_inbound_channel_fees(this_ptr: number): number {
12760                 if(!isWasmInitialized) {
12761                         throw new Error("initializeWasm() must be awaited first!");
12762                 }
12763                 const nativeResponseValue = wasm.NodeInfo_get_lowest_inbound_channel_fees(this_ptr);
12764                 return nativeResponseValue;
12765         }
12766         // void NodeInfo_set_lowest_inbound_channel_fees(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
12767         export function NodeInfo_set_lowest_inbound_channel_fees(this_ptr: number, val: number): void {
12768                 if(!isWasmInitialized) {
12769                         throw new Error("initializeWasm() must be awaited first!");
12770                 }
12771                 const nativeResponseValue = wasm.NodeInfo_set_lowest_inbound_channel_fees(this_ptr, val);
12772                 // debug statements here
12773         }
12774         // struct LDKNodeAnnouncementInfo NodeInfo_get_announcement_info(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
12775         export function NodeInfo_get_announcement_info(this_ptr: number): number {
12776                 if(!isWasmInitialized) {
12777                         throw new Error("initializeWasm() must be awaited first!");
12778                 }
12779                 const nativeResponseValue = wasm.NodeInfo_get_announcement_info(this_ptr);
12780                 return nativeResponseValue;
12781         }
12782         // void NodeInfo_set_announcement_info(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncementInfo val);
12783         export function NodeInfo_set_announcement_info(this_ptr: number, val: number): void {
12784                 if(!isWasmInitialized) {
12785                         throw new Error("initializeWasm() must be awaited first!");
12786                 }
12787                 const nativeResponseValue = wasm.NodeInfo_set_announcement_info(this_ptr, val);
12788                 // debug statements here
12789         }
12790         // MUST_USE_RES struct LDKNodeInfo NodeInfo_new(struct LDKCVec_u64Z channels_arg, struct LDKRoutingFees lowest_inbound_channel_fees_arg, struct LDKNodeAnnouncementInfo announcement_info_arg);
12791         export function NodeInfo_new(channels_arg: number[], lowest_inbound_channel_fees_arg: number, announcement_info_arg: number): number {
12792                 if(!isWasmInitialized) {
12793                         throw new Error("initializeWasm() must be awaited first!");
12794                 }
12795                 const nativeResponseValue = wasm.NodeInfo_new(channels_arg, lowest_inbound_channel_fees_arg, announcement_info_arg);
12796                 return nativeResponseValue;
12797         }
12798         // struct LDKNodeInfo NodeInfo_clone(const struct LDKNodeInfo *NONNULL_PTR orig);
12799         export function NodeInfo_clone(orig: number): number {
12800                 if(!isWasmInitialized) {
12801                         throw new Error("initializeWasm() must be awaited first!");
12802                 }
12803                 const nativeResponseValue = wasm.NodeInfo_clone(orig);
12804                 return nativeResponseValue;
12805         }
12806         // struct LDKCVec_u8Z NodeInfo_write(const struct LDKNodeInfo *NONNULL_PTR obj);
12807         export function NodeInfo_write(obj: number): Uint8Array {
12808                 if(!isWasmInitialized) {
12809                         throw new Error("initializeWasm() must be awaited first!");
12810                 }
12811                 const nativeResponseValue = wasm.NodeInfo_write(obj);
12812                 return decodeArray(nativeResponseValue);
12813         }
12814         // struct LDKCResult_NodeInfoDecodeErrorZ NodeInfo_read(struct LDKu8slice ser);
12815         export function NodeInfo_read(ser: Uint8Array): number {
12816                 if(!isWasmInitialized) {
12817                         throw new Error("initializeWasm() must be awaited first!");
12818                 }
12819                 const nativeResponseValue = wasm.NodeInfo_read(encodeArray(ser));
12820                 return nativeResponseValue;
12821         }
12822         // struct LDKCVec_u8Z NetworkGraph_write(const struct LDKNetworkGraph *NONNULL_PTR obj);
12823         export function NetworkGraph_write(obj: number): Uint8Array {
12824                 if(!isWasmInitialized) {
12825                         throw new Error("initializeWasm() must be awaited first!");
12826                 }
12827                 const nativeResponseValue = wasm.NetworkGraph_write(obj);
12828                 return decodeArray(nativeResponseValue);
12829         }
12830         // struct LDKCResult_NetworkGraphDecodeErrorZ NetworkGraph_read(struct LDKu8slice ser);
12831         export function NetworkGraph_read(ser: Uint8Array): number {
12832                 if(!isWasmInitialized) {
12833                         throw new Error("initializeWasm() must be awaited first!");
12834                 }
12835                 const nativeResponseValue = wasm.NetworkGraph_read(encodeArray(ser));
12836                 return nativeResponseValue;
12837         }
12838         // MUST_USE_RES struct LDKNetworkGraph NetworkGraph_new(struct LDKThirtyTwoBytes genesis_hash);
12839         export function NetworkGraph_new(genesis_hash: Uint8Array): number {
12840                 if(!isWasmInitialized) {
12841                         throw new Error("initializeWasm() must be awaited first!");
12842                 }
12843                 const nativeResponseValue = wasm.NetworkGraph_new(encodeArray(genesis_hash));
12844                 return nativeResponseValue;
12845         }
12846         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_announcement(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg);
12847         export function NetworkGraph_update_node_from_announcement(this_arg: number, msg: number): number {
12848                 if(!isWasmInitialized) {
12849                         throw new Error("initializeWasm() must be awaited first!");
12850                 }
12851                 const nativeResponseValue = wasm.NetworkGraph_update_node_from_announcement(this_arg, msg);
12852                 return nativeResponseValue;
12853         }
12854         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_unsigned_announcement(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR msg);
12855         export function NetworkGraph_update_node_from_unsigned_announcement(this_arg: number, msg: number): number {
12856                 if(!isWasmInitialized) {
12857                         throw new Error("initializeWasm() must be awaited first!");
12858                 }
12859                 const nativeResponseValue = wasm.NetworkGraph_update_node_from_unsigned_announcement(this_arg, msg);
12860                 return nativeResponseValue;
12861         }
12862         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_from_announcement(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg, struct LDKAccess *chain_access);
12863         export function NetworkGraph_update_channel_from_announcement(this_arg: number, msg: number, chain_access: number): number {
12864                 if(!isWasmInitialized) {
12865                         throw new Error("initializeWasm() must be awaited first!");
12866                 }
12867                 const nativeResponseValue = wasm.NetworkGraph_update_channel_from_announcement(this_arg, msg, chain_access);
12868                 return nativeResponseValue;
12869         }
12870         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_from_unsigned_announcement(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg, struct LDKAccess *chain_access);
12871         export function NetworkGraph_update_channel_from_unsigned_announcement(this_arg: number, msg: number, chain_access: number): number {
12872                 if(!isWasmInitialized) {
12873                         throw new Error("initializeWasm() must be awaited first!");
12874                 }
12875                 const nativeResponseValue = wasm.NetworkGraph_update_channel_from_unsigned_announcement(this_arg, msg, chain_access);
12876                 return nativeResponseValue;
12877         }
12878         // void NetworkGraph_close_channel_from_update(struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t short_channel_id, bool is_permanent);
12879         export function NetworkGraph_close_channel_from_update(this_arg: number, short_channel_id: number, is_permanent: boolean): void {
12880                 if(!isWasmInitialized) {
12881                         throw new Error("initializeWasm() must be awaited first!");
12882                 }
12883                 const nativeResponseValue = wasm.NetworkGraph_close_channel_from_update(this_arg, short_channel_id, is_permanent);
12884                 // debug statements here
12885         }
12886         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg);
12887         export function NetworkGraph_update_channel(this_arg: number, msg: number): number {
12888                 if(!isWasmInitialized) {
12889                         throw new Error("initializeWasm() must be awaited first!");
12890                 }
12891                 const nativeResponseValue = wasm.NetworkGraph_update_channel(this_arg, msg);
12892                 return nativeResponseValue;
12893         }
12894         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_unsigned(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelUpdate *NONNULL_PTR msg);
12895         export function NetworkGraph_update_channel_unsigned(this_arg: number, msg: number): number {
12896                 if(!isWasmInitialized) {
12897                         throw new Error("initializeWasm() must be awaited first!");
12898                 }
12899                 const nativeResponseValue = wasm.NetworkGraph_update_channel_unsigned(this_arg, msg);
12900                 return nativeResponseValue;
12901         }
12902         // void FilesystemPersister_free(struct LDKFilesystemPersister this_obj);
12903         export function FilesystemPersister_free(this_obj: number): void {
12904                 if(!isWasmInitialized) {
12905                         throw new Error("initializeWasm() must be awaited first!");
12906                 }
12907                 const nativeResponseValue = wasm.FilesystemPersister_free(this_obj);
12908                 // debug statements here
12909         }
12910         // MUST_USE_RES struct LDKFilesystemPersister FilesystemPersister_new(struct LDKCVec_u8Z path_to_channel_data);
12911         export function FilesystemPersister_new(path_to_channel_data: Uint8Array): number {
12912                 if(!isWasmInitialized) {
12913                         throw new Error("initializeWasm() must be awaited first!");
12914                 }
12915                 const nativeResponseValue = wasm.FilesystemPersister_new(encodeArray(path_to_channel_data));
12916                 return nativeResponseValue;
12917         }
12918         // MUST_USE_RES struct LDKCVec_u8Z FilesystemPersister_get_data_dir(const struct LDKFilesystemPersister *NONNULL_PTR this_arg);
12919         export function FilesystemPersister_get_data_dir(this_arg: number): Uint8Array {
12920                 if(!isWasmInitialized) {
12921                         throw new Error("initializeWasm() must be awaited first!");
12922                 }
12923                 const nativeResponseValue = wasm.FilesystemPersister_get_data_dir(this_arg);
12924                 return decodeArray(nativeResponseValue);
12925         }
12926         // MUST_USE_RES struct LDKCResult_NoneErrorZ FilesystemPersister_persist_manager(struct LDKCVec_u8Z data_dir, const struct LDKChannelManager *NONNULL_PTR manager);
12927         export function FilesystemPersister_persist_manager(data_dir: Uint8Array, manager: number): number {
12928                 if(!isWasmInitialized) {
12929                         throw new Error("initializeWasm() must be awaited first!");
12930                 }
12931                 const nativeResponseValue = wasm.FilesystemPersister_persist_manager(encodeArray(data_dir), manager);
12932                 return nativeResponseValue;
12933         }
12934         // MUST_USE_RES struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ FilesystemPersister_read_channelmonitors(const struct LDKFilesystemPersister *NONNULL_PTR this_arg, struct LDKKeysInterface keys_manager);
12935         export function FilesystemPersister_read_channelmonitors(this_arg: number, keys_manager: number): number {
12936                 if(!isWasmInitialized) {
12937                         throw new Error("initializeWasm() must be awaited first!");
12938                 }
12939                 const nativeResponseValue = wasm.FilesystemPersister_read_channelmonitors(this_arg, keys_manager);
12940                 return nativeResponseValue;
12941         }
12942         // struct LDKPersist FilesystemPersister_as_Persist(const struct LDKFilesystemPersister *NONNULL_PTR this_arg);
12943         export function FilesystemPersister_as_Persist(this_arg: number): number {
12944                 if(!isWasmInitialized) {
12945                         throw new Error("initializeWasm() must be awaited first!");
12946                 }
12947                 const nativeResponseValue = wasm.FilesystemPersister_as_Persist(this_arg);
12948                 return nativeResponseValue;
12949         }
12950
12951         export async function initializeWasm(allowDoubleInitialization: boolean = false): Promise<void> {
12952             if(isWasmInitialized && !allowDoubleInitialization) {
12953                 return;
12954             }
12955             const wasmInstance = await WebAssembly.instantiate(wasmModule, imports)
12956             wasm = wasmInstance.exports;
12957             isWasmInitialized = true;
12958         }
12959