Update auto-generated mts files (without structs)
[ldk-java] / ts / bindings.mts
1
2 function freer(f: () => void) { f() }
3 const finalizer = new FinalizationRegistry(freer);
4 const memory = new WebAssembly.Memory({initial: 256});
5
6 const imports: any = {};
7 imports.env = {};
8
9 imports.env.memoryBase = 0;
10 imports.env.memory = memory;
11 imports.env.tableBase = 0;
12 imports.env.table = new WebAssembly.Table({initial: 4, element: 'anyfunc'});
13
14 imports.env["abort"] = function () {
15         console.error("ABORT");
16 };
17 imports.env["js_invoke_function"] = function(fn: number, arg1: number, arg2: number, arg3: number, arg4: number, arg5: number, arg6: number, arg7: number, arg8: number, arg9: number, arg10: number) {
18         console.log('function called from wasm:', fn, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
19 };
20 imports.env["js_free_function_ptr"] = function(fn: number) {
21         console.log("function ptr free'd from wasm:", fn);
22 };
23
24 imports.wasi_snapshot_preview1 = {
25         "fd_write" : () => {
26                 console.log("ABORT");
27         },
28         "random_get" : () => {
29                 console.log("RAND GET");
30         },
31         "environ_sizes_get" : () => {
32                 console.log("wasi_snapshot_preview1:environ_sizes_get");
33         },
34         "proc_exit" : () => {
35                 console.log("wasi_snapshot_preview1:proc_exit");
36         },
37         "environ_get" : () => {
38                 console.log("wasi_snapshot_preview1:environ_get");
39         },
40 };
41
42 var wasm = null;
43 let isWasmInitialized: boolean = false;
44
45 export async function initializeWasm(uri) {
46         const stream = fetch(uri);
47         const { instance: wasmInstance } = await WebAssembly.instantiateStreaming(stream, imports);
48         wasm = wasmInstance.exports;
49         isWasmInitialized = true;
50 };
51
52
53
54
55 // WASM CODEC
56
57 const nextMultipleOfFour = (value: number) => {
58         return Math.ceil(value / 4) * 4;
59 }
60
61 const encodeUint8Array = (inputArray) => {
62         const cArrayPointer = wasm.TS_malloc(inputArray.length + 4);
63         const arrayLengthView = new Uint32Array(memory.buffer, cArrayPointer, 1);
64         arrayLengthView[0] = inputArray.length;
65         const arrayMemoryView = new Uint8Array(memory.buffer, cArrayPointer + 4, inputArray.length);
66         arrayMemoryView.set(inputArray);
67         return cArrayPointer;
68 }
69
70 const encodeUint32Array = (inputArray) => {
71         const cArrayPointer = wasm.TS_malloc((inputArray.length + 1) * 4);
72         const arrayMemoryView = new Uint32Array(memory.buffer, cArrayPointer, inputArray.length);
73         arrayMemoryView.set(inputArray, 1);
74         arrayMemoryView[0] = inputArray.length;
75         return cArrayPointer;
76 }
77
78 const getArrayLength = (arrayPointer) => {
79         const arraySizeViewer = new Uint32Array(
80                 memory.buffer, // value
81                 arrayPointer, // offset
82                 1 // one int
83         );
84         return arraySizeViewer[0];
85 }
86 const decodeUint8Array = (arrayPointer, free = true) => {
87         const arraySize = getArrayLength(arrayPointer);
88         const actualArrayViewer = new Uint8Array(
89                 memory.buffer, // value
90                 arrayPointer + 4, // offset (ignoring length bytes)
91                 arraySize // uint8 count
92         );
93         // Clone the contents, TODO: In the future we should wrap the Viewer in a class that
94         // will free the underlying memory when it becomes unreachable instead of copying here.
95         const actualArray = actualArrayViewer.slice(0, arraySize);
96         if (free) {
97                 wasm.TS_free(arrayPointer);
98         }
99         return actualArray;
100 }
101 const decodeUint32Array = (arrayPointer, free = true) => {
102         const arraySize = getArrayLength(arrayPointer);
103         const actualArrayViewer = new Uint32Array(
104                 memory.buffer, // value
105                 arrayPointer + 4, // offset (ignoring length bytes)
106                 arraySize // uint32 count
107         );
108         // Clone the contents, TODO: In the future we should wrap the Viewer in a class that
109         // will free the underlying memory when it becomes unreachable instead of copying here.
110         const actualArray = actualArrayViewer.slice(0, arraySize);
111         if (free) {
112                 wasm.TS_free(arrayPointer);
113         }
114         return actualArray;
115 }
116
117 const encodeString = (string) => {
118         // make malloc count divisible by 4
119         const memoryNeed = nextMultipleOfFour(string.length + 1);
120         const stringPointer = wasm.TS_malloc(memoryNeed);
121         const stringMemoryView = new Uint8Array(
122                 memory.buffer, // value
123                 stringPointer, // offset
124                 string.length + 1 // length
125         );
126         for (let i = 0; i < string.length; i++) {
127                 stringMemoryView[i] = string.charCodeAt(i);
128         }
129         stringMemoryView[string.length] = 0;
130         return stringPointer;
131 }
132
133 const decodeString = (stringPointer, free = true) => {
134         const memoryView = new Uint8Array(memory.buffer, stringPointer);
135         let cursor = 0;
136         let result = '';
137
138         while (memoryView[cursor] !== 0) {
139                 result += String.fromCharCode(memoryView[cursor]);
140                 cursor++;
141         }
142
143         if (free) {
144                 wasm.wasm_free(stringPointer);
145         }
146
147         return result;
148 };
149
150 export class VecOrSliceDef {
151     public dataptr: number;
152     public datalen: number;
153     public stride: number;
154     public constructor(dataptr: number, datalen: number, stride: number) {
155         this.dataptr = dataptr;
156         this.datalen = datalen;
157         this.stride = stride;
158     }
159 }
160
161 /*
162 TODO: load WASM file
163 static {
164     System.loadLibrary("lightningjni");
165     init(java.lang.Enum.class, VecOrSliceDef.class);
166     init_class_cache();
167 }
168
169 static native void init(java.lang.Class c, java.lang.Class slicedef);
170 static native void init_class_cache();
171
172 public static native boolean deref_bool(long ptr);
173 public static native long deref_long(long ptr);
174 public static native void free_heap_ptr(long ptr);
175 public static native byte[] read_bytes(long ptr, long len);
176 public static native byte[] get_u8_slice_bytes(long slice_ptr);
177 public static native long bytes_to_u8_vec(byte[] bytes);
178 public static native long new_txpointer_copy_data(byte[] txdata);
179 public static native void txpointer_free(long ptr);
180 public static native byte[] txpointer_get_buffer(long ptr);
181 public static native long vec_slice_len(long vec);
182 public static native long new_empty_slice_vec();
183 */
184
185
186             export enum AccessError {
187                 /**
188  * The requested chain is unknown.
189  */
190 LDKAccessError_UnknownChain,
191                                 /**
192  * The requested transaction doesn't exist or hasn't confirmed.
193  */
194 LDKAccessError_UnknownTx,
195                                 
196             }
197
198             export enum COption_NoneZ {
199                 /**
200  * When we're in this state, this COption_NoneZ contains a
201  */
202 LDKCOption_NoneZ_Some,
203                                 /**
204  * When we're in this state, this COption_NoneZ contains nothing
205  */
206 LDKCOption_NoneZ_None,
207                                 
208             }
209
210             export enum ChannelMonitorUpdateErr {
211                 /**
212  * Used to indicate a temporary failure (eg connection to a watchtower or remote backup of
213 our state failed, but is expected to succeed at some point in the future).
214
215 Such a failure will \"freeze\" a channel, preventing us from revoking old states or
216 submitting new commitment transactions to the counterparty. Once the update(s) that failed
217 have been successfully applied, a [`MonitorEvent::UpdateCompleted`] event should be returned
218 via [`Watch::release_pending_monitor_events`] which will then restore the channel to an
219 operational state.
220
221 Note that a given ChannelManager will *never* re-generate a given ChannelMonitorUpdate. If
222 you return a TemporaryFailure you must ensure that it is written to disk safely before
223 writing out the latest ChannelManager state.
224
225 Even when a channel has been \"frozen\" updates to the ChannelMonitor can continue to occur
226 (eg if an inbound HTLC which we forwarded was claimed upstream resulting in us attempting
227 to claim it on this channel) and those updates must be applied wherever they can be. At
228 least one such updated ChannelMonitor must be persisted otherwise PermanentFailure should
229 be returned to get things on-chain ASAP using only the in-memory copy. Obviously updates to
230 the channel which would invalidate previous ChannelMonitors are not made when a channel has
231 been \"frozen\".
232
233 Note that even if updates made after TemporaryFailure succeed you must still provide a
234 [`MonitorEvent::UpdateCompleted`] to ensure you have the latest monitor and re-enable
235 normal channel operation. Note that this is normally generated through a call to
236 [`ChainMonitor::channel_monitor_updated`].
237
238 Note that the update being processed here will not be replayed for you when you return a
239 [`MonitorEvent::UpdateCompleted`] event via [`Watch::release_pending_monitor_events`], so
240 you must store the update itself on your own local disk prior to returning a
241 TemporaryFailure. You may, of course, employ a journaling approach, storing only the
242 ChannelMonitorUpdate on disk without updating the monitor itself, replaying the journal at
243 reload-time.
244
245 For deployments where a copy of ChannelMonitors and other local state are backed up in a
246 remote location (with local copies persisted immediately), it is anticipated that all
247 updates will return TemporaryFailure until the remote copies could be updated.
248
249 [`ChainMonitor::channel_monitor_updated`]: chainmonitor::ChainMonitor::channel_monitor_updated
250  */
251 LDKChannelMonitorUpdateErr_TemporaryFailure,
252                                 /**
253  * Used to indicate no further channel monitor updates will be allowed (eg we've moved on to a
254 different watchtower and cannot update with all watchtowers that were previously informed
255 of this channel).
256
257 At reception of this error, ChannelManager will force-close the channel and return at
258 least a final ChannelMonitorUpdate::ChannelForceClosed which must be delivered to at
259 least one ChannelMonitor copy. Revocation secret MUST NOT be released and offchain channel
260 update must be rejected.
261
262 This failure may also signal a failure to update the local persisted copy of one of
263 the channel monitor instance.
264
265 Note that even when you fail a holder commitment transaction update, you must store the
266 update to ensure you can claim from it in case of a duplicate copy of this ChannelMonitor
267 broadcasts it (e.g distributed channel-monitor deployment)
268
269 In case of distributed watchtowers deployment, the new version must be written to disk, as
270 state may have been stored but rejected due to a block forcing a commitment broadcast. This
271 storage is used to claim outputs of rejected state confirmed onchain by another watchtower,
272 lagging behind on block processing.
273  */
274 LDKChannelMonitorUpdateErr_PermanentFailure,
275                                 
276             }
277
278             export enum ConfirmationTarget {
279                 /**
280  * We are happy with this transaction confirming slowly when feerate drops some.
281  */
282 LDKConfirmationTarget_Background,
283                                 /**
284  * We'd like this transaction to confirm without major delay, but 12-18 blocks is fine.
285  */
286 LDKConfirmationTarget_Normal,
287                                 /**
288  * We'd like this transaction to confirm in the next few blocks.
289  */
290 LDKConfirmationTarget_HighPriority,
291                                 
292             }
293
294             export enum Level {
295                 /**
296  * Designates extremely verbose information, including gossip-induced messages
297  */
298 LDKLevel_Gossip,
299                                 /**
300  * Designates very low priority, often extremely verbose, information
301  */
302 LDKLevel_Trace,
303                                 /**
304  * Designates lower priority information
305  */
306 LDKLevel_Debug,
307                                 /**
308  * Designates useful information
309  */
310 LDKLevel_Info,
311                                 /**
312  * Designates hazardous situations
313  */
314 LDKLevel_Warn,
315                                 /**
316  * Designates very serious errors
317  */
318 LDKLevel_Error,
319                                 
320             }
321
322             export enum Network {
323                 /**
324  * The main Bitcoin blockchain.
325  */
326 LDKNetwork_Bitcoin,
327                                 /**
328  * The testnet3 blockchain.
329  */
330 LDKNetwork_Testnet,
331                                 /**
332  * A local test blockchain.
333  */
334 LDKNetwork_Regtest,
335                                 /**
336  * A blockchain on which blocks are signed instead of mined.
337  */
338 LDKNetwork_Signet,
339                                 
340             }
341
342             export enum Secp256k1Error {
343                 /**
344  * Signature failed verification
345  */
346 LDKSecp256k1Error_IncorrectSignature,
347                                 /**
348  * Badly sized message ("messages" are actually fixed-sized digests; see the MESSAGE_SIZE constant)
349  */
350 LDKSecp256k1Error_InvalidMessage,
351                                 /**
352  * Bad public key
353  */
354 LDKSecp256k1Error_InvalidPublicKey,
355                                 /**
356  * Bad signature
357  */
358 LDKSecp256k1Error_InvalidSignature,
359                                 /**
360  * Bad secret key
361  */
362 LDKSecp256k1Error_InvalidSecretKey,
363                                 /**
364  * Bad recovery id
365  */
366 LDKSecp256k1Error_InvalidRecoveryId,
367                                 /**
368  * Invalid tweak for add_assign or mul_assign
369  */
370 LDKSecp256k1Error_InvalidTweak,
371                                 /**
372  * tweak_add_check failed on an xonly public key
373  */
374 LDKSecp256k1Error_TweakCheckFailed,
375                                 /**
376  * Didn't pass enough memory to context creation with preallocated memory
377  */
378 LDKSecp256k1Error_NotEnoughMemory,
379                                 
380             }
381         // struct LDKCVec_u8Z TxOut_get_script_pubkey (struct LDKTxOut* thing)
382         export function TxOut_get_script_pubkey(thing: number): Uint8Array {
383                 if(!isWasmInitialized) {
384                         throw new Error("initializeWasm() must be awaited first!");
385                 }
386                 const nativeResponseValue = wasm.TS_TxOut_get_script_pubkey(thing);
387                 return decodeUint8Array(nativeResponseValue);
388         }
389         // uint64_t TxOut_get_value (struct LDKTxOut* thing)
390         export function TxOut_get_value(thing: number): number {
391                 if(!isWasmInitialized) {
392                         throw new Error("initializeWasm() must be awaited first!");
393                 }
394                 const nativeResponseValue = wasm.TS_TxOut_get_value(thing);
395                 return nativeResponseValue;
396         }
397         // struct LDKChannelConfig CResult_ChannelConfigDecodeErrorZ_get_ok(LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR owner);
398         export function CResult_ChannelConfigDecodeErrorZ_get_ok(owner: number): number {
399                 if(!isWasmInitialized) {
400                         throw new Error("initializeWasm() must be awaited first!");
401                 }
402                 const nativeResponseValue = wasm.TS_CResult_ChannelConfigDecodeErrorZ_get_ok(owner);
403                 return nativeResponseValue;
404         }
405         // struct LDKDecodeError CResult_ChannelConfigDecodeErrorZ_get_err(LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR owner);
406         export function CResult_ChannelConfigDecodeErrorZ_get_err(owner: number): number {
407                 if(!isWasmInitialized) {
408                         throw new Error("initializeWasm() must be awaited first!");
409                 }
410                 const nativeResponseValue = wasm.TS_CResult_ChannelConfigDecodeErrorZ_get_err(owner);
411                 return nativeResponseValue;
412         }
413         // struct LDKOutPoint CResult_OutPointDecodeErrorZ_get_ok(LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR owner);
414         export function CResult_OutPointDecodeErrorZ_get_ok(owner: number): number {
415                 if(!isWasmInitialized) {
416                         throw new Error("initializeWasm() must be awaited first!");
417                 }
418                 const nativeResponseValue = wasm.TS_CResult_OutPointDecodeErrorZ_get_ok(owner);
419                 return nativeResponseValue;
420         }
421         // struct LDKDecodeError CResult_OutPointDecodeErrorZ_get_err(LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR owner);
422         export function CResult_OutPointDecodeErrorZ_get_err(owner: number): number {
423                 if(!isWasmInitialized) {
424                         throw new Error("initializeWasm() must be awaited first!");
425                 }
426                 const nativeResponseValue = wasm.TS_CResult_OutPointDecodeErrorZ_get_err(owner);
427                 return nativeResponseValue;
428         }
429         // struct LDKSecretKey CResult_SecretKeyErrorZ_get_ok(LDKCResult_SecretKeyErrorZ *NONNULL_PTR owner);
430         export function CResult_SecretKeyErrorZ_get_ok(owner: number): Uint8Array {
431                 if(!isWasmInitialized) {
432                         throw new Error("initializeWasm() must be awaited first!");
433                 }
434                 const nativeResponseValue = wasm.TS_CResult_SecretKeyErrorZ_get_ok(owner);
435                 return decodeUint8Array(nativeResponseValue);
436         }
437         // enum LDKSecp256k1Error CResult_SecretKeyErrorZ_get_err(LDKCResult_SecretKeyErrorZ *NONNULL_PTR owner);
438         export function CResult_SecretKeyErrorZ_get_err(owner: number): Secp256k1Error {
439                 if(!isWasmInitialized) {
440                         throw new Error("initializeWasm() must be awaited first!");
441                 }
442                 const nativeResponseValue = wasm.TS_CResult_SecretKeyErrorZ_get_err(owner);
443                 return nativeResponseValue;
444         }
445         // struct LDKPublicKey CResult_PublicKeyErrorZ_get_ok(LDKCResult_PublicKeyErrorZ *NONNULL_PTR owner);
446         export function CResult_PublicKeyErrorZ_get_ok(owner: number): Uint8Array {
447                 if(!isWasmInitialized) {
448                         throw new Error("initializeWasm() must be awaited first!");
449                 }
450                 const nativeResponseValue = wasm.TS_CResult_PublicKeyErrorZ_get_ok(owner);
451                 return decodeUint8Array(nativeResponseValue);
452         }
453         // enum LDKSecp256k1Error CResult_PublicKeyErrorZ_get_err(LDKCResult_PublicKeyErrorZ *NONNULL_PTR owner);
454         export function CResult_PublicKeyErrorZ_get_err(owner: number): Secp256k1Error {
455                 if(!isWasmInitialized) {
456                         throw new Error("initializeWasm() must be awaited first!");
457                 }
458                 const nativeResponseValue = wasm.TS_CResult_PublicKeyErrorZ_get_err(owner);
459                 return nativeResponseValue;
460         }
461         // struct LDKTxCreationKeys CResult_TxCreationKeysDecodeErrorZ_get_ok(LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR owner);
462         export function CResult_TxCreationKeysDecodeErrorZ_get_ok(owner: number): number {
463                 if(!isWasmInitialized) {
464                         throw new Error("initializeWasm() must be awaited first!");
465                 }
466                 const nativeResponseValue = wasm.TS_CResult_TxCreationKeysDecodeErrorZ_get_ok(owner);
467                 return nativeResponseValue;
468         }
469         // struct LDKDecodeError CResult_TxCreationKeysDecodeErrorZ_get_err(LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR owner);
470         export function CResult_TxCreationKeysDecodeErrorZ_get_err(owner: number): number {
471                 if(!isWasmInitialized) {
472                         throw new Error("initializeWasm() must be awaited first!");
473                 }
474                 const nativeResponseValue = wasm.TS_CResult_TxCreationKeysDecodeErrorZ_get_err(owner);
475                 return nativeResponseValue;
476         }
477         // struct LDKChannelPublicKeys CResult_ChannelPublicKeysDecodeErrorZ_get_ok(LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR owner);
478         export function CResult_ChannelPublicKeysDecodeErrorZ_get_ok(owner: number): number {
479                 if(!isWasmInitialized) {
480                         throw new Error("initializeWasm() must be awaited first!");
481                 }
482                 const nativeResponseValue = wasm.TS_CResult_ChannelPublicKeysDecodeErrorZ_get_ok(owner);
483                 return nativeResponseValue;
484         }
485         // struct LDKDecodeError CResult_ChannelPublicKeysDecodeErrorZ_get_err(LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR owner);
486         export function CResult_ChannelPublicKeysDecodeErrorZ_get_err(owner: number): number {
487                 if(!isWasmInitialized) {
488                         throw new Error("initializeWasm() must be awaited first!");
489                 }
490                 const nativeResponseValue = wasm.TS_CResult_ChannelPublicKeysDecodeErrorZ_get_err(owner);
491                 return nativeResponseValue;
492         }
493         // struct LDKTxCreationKeys CResult_TxCreationKeysErrorZ_get_ok(LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR owner);
494         export function CResult_TxCreationKeysErrorZ_get_ok(owner: number): number {
495                 if(!isWasmInitialized) {
496                         throw new Error("initializeWasm() must be awaited first!");
497                 }
498                 const nativeResponseValue = wasm.TS_CResult_TxCreationKeysErrorZ_get_ok(owner);
499                 return nativeResponseValue;
500         }
501         // enum LDKSecp256k1Error CResult_TxCreationKeysErrorZ_get_err(LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR owner);
502         export function CResult_TxCreationKeysErrorZ_get_err(owner: number): Secp256k1Error {
503                 if(!isWasmInitialized) {
504                         throw new Error("initializeWasm() must be awaited first!");
505                 }
506                 const nativeResponseValue = wasm.TS_CResult_TxCreationKeysErrorZ_get_err(owner);
507                 return nativeResponseValue;
508         }
509         export class LDKCOption_u32Z {
510                 protected constructor() {}
511         }
512         export class LDKCOption_u32Z_Some extends LDKCOption_u32Z {
513                 constructor(public some: number) { super(); }
514         }
515         export class LDKCOption_u32Z_None extends LDKCOption_u32Z {
516                 constructor() { super(); }
517         }
518         export function LDKCOption_u32Z_ref_from_ptr(ptr: number): number {
519                 if(!isWasmInitialized) {
520                         throw new Error("initializeWasm() must be awaited first!");
521                 }
522                 const nativeResponseValue = wasm.TS_LDKCOption_u32Z_ref_from_ptr(ptr);
523                 return nativeResponseValue;
524         }
525         // struct LDKHTLCOutputInCommitment CResult_HTLCOutputInCommitmentDecodeErrorZ_get_ok(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR owner);
526         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_get_ok(owner: number): number {
527                 if(!isWasmInitialized) {
528                         throw new Error("initializeWasm() must be awaited first!");
529                 }
530                 const nativeResponseValue = wasm.TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_get_ok(owner);
531                 return nativeResponseValue;
532         }
533         // struct LDKDecodeError CResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR owner);
534         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(owner: number): number {
535                 if(!isWasmInitialized) {
536                         throw new Error("initializeWasm() must be awaited first!");
537                 }
538                 const nativeResponseValue = wasm.TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(owner);
539                 return nativeResponseValue;
540         }
541         // struct LDKCounterpartyChannelTransactionParameters CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_ok(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR owner);
542         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_ok(owner: number): number {
543                 if(!isWasmInitialized) {
544                         throw new Error("initializeWasm() must be awaited first!");
545                 }
546                 const nativeResponseValue = wasm.TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_ok(owner);
547                 return nativeResponseValue;
548         }
549         // struct LDKDecodeError CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR owner);
550         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(owner: number): number {
551                 if(!isWasmInitialized) {
552                         throw new Error("initializeWasm() must be awaited first!");
553                 }
554                 const nativeResponseValue = wasm.TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(owner);
555                 return nativeResponseValue;
556         }
557         // struct LDKChannelTransactionParameters CResult_ChannelTransactionParametersDecodeErrorZ_get_ok(LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR owner);
558         export function CResult_ChannelTransactionParametersDecodeErrorZ_get_ok(owner: number): number {
559                 if(!isWasmInitialized) {
560                         throw new Error("initializeWasm() must be awaited first!");
561                 }
562                 const nativeResponseValue = wasm.TS_CResult_ChannelTransactionParametersDecodeErrorZ_get_ok(owner);
563                 return nativeResponseValue;
564         }
565         // struct LDKDecodeError CResult_ChannelTransactionParametersDecodeErrorZ_get_err(LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR owner);
566         export function CResult_ChannelTransactionParametersDecodeErrorZ_get_err(owner: number): number {
567                 if(!isWasmInitialized) {
568                         throw new Error("initializeWasm() must be awaited first!");
569                 }
570                 const nativeResponseValue = wasm.TS_CResult_ChannelTransactionParametersDecodeErrorZ_get_err(owner);
571                 return nativeResponseValue;
572         }
573         // struct LDKHolderCommitmentTransaction CResult_HolderCommitmentTransactionDecodeErrorZ_get_ok(LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR owner);
574         export function CResult_HolderCommitmentTransactionDecodeErrorZ_get_ok(owner: number): number {
575                 if(!isWasmInitialized) {
576                         throw new Error("initializeWasm() must be awaited first!");
577                 }
578                 const nativeResponseValue = wasm.TS_CResult_HolderCommitmentTransactionDecodeErrorZ_get_ok(owner);
579                 return nativeResponseValue;
580         }
581         // struct LDKDecodeError CResult_HolderCommitmentTransactionDecodeErrorZ_get_err(LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR owner);
582         export function CResult_HolderCommitmentTransactionDecodeErrorZ_get_err(owner: number): number {
583                 if(!isWasmInitialized) {
584                         throw new Error("initializeWasm() must be awaited first!");
585                 }
586                 const nativeResponseValue = wasm.TS_CResult_HolderCommitmentTransactionDecodeErrorZ_get_err(owner);
587                 return nativeResponseValue;
588         }
589         // struct LDKBuiltCommitmentTransaction CResult_BuiltCommitmentTransactionDecodeErrorZ_get_ok(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR owner);
590         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_get_ok(owner: number): number {
591                 if(!isWasmInitialized) {
592                         throw new Error("initializeWasm() must be awaited first!");
593                 }
594                 const nativeResponseValue = wasm.TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_get_ok(owner);
595                 return nativeResponseValue;
596         }
597         // struct LDKDecodeError CResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR owner);
598         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(owner: number): number {
599                 if(!isWasmInitialized) {
600                         throw new Error("initializeWasm() must be awaited first!");
601                 }
602                 const nativeResponseValue = wasm.TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(owner);
603                 return nativeResponseValue;
604         }
605         // struct LDKTrustedClosingTransaction *CResult_TrustedClosingTransactionNoneZ_get_ok(LDKCResult_TrustedClosingTransactionNoneZ *NONNULL_PTR owner);
606         export function CResult_TrustedClosingTransactionNoneZ_get_ok(owner: number): number {
607                 if(!isWasmInitialized) {
608                         throw new Error("initializeWasm() must be awaited first!");
609                 }
610                 const nativeResponseValue = wasm.TS_CResult_TrustedClosingTransactionNoneZ_get_ok(owner);
611                 return nativeResponseValue;
612         }
613         // void CResult_TrustedClosingTransactionNoneZ_get_err(LDKCResult_TrustedClosingTransactionNoneZ *NONNULL_PTR owner);
614         export function CResult_TrustedClosingTransactionNoneZ_get_err(owner: number): void {
615                 if(!isWasmInitialized) {
616                         throw new Error("initializeWasm() must be awaited first!");
617                 }
618                 const nativeResponseValue = wasm.TS_CResult_TrustedClosingTransactionNoneZ_get_err(owner);
619                 // debug statements here
620         }
621         // struct LDKCommitmentTransaction CResult_CommitmentTransactionDecodeErrorZ_get_ok(LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR owner);
622         export function CResult_CommitmentTransactionDecodeErrorZ_get_ok(owner: number): number {
623                 if(!isWasmInitialized) {
624                         throw new Error("initializeWasm() must be awaited first!");
625                 }
626                 const nativeResponseValue = wasm.TS_CResult_CommitmentTransactionDecodeErrorZ_get_ok(owner);
627                 return nativeResponseValue;
628         }
629         // struct LDKDecodeError CResult_CommitmentTransactionDecodeErrorZ_get_err(LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR owner);
630         export function CResult_CommitmentTransactionDecodeErrorZ_get_err(owner: number): number {
631                 if(!isWasmInitialized) {
632                         throw new Error("initializeWasm() must be awaited first!");
633                 }
634                 const nativeResponseValue = wasm.TS_CResult_CommitmentTransactionDecodeErrorZ_get_err(owner);
635                 return nativeResponseValue;
636         }
637         // struct LDKTrustedCommitmentTransaction *CResult_TrustedCommitmentTransactionNoneZ_get_ok(LDKCResult_TrustedCommitmentTransactionNoneZ *NONNULL_PTR owner);
638         export function CResult_TrustedCommitmentTransactionNoneZ_get_ok(owner: number): number {
639                 if(!isWasmInitialized) {
640                         throw new Error("initializeWasm() must be awaited first!");
641                 }
642                 const nativeResponseValue = wasm.TS_CResult_TrustedCommitmentTransactionNoneZ_get_ok(owner);
643                 return nativeResponseValue;
644         }
645         // void CResult_TrustedCommitmentTransactionNoneZ_get_err(LDKCResult_TrustedCommitmentTransactionNoneZ *NONNULL_PTR owner);
646         export function CResult_TrustedCommitmentTransactionNoneZ_get_err(owner: number): void {
647                 if(!isWasmInitialized) {
648                         throw new Error("initializeWasm() must be awaited first!");
649                 }
650                 const nativeResponseValue = wasm.TS_CResult_TrustedCommitmentTransactionNoneZ_get_err(owner);
651                 // debug statements here
652         }
653         // struct LDKCVec_SignatureZ CResult_CVec_SignatureZNoneZ_get_ok(LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR owner);
654         export function CResult_CVec_SignatureZNoneZ_get_ok(owner: number): Uint8Array[] {
655                 if(!isWasmInitialized) {
656                         throw new Error("initializeWasm() must be awaited first!");
657                 }
658                 const nativeResponseValue = wasm.TS_CResult_CVec_SignatureZNoneZ_get_ok(owner);
659                 return nativeResponseValue;
660         }
661         // void CResult_CVec_SignatureZNoneZ_get_err(LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR owner);
662         export function CResult_CVec_SignatureZNoneZ_get_err(owner: number): void {
663                 if(!isWasmInitialized) {
664                         throw new Error("initializeWasm() must be awaited first!");
665                 }
666                 const nativeResponseValue = wasm.TS_CResult_CVec_SignatureZNoneZ_get_err(owner);
667                 // debug statements here
668         }
669         // struct LDKShutdownScript CResult_ShutdownScriptDecodeErrorZ_get_ok(LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR owner);
670         export function CResult_ShutdownScriptDecodeErrorZ_get_ok(owner: number): number {
671                 if(!isWasmInitialized) {
672                         throw new Error("initializeWasm() must be awaited first!");
673                 }
674                 const nativeResponseValue = wasm.TS_CResult_ShutdownScriptDecodeErrorZ_get_ok(owner);
675                 return nativeResponseValue;
676         }
677         // struct LDKDecodeError CResult_ShutdownScriptDecodeErrorZ_get_err(LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR owner);
678         export function CResult_ShutdownScriptDecodeErrorZ_get_err(owner: number): number {
679                 if(!isWasmInitialized) {
680                         throw new Error("initializeWasm() must be awaited first!");
681                 }
682                 const nativeResponseValue = wasm.TS_CResult_ShutdownScriptDecodeErrorZ_get_err(owner);
683                 return nativeResponseValue;
684         }
685         // struct LDKShutdownScript CResult_ShutdownScriptInvalidShutdownScriptZ_get_ok(LDKCResult_ShutdownScriptInvalidShutdownScriptZ *NONNULL_PTR owner);
686         export function CResult_ShutdownScriptInvalidShutdownScriptZ_get_ok(owner: number): number {
687                 if(!isWasmInitialized) {
688                         throw new Error("initializeWasm() must be awaited first!");
689                 }
690                 const nativeResponseValue = wasm.TS_CResult_ShutdownScriptInvalidShutdownScriptZ_get_ok(owner);
691                 return nativeResponseValue;
692         }
693         // struct LDKInvalidShutdownScript CResult_ShutdownScriptInvalidShutdownScriptZ_get_err(LDKCResult_ShutdownScriptInvalidShutdownScriptZ *NONNULL_PTR owner);
694         export function CResult_ShutdownScriptInvalidShutdownScriptZ_get_err(owner: number): number {
695                 if(!isWasmInitialized) {
696                         throw new Error("initializeWasm() must be awaited first!");
697                 }
698                 const nativeResponseValue = wasm.TS_CResult_ShutdownScriptInvalidShutdownScriptZ_get_err(owner);
699                 return nativeResponseValue;
700         }
701
702
703
704 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
705
706                 export interface LDKType {
707                         type_id (): number;
708                         debug_str (): String;
709                         write (): Uint8Array;
710                 }
711
712                 export function LDKType_new(impl: LDKType): number {
713             throw new Error('unimplemented'); // TODO: bind to WASM
714         }
715
716 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
717
718
719         // uint16_t Type_type_id LDKType *NONNULL_PTR this_arg
720         export function Type_type_id(this_arg: number): number {
721                 if(!isWasmInitialized) {
722                         throw new Error("initializeWasm() must be awaited first!");
723                 }
724                 const nativeResponseValue = wasm.TS_Type_type_id(this_arg);
725                 return nativeResponseValue;
726         }
727         // LDKStr Type_debug_str LDKType *NONNULL_PTR this_arg
728         export function Type_debug_str(this_arg: number): String {
729                 if(!isWasmInitialized) {
730                         throw new Error("initializeWasm() must be awaited first!");
731                 }
732                 const nativeResponseValue = wasm.TS_Type_debug_str(this_arg);
733                 return nativeResponseValue;
734         }
735         // LDKCVec_u8Z Type_write LDKType *NONNULL_PTR this_arg
736         export function Type_write(this_arg: number): Uint8Array {
737                 if(!isWasmInitialized) {
738                         throw new Error("initializeWasm() must be awaited first!");
739                 }
740                 const nativeResponseValue = wasm.TS_Type_write(this_arg);
741                 return decodeUint8Array(nativeResponseValue);
742         }
743         export class LDKCOption_TypeZ {
744                 protected constructor() {}
745         }
746         export class LDKCOption_TypeZ_Some extends LDKCOption_TypeZ {
747                 constructor(public some: number) { super(); }
748         }
749         export class LDKCOption_TypeZ_None extends LDKCOption_TypeZ {
750                 constructor() { super(); }
751         }
752         export function LDKCOption_TypeZ_ref_from_ptr(ptr: number): number {
753                 if(!isWasmInitialized) {
754                         throw new Error("initializeWasm() must be awaited first!");
755                 }
756                 const nativeResponseValue = wasm.TS_LDKCOption_TypeZ_ref_from_ptr(ptr);
757                 return nativeResponseValue;
758         }
759         // struct LDKCOption_TypeZ CResult_COption_TypeZDecodeErrorZ_get_ok(LDKCResult_COption_TypeZDecodeErrorZ *NONNULL_PTR owner);
760         export function CResult_COption_TypeZDecodeErrorZ_get_ok(owner: number): number {
761                 if(!isWasmInitialized) {
762                         throw new Error("initializeWasm() must be awaited first!");
763                 }
764                 const nativeResponseValue = wasm.TS_CResult_COption_TypeZDecodeErrorZ_get_ok(owner);
765                 return nativeResponseValue;
766         }
767         // struct LDKDecodeError CResult_COption_TypeZDecodeErrorZ_get_err(LDKCResult_COption_TypeZDecodeErrorZ *NONNULL_PTR owner);
768         export function CResult_COption_TypeZDecodeErrorZ_get_err(owner: number): number {
769                 if(!isWasmInitialized) {
770                         throw new Error("initializeWasm() must be awaited first!");
771                 }
772                 const nativeResponseValue = wasm.TS_CResult_COption_TypeZDecodeErrorZ_get_err(owner);
773                 return nativeResponseValue;
774         }
775         // struct LDKStr CResult_StringErrorZ_get_ok(LDKCResult_StringErrorZ *NONNULL_PTR owner);
776         export function CResult_StringErrorZ_get_ok(owner: number): String {
777                 if(!isWasmInitialized) {
778                         throw new Error("initializeWasm() must be awaited first!");
779                 }
780                 const nativeResponseValue = wasm.TS_CResult_StringErrorZ_get_ok(owner);
781                 return nativeResponseValue;
782         }
783         // enum LDKSecp256k1Error CResult_StringErrorZ_get_err(LDKCResult_StringErrorZ *NONNULL_PTR owner);
784         export function CResult_StringErrorZ_get_err(owner: number): Secp256k1Error {
785                 if(!isWasmInitialized) {
786                         throw new Error("initializeWasm() must be awaited first!");
787                 }
788                 const nativeResponseValue = wasm.TS_CResult_StringErrorZ_get_err(owner);
789                 return nativeResponseValue;
790         }
791         // struct LDKChannelMonitorUpdate CResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR owner);
792         export function CResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(owner: number): number {
793                 if(!isWasmInitialized) {
794                         throw new Error("initializeWasm() must be awaited first!");
795                 }
796                 const nativeResponseValue = wasm.TS_CResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(owner);
797                 return nativeResponseValue;
798         }
799         // struct LDKDecodeError CResult_ChannelMonitorUpdateDecodeErrorZ_get_err(LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR owner);
800         export function CResult_ChannelMonitorUpdateDecodeErrorZ_get_err(owner: number): number {
801                 if(!isWasmInitialized) {
802                         throw new Error("initializeWasm() must be awaited first!");
803                 }
804                 const nativeResponseValue = wasm.TS_CResult_ChannelMonitorUpdateDecodeErrorZ_get_err(owner);
805                 return nativeResponseValue;
806         }
807         export class LDKMonitorEvent {
808                 protected constructor() {}
809         }
810         export class LDKMonitorEvent_HTLCEvent extends LDKMonitorEvent {
811                 constructor(public htlc_event: number) { super(); }
812         }
813         export class LDKMonitorEvent_CommitmentTxConfirmed extends LDKMonitorEvent {
814                 constructor(public commitment_tx_confirmed: number) { super(); }
815         }
816         export class LDKMonitorEvent_UpdateCompleted extends LDKMonitorEvent {
817                 constructor(public funding_txo: number, public monitor_update_id: number) { super(); }
818         }
819         export class LDKMonitorEvent_UpdateFailed extends LDKMonitorEvent {
820                 constructor(public update_failed: number) { super(); }
821         }
822         export function LDKMonitorEvent_ref_from_ptr(ptr: number): number {
823                 if(!isWasmInitialized) {
824                         throw new Error("initializeWasm() must be awaited first!");
825                 }
826                 const nativeResponseValue = wasm.TS_LDKMonitorEvent_ref_from_ptr(ptr);
827                 return nativeResponseValue;
828         }
829         export class LDKCOption_MonitorEventZ {
830                 protected constructor() {}
831         }
832         export class LDKCOption_MonitorEventZ_Some extends LDKCOption_MonitorEventZ {
833                 constructor(public some: number) { super(); }
834         }
835         export class LDKCOption_MonitorEventZ_None extends LDKCOption_MonitorEventZ {
836                 constructor() { super(); }
837         }
838         export function LDKCOption_MonitorEventZ_ref_from_ptr(ptr: number): number {
839                 if(!isWasmInitialized) {
840                         throw new Error("initializeWasm() must be awaited first!");
841                 }
842                 const nativeResponseValue = wasm.TS_LDKCOption_MonitorEventZ_ref_from_ptr(ptr);
843                 return nativeResponseValue;
844         }
845         // struct LDKCOption_MonitorEventZ CResult_COption_MonitorEventZDecodeErrorZ_get_ok(LDKCResult_COption_MonitorEventZDecodeErrorZ *NONNULL_PTR owner);
846         export function CResult_COption_MonitorEventZDecodeErrorZ_get_ok(owner: number): number {
847                 if(!isWasmInitialized) {
848                         throw new Error("initializeWasm() must be awaited first!");
849                 }
850                 const nativeResponseValue = wasm.TS_CResult_COption_MonitorEventZDecodeErrorZ_get_ok(owner);
851                 return nativeResponseValue;
852         }
853         // struct LDKDecodeError CResult_COption_MonitorEventZDecodeErrorZ_get_err(LDKCResult_COption_MonitorEventZDecodeErrorZ *NONNULL_PTR owner);
854         export function CResult_COption_MonitorEventZDecodeErrorZ_get_err(owner: number): number {
855                 if(!isWasmInitialized) {
856                         throw new Error("initializeWasm() must be awaited first!");
857                 }
858                 const nativeResponseValue = wasm.TS_CResult_COption_MonitorEventZDecodeErrorZ_get_err(owner);
859                 return nativeResponseValue;
860         }
861         // struct LDKHTLCUpdate CResult_HTLCUpdateDecodeErrorZ_get_ok(LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR owner);
862         export function CResult_HTLCUpdateDecodeErrorZ_get_ok(owner: number): number {
863                 if(!isWasmInitialized) {
864                         throw new Error("initializeWasm() must be awaited first!");
865                 }
866                 const nativeResponseValue = wasm.TS_CResult_HTLCUpdateDecodeErrorZ_get_ok(owner);
867                 return nativeResponseValue;
868         }
869         // struct LDKDecodeError CResult_HTLCUpdateDecodeErrorZ_get_err(LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR owner);
870         export function CResult_HTLCUpdateDecodeErrorZ_get_err(owner: number): number {
871                 if(!isWasmInitialized) {
872                         throw new Error("initializeWasm() must be awaited first!");
873                 }
874                 const nativeResponseValue = wasm.TS_CResult_HTLCUpdateDecodeErrorZ_get_err(owner);
875                 return nativeResponseValue;
876         }
877         // void CResult_NoneNoneZ_get_ok(LDKCResult_NoneNoneZ *NONNULL_PTR owner);
878         export function CResult_NoneNoneZ_get_ok(owner: number): void {
879                 if(!isWasmInitialized) {
880                         throw new Error("initializeWasm() must be awaited first!");
881                 }
882                 const nativeResponseValue = wasm.TS_CResult_NoneNoneZ_get_ok(owner);
883                 // debug statements here
884         }
885         // void CResult_NoneNoneZ_get_err(LDKCResult_NoneNoneZ *NONNULL_PTR owner);
886         export function CResult_NoneNoneZ_get_err(owner: number): void {
887                 if(!isWasmInitialized) {
888                         throw new Error("initializeWasm() must be awaited first!");
889                 }
890                 const nativeResponseValue = wasm.TS_CResult_NoneNoneZ_get_err(owner);
891                 // debug statements here
892         }
893         // struct LDKOutPoint C2Tuple_OutPointScriptZ_get_a(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR owner);
894         export function C2Tuple_OutPointScriptZ_get_a(owner: number): number {
895                 if(!isWasmInitialized) {
896                         throw new Error("initializeWasm() must be awaited first!");
897                 }
898                 const nativeResponseValue = wasm.TS_C2Tuple_OutPointScriptZ_get_a(owner);
899                 return nativeResponseValue;
900         }
901         // struct LDKCVec_u8Z C2Tuple_OutPointScriptZ_get_b(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR owner);
902         export function C2Tuple_OutPointScriptZ_get_b(owner: number): Uint8Array {
903                 if(!isWasmInitialized) {
904                         throw new Error("initializeWasm() must be awaited first!");
905                 }
906                 const nativeResponseValue = wasm.TS_C2Tuple_OutPointScriptZ_get_b(owner);
907                 return decodeUint8Array(nativeResponseValue);
908         }
909         // uint32_t C2Tuple_u32ScriptZ_get_a(LDKC2Tuple_u32ScriptZ *NONNULL_PTR owner);
910         export function C2Tuple_u32ScriptZ_get_a(owner: number): number {
911                 if(!isWasmInitialized) {
912                         throw new Error("initializeWasm() must be awaited first!");
913                 }
914                 const nativeResponseValue = wasm.TS_C2Tuple_u32ScriptZ_get_a(owner);
915                 return nativeResponseValue;
916         }
917         // struct LDKCVec_u8Z C2Tuple_u32ScriptZ_get_b(LDKC2Tuple_u32ScriptZ *NONNULL_PTR owner);
918         export function C2Tuple_u32ScriptZ_get_b(owner: number): Uint8Array {
919                 if(!isWasmInitialized) {
920                         throw new Error("initializeWasm() must be awaited first!");
921                 }
922                 const nativeResponseValue = wasm.TS_C2Tuple_u32ScriptZ_get_b(owner);
923                 return decodeUint8Array(nativeResponseValue);
924         }
925         // struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR owner);
926         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(owner: number): Uint8Array {
927                 if(!isWasmInitialized) {
928                         throw new Error("initializeWasm() must be awaited first!");
929                 }
930                 const nativeResponseValue = wasm.TS_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(owner);
931                 return decodeUint8Array(nativeResponseValue);
932         }
933         // struct LDKCVec_C2Tuple_u32ScriptZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR owner);
934         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(owner: number): number[] {
935                 if(!isWasmInitialized) {
936                         throw new Error("initializeWasm() must be awaited first!");
937                 }
938                 const nativeResponseValue = wasm.TS_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(owner);
939                 return nativeResponseValue;
940         }
941         export class LDKPaymentPurpose {
942                 protected constructor() {}
943         }
944         export class LDKPaymentPurpose_InvoicePayment extends LDKPaymentPurpose {
945                 constructor(public payment_preimage: Uint8Array, public payment_secret: Uint8Array) { super(); }
946         }
947         export class LDKPaymentPurpose_SpontaneousPayment extends LDKPaymentPurpose {
948                 constructor(public spontaneous_payment: Uint8Array) { super(); }
949         }
950         export function LDKPaymentPurpose_ref_from_ptr(ptr: number): number {
951                 if(!isWasmInitialized) {
952                         throw new Error("initializeWasm() must be awaited first!");
953                 }
954                 const nativeResponseValue = wasm.TS_LDKPaymentPurpose_ref_from_ptr(ptr);
955                 return nativeResponseValue;
956         }
957         export class LDKCOption_u64Z {
958                 protected constructor() {}
959         }
960         export class LDKCOption_u64Z_Some extends LDKCOption_u64Z {
961                 constructor(public some: number) { super(); }
962         }
963         export class LDKCOption_u64Z_None extends LDKCOption_u64Z {
964                 constructor() { super(); }
965         }
966         export function LDKCOption_u64Z_ref_from_ptr(ptr: number): number {
967                 if(!isWasmInitialized) {
968                         throw new Error("initializeWasm() must be awaited first!");
969                 }
970                 const nativeResponseValue = wasm.TS_LDKCOption_u64Z_ref_from_ptr(ptr);
971                 return nativeResponseValue;
972         }
973         export class LDKNetworkUpdate {
974                 protected constructor() {}
975         }
976         export class LDKNetworkUpdate_ChannelUpdateMessage extends LDKNetworkUpdate {
977                 constructor(public msg: number) { super(); }
978         }
979         export class LDKNetworkUpdate_ChannelClosed extends LDKNetworkUpdate {
980                 constructor(public short_channel_id: number, public is_permanent: boolean) { super(); }
981         }
982         export class LDKNetworkUpdate_NodeFailure extends LDKNetworkUpdate {
983                 constructor(public node_id: Uint8Array, public is_permanent: boolean) { super(); }
984         }
985         export function LDKNetworkUpdate_ref_from_ptr(ptr: number): number {
986                 if(!isWasmInitialized) {
987                         throw new Error("initializeWasm() must be awaited first!");
988                 }
989                 const nativeResponseValue = wasm.TS_LDKNetworkUpdate_ref_from_ptr(ptr);
990                 return nativeResponseValue;
991         }
992         export class LDKCOption_NetworkUpdateZ {
993                 protected constructor() {}
994         }
995         export class LDKCOption_NetworkUpdateZ_Some extends LDKCOption_NetworkUpdateZ {
996                 constructor(public some: number) { super(); }
997         }
998         export class LDKCOption_NetworkUpdateZ_None extends LDKCOption_NetworkUpdateZ {
999                 constructor() { super(); }
1000         }
1001         export function LDKCOption_NetworkUpdateZ_ref_from_ptr(ptr: number): number {
1002                 if(!isWasmInitialized) {
1003                         throw new Error("initializeWasm() must be awaited first!");
1004                 }
1005                 const nativeResponseValue = wasm.TS_LDKCOption_NetworkUpdateZ_ref_from_ptr(ptr);
1006                 return nativeResponseValue;
1007         }
1008         export class LDKSpendableOutputDescriptor {
1009                 protected constructor() {}
1010         }
1011         export class LDKSpendableOutputDescriptor_StaticOutput extends LDKSpendableOutputDescriptor {
1012                 constructor(public outpoint: number, public output: number) { super(); }
1013         }
1014         export class LDKSpendableOutputDescriptor_DelayedPaymentOutput extends LDKSpendableOutputDescriptor {
1015                 constructor(public delayed_payment_output: number) { super(); }
1016         }
1017         export class LDKSpendableOutputDescriptor_StaticPaymentOutput extends LDKSpendableOutputDescriptor {
1018                 constructor(public static_payment_output: number) { super(); }
1019         }
1020         export function LDKSpendableOutputDescriptor_ref_from_ptr(ptr: number): number {
1021                 if(!isWasmInitialized) {
1022                         throw new Error("initializeWasm() must be awaited first!");
1023                 }
1024                 const nativeResponseValue = wasm.TS_LDKSpendableOutputDescriptor_ref_from_ptr(ptr);
1025                 return nativeResponseValue;
1026         }
1027         export class LDKClosureReason {
1028                 protected constructor() {}
1029         }
1030         export class LDKClosureReason_CounterpartyForceClosed extends LDKClosureReason {
1031                 constructor(public peer_msg: String) { super(); }
1032         }
1033         export class LDKClosureReason_HolderForceClosed extends LDKClosureReason {
1034                 constructor() { super(); }
1035         }
1036         export class LDKClosureReason_CooperativeClosure extends LDKClosureReason {
1037                 constructor() { super(); }
1038         }
1039         export class LDKClosureReason_CommitmentTxConfirmed extends LDKClosureReason {
1040                 constructor() { super(); }
1041         }
1042         export class LDKClosureReason_FundingTimedOut extends LDKClosureReason {
1043                 constructor() { super(); }
1044         }
1045         export class LDKClosureReason_ProcessingError extends LDKClosureReason {
1046                 constructor(public err: String) { super(); }
1047         }
1048         export class LDKClosureReason_DisconnectedPeer extends LDKClosureReason {
1049                 constructor() { super(); }
1050         }
1051         export class LDKClosureReason_OutdatedChannelManager extends LDKClosureReason {
1052                 constructor() { super(); }
1053         }
1054         export function LDKClosureReason_ref_from_ptr(ptr: number): number {
1055                 if(!isWasmInitialized) {
1056                         throw new Error("initializeWasm() must be awaited first!");
1057                 }
1058                 const nativeResponseValue = wasm.TS_LDKClosureReason_ref_from_ptr(ptr);
1059                 return nativeResponseValue;
1060         }
1061         export class LDKEvent {
1062                 protected constructor() {}
1063         }
1064         export class LDKEvent_FundingGenerationReady extends LDKEvent {
1065                 constructor(public temporary_channel_id: Uint8Array, public channel_value_satoshis: number, public output_script: Uint8Array, public user_channel_id: number) { super(); }
1066         }
1067         export class LDKEvent_PaymentReceived extends LDKEvent {
1068                 constructor(public payment_hash: Uint8Array, public amt: number, public purpose: number) { super(); }
1069         }
1070         export class LDKEvent_PaymentSent extends LDKEvent {
1071                 constructor(public payment_id: Uint8Array, public payment_preimage: Uint8Array, public payment_hash: Uint8Array, public fee_paid_msat: number) { super(); }
1072         }
1073         export class LDKEvent_PaymentPathFailed extends LDKEvent {
1074                 constructor(public payment_id: Uint8Array, public payment_hash: Uint8Array, public rejected_by_dest: boolean, public network_update: number, public all_paths_failed: boolean, public path: number[], public short_channel_id: number, public retry: number) { super(); }
1075         }
1076         export class LDKEvent_PaymentFailed extends LDKEvent {
1077                 constructor(public payment_id: Uint8Array, public payment_hash: Uint8Array) { super(); }
1078         }
1079         export class LDKEvent_PendingHTLCsForwardable extends LDKEvent {
1080                 constructor(public time_forwardable: number) { super(); }
1081         }
1082         export class LDKEvent_SpendableOutputs extends LDKEvent {
1083                 constructor(public outputs: number[]) { super(); }
1084         }
1085         export class LDKEvent_PaymentForwarded extends LDKEvent {
1086                 constructor(public fee_earned_msat: number, public claim_from_onchain_tx: boolean) { super(); }
1087         }
1088         export class LDKEvent_ChannelClosed extends LDKEvent {
1089                 constructor(public channel_id: Uint8Array, public user_channel_id: number, public reason: number) { super(); }
1090         }
1091         export class LDKEvent_DiscardFunding extends LDKEvent {
1092                 constructor(public channel_id: Uint8Array, public transaction: Uint8Array) { super(); }
1093         }
1094         export class LDKEvent_PaymentPathSuccessful extends LDKEvent {
1095                 constructor(public payment_id: Uint8Array, public payment_hash: Uint8Array, public path: number[]) { super(); }
1096         }
1097         export function LDKEvent_ref_from_ptr(ptr: number): number {
1098                 if(!isWasmInitialized) {
1099                         throw new Error("initializeWasm() must be awaited first!");
1100                 }
1101                 const nativeResponseValue = wasm.TS_LDKEvent_ref_from_ptr(ptr);
1102                 return nativeResponseValue;
1103         }
1104         // uintptr_t C2Tuple_usizeTransactionZ_get_a(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR owner);
1105         export function C2Tuple_usizeTransactionZ_get_a(owner: number): number {
1106                 if(!isWasmInitialized) {
1107                         throw new Error("initializeWasm() must be awaited first!");
1108                 }
1109                 const nativeResponseValue = wasm.TS_C2Tuple_usizeTransactionZ_get_a(owner);
1110                 return nativeResponseValue;
1111         }
1112         // struct LDKTransaction C2Tuple_usizeTransactionZ_get_b(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR owner);
1113         export function C2Tuple_usizeTransactionZ_get_b(owner: number): Uint8Array {
1114                 if(!isWasmInitialized) {
1115                         throw new Error("initializeWasm() must be awaited first!");
1116                 }
1117                 const nativeResponseValue = wasm.TS_C2Tuple_usizeTransactionZ_get_b(owner);
1118                 return decodeUint8Array(nativeResponseValue);
1119         }
1120         // uint32_t C2Tuple_u32TxOutZ_get_a(LDKC2Tuple_u32TxOutZ *NONNULL_PTR owner);
1121         export function C2Tuple_u32TxOutZ_get_a(owner: number): number {
1122                 if(!isWasmInitialized) {
1123                         throw new Error("initializeWasm() must be awaited first!");
1124                 }
1125                 const nativeResponseValue = wasm.TS_C2Tuple_u32TxOutZ_get_a(owner);
1126                 return nativeResponseValue;
1127         }
1128         // struct LDKTxOut C2Tuple_u32TxOutZ_get_b(LDKC2Tuple_u32TxOutZ *NONNULL_PTR owner);
1129         export function C2Tuple_u32TxOutZ_get_b(owner: number): number {
1130                 if(!isWasmInitialized) {
1131                         throw new Error("initializeWasm() must be awaited first!");
1132                 }
1133                 const nativeResponseValue = wasm.TS_C2Tuple_u32TxOutZ_get_b(owner);
1134                 return nativeResponseValue;
1135         }
1136         // struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR owner);
1137         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(owner: number): Uint8Array {
1138                 if(!isWasmInitialized) {
1139                         throw new Error("initializeWasm() must be awaited first!");
1140                 }
1141                 const nativeResponseValue = wasm.TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(owner);
1142                 return decodeUint8Array(nativeResponseValue);
1143         }
1144         // struct LDKCVec_C2Tuple_u32TxOutZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR owner);
1145         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(owner: number): number[] {
1146                 if(!isWasmInitialized) {
1147                         throw new Error("initializeWasm() must be awaited first!");
1148                 }
1149                 const nativeResponseValue = wasm.TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(owner);
1150                 return nativeResponseValue;
1151         }
1152         export class LDKBalance {
1153                 protected constructor() {}
1154         }
1155         export class LDKBalance_ClaimableOnChannelClose extends LDKBalance {
1156                 constructor(public claimable_amount_satoshis: number) { super(); }
1157         }
1158         export class LDKBalance_ClaimableAwaitingConfirmations extends LDKBalance {
1159                 constructor(public claimable_amount_satoshis: number, public confirmation_height: number) { super(); }
1160         }
1161         export class LDKBalance_ContentiousClaimable extends LDKBalance {
1162                 constructor(public claimable_amount_satoshis: number, public timeout_height: number) { super(); }
1163         }
1164         export class LDKBalance_MaybeClaimableHTLCAwaitingTimeout extends LDKBalance {
1165                 constructor(public claimable_amount_satoshis: number, public claimable_height: number) { super(); }
1166         }
1167         export function LDKBalance_ref_from_ptr(ptr: number): number {
1168                 if(!isWasmInitialized) {
1169                         throw new Error("initializeWasm() must be awaited first!");
1170                 }
1171                 const nativeResponseValue = wasm.TS_LDKBalance_ref_from_ptr(ptr);
1172                 return nativeResponseValue;
1173         }
1174         // struct LDKSignature C2Tuple_SignatureCVec_SignatureZZ_get_a(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR owner);
1175         export function C2Tuple_SignatureCVec_SignatureZZ_get_a(owner: number): Uint8Array {
1176                 if(!isWasmInitialized) {
1177                         throw new Error("initializeWasm() must be awaited first!");
1178                 }
1179                 const nativeResponseValue = wasm.TS_C2Tuple_SignatureCVec_SignatureZZ_get_a(owner);
1180                 return decodeUint8Array(nativeResponseValue);
1181         }
1182         // struct LDKCVec_SignatureZ C2Tuple_SignatureCVec_SignatureZZ_get_b(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR owner);
1183         export function C2Tuple_SignatureCVec_SignatureZZ_get_b(owner: number): Uint8Array[] {
1184                 if(!isWasmInitialized) {
1185                         throw new Error("initializeWasm() must be awaited first!");
1186                 }
1187                 const nativeResponseValue = wasm.TS_C2Tuple_SignatureCVec_SignatureZZ_get_b(owner);
1188                 return nativeResponseValue;
1189         }
1190         // struct LDKC2Tuple_SignatureCVec_SignatureZZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR owner);
1191         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(owner: number): number {
1192                 if(!isWasmInitialized) {
1193                         throw new Error("initializeWasm() must be awaited first!");
1194                 }
1195                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(owner);
1196                 return nativeResponseValue;
1197         }
1198         // void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR owner);
1199         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(owner: number): void {
1200                 if(!isWasmInitialized) {
1201                         throw new Error("initializeWasm() must be awaited first!");
1202                 }
1203                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(owner);
1204                 // debug statements here
1205         }
1206         // struct LDKSignature CResult_SignatureNoneZ_get_ok(LDKCResult_SignatureNoneZ *NONNULL_PTR owner);
1207         export function CResult_SignatureNoneZ_get_ok(owner: number): Uint8Array {
1208                 if(!isWasmInitialized) {
1209                         throw new Error("initializeWasm() must be awaited first!");
1210                 }
1211                 const nativeResponseValue = wasm.TS_CResult_SignatureNoneZ_get_ok(owner);
1212                 return decodeUint8Array(nativeResponseValue);
1213         }
1214         // void CResult_SignatureNoneZ_get_err(LDKCResult_SignatureNoneZ *NONNULL_PTR owner);
1215         export function CResult_SignatureNoneZ_get_err(owner: number): void {
1216                 if(!isWasmInitialized) {
1217                         throw new Error("initializeWasm() must be awaited first!");
1218                 }
1219                 const nativeResponseValue = wasm.TS_CResult_SignatureNoneZ_get_err(owner);
1220                 // debug statements here
1221         }
1222
1223
1224
1225 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1226
1227                 export interface LDKBaseSign {
1228                         get_per_commitment_point (idx: number): Uint8Array;
1229                         release_commitment_secret (idx: number): Uint8Array;
1230                         validate_holder_commitment (holder_tx: number): number;
1231                         channel_keys_id (): Uint8Array;
1232                         sign_counterparty_commitment (commitment_tx: number): number;
1233                         validate_counterparty_revocation (idx: number, secret: Uint8Array): number;
1234                         sign_holder_commitment_and_htlcs (commitment_tx: number): number;
1235                         sign_justice_revoked_output (justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array): number;
1236                         sign_justice_revoked_htlc (justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number;
1237                         sign_counterparty_htlc_transaction (htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number;
1238                         sign_closing_transaction (closing_tx: number): number;
1239                         sign_channel_announcement (msg: number): number;
1240                         ready_channel (channel_parameters: number): void;
1241                 }
1242
1243                 export function LDKBaseSign_new(impl: LDKBaseSign, pubkeys: number): number {
1244             throw new Error('unimplemented'); // TODO: bind to WASM
1245         }
1246
1247 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1248
1249
1250         // LDKPublicKey BaseSign_get_per_commitment_point LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx
1251         export function BaseSign_get_per_commitment_point(this_arg: number, idx: number): Uint8Array {
1252                 if(!isWasmInitialized) {
1253                         throw new Error("initializeWasm() must be awaited first!");
1254                 }
1255                 const nativeResponseValue = wasm.TS_BaseSign_get_per_commitment_point(this_arg, idx);
1256                 return decodeUint8Array(nativeResponseValue);
1257         }
1258         // LDKThirtyTwoBytes BaseSign_release_commitment_secret LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx
1259         export function BaseSign_release_commitment_secret(this_arg: number, idx: number): Uint8Array {
1260                 if(!isWasmInitialized) {
1261                         throw new Error("initializeWasm() must be awaited first!");
1262                 }
1263                 const nativeResponseValue = wasm.TS_BaseSign_release_commitment_secret(this_arg, idx);
1264                 return decodeUint8Array(nativeResponseValue);
1265         }
1266         // LDKCResult_NoneNoneZ BaseSign_validate_holder_commitment LDKBaseSign *NONNULL_PTR this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR holder_tx
1267         export function BaseSign_validate_holder_commitment(this_arg: number, holder_tx: number): number {
1268                 if(!isWasmInitialized) {
1269                         throw new Error("initializeWasm() must be awaited first!");
1270                 }
1271                 const nativeResponseValue = wasm.TS_BaseSign_validate_holder_commitment(this_arg, holder_tx);
1272                 return nativeResponseValue;
1273         }
1274         // LDKThirtyTwoBytes BaseSign_channel_keys_id LDKBaseSign *NONNULL_PTR this_arg
1275         export function BaseSign_channel_keys_id(this_arg: number): Uint8Array {
1276                 if(!isWasmInitialized) {
1277                         throw new Error("initializeWasm() must be awaited first!");
1278                 }
1279                 const nativeResponseValue = wasm.TS_BaseSign_channel_keys_id(this_arg);
1280                 return decodeUint8Array(nativeResponseValue);
1281         }
1282         // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ BaseSign_sign_counterparty_commitment LDKBaseSign *NONNULL_PTR this_arg, const struct LDKCommitmentTransaction *NONNULL_PTR commitment_tx
1283         export function BaseSign_sign_counterparty_commitment(this_arg: number, commitment_tx: number): number {
1284                 if(!isWasmInitialized) {
1285                         throw new Error("initializeWasm() must be awaited first!");
1286                 }
1287                 const nativeResponseValue = wasm.TS_BaseSign_sign_counterparty_commitment(this_arg, commitment_tx);
1288                 return nativeResponseValue;
1289         }
1290         // LDKCResult_NoneNoneZ BaseSign_validate_counterparty_revocation LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx, const uint8_t (*secret)[32]
1291         export function BaseSign_validate_counterparty_revocation(this_arg: number, idx: number, secret: Uint8Array): number {
1292                 if(!isWasmInitialized) {
1293                         throw new Error("initializeWasm() must be awaited first!");
1294                 }
1295                 const nativeResponseValue = wasm.TS_BaseSign_validate_counterparty_revocation(this_arg, idx, encodeUint8Array(secret));
1296                 return nativeResponseValue;
1297         }
1298         // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ BaseSign_sign_holder_commitment_and_htlcs LDKBaseSign *NONNULL_PTR this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR commitment_tx
1299         export function BaseSign_sign_holder_commitment_and_htlcs(this_arg: number, commitment_tx: number): number {
1300                 if(!isWasmInitialized) {
1301                         throw new Error("initializeWasm() must be awaited first!");
1302                 }
1303                 const nativeResponseValue = wasm.TS_BaseSign_sign_holder_commitment_and_htlcs(this_arg, commitment_tx);
1304                 return nativeResponseValue;
1305         }
1306         // LDKCResult_SignatureNoneZ BaseSign_sign_justice_revoked_output LDKBaseSign *NONNULL_PTR this_arg, struct LDKTransaction justice_tx, uintptr_t input, uint64_t amount, const uint8_t (*per_commitment_key)[32]
1307         export function BaseSign_sign_justice_revoked_output(this_arg: number, justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array): number {
1308                 if(!isWasmInitialized) {
1309                         throw new Error("initializeWasm() must be awaited first!");
1310                 }
1311                 const nativeResponseValue = wasm.TS_BaseSign_sign_justice_revoked_output(this_arg, encodeUint8Array(justice_tx), input, amount, encodeUint8Array(per_commitment_key));
1312                 return nativeResponseValue;
1313         }
1314         // LDKCResult_SignatureNoneZ BaseSign_sign_justice_revoked_htlc LDKBaseSign *NONNULL_PTR this_arg, struct LDKTransaction justice_tx, uintptr_t input, uint64_t amount, const uint8_t (*per_commitment_key)[32], const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc
1315         export function BaseSign_sign_justice_revoked_htlc(this_arg: number, justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number {
1316                 if(!isWasmInitialized) {
1317                         throw new Error("initializeWasm() must be awaited first!");
1318                 }
1319                 const nativeResponseValue = wasm.TS_BaseSign_sign_justice_revoked_htlc(this_arg, encodeUint8Array(justice_tx), input, amount, encodeUint8Array(per_commitment_key), htlc);
1320                 return nativeResponseValue;
1321         }
1322         // 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
1323         export function BaseSign_sign_counterparty_htlc_transaction(this_arg: number, htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number {
1324                 if(!isWasmInitialized) {
1325                         throw new Error("initializeWasm() must be awaited first!");
1326                 }
1327                 const nativeResponseValue = wasm.TS_BaseSign_sign_counterparty_htlc_transaction(this_arg, encodeUint8Array(htlc_tx), input, amount, encodeUint8Array(per_commitment_point), htlc);
1328                 return nativeResponseValue;
1329         }
1330         // LDKCResult_SignatureNoneZ BaseSign_sign_closing_transaction LDKBaseSign *NONNULL_PTR this_arg, const struct LDKClosingTransaction *NONNULL_PTR closing_tx
1331         export function BaseSign_sign_closing_transaction(this_arg: number, closing_tx: number): number {
1332                 if(!isWasmInitialized) {
1333                         throw new Error("initializeWasm() must be awaited first!");
1334                 }
1335                 const nativeResponseValue = wasm.TS_BaseSign_sign_closing_transaction(this_arg, closing_tx);
1336                 return nativeResponseValue;
1337         }
1338         // LDKCResult_SignatureNoneZ BaseSign_sign_channel_announcement LDKBaseSign *NONNULL_PTR this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg
1339         export function BaseSign_sign_channel_announcement(this_arg: number, msg: number): number {
1340                 if(!isWasmInitialized) {
1341                         throw new Error("initializeWasm() must be awaited first!");
1342                 }
1343                 const nativeResponseValue = wasm.TS_BaseSign_sign_channel_announcement(this_arg, msg);
1344                 return nativeResponseValue;
1345         }
1346         // void BaseSign_ready_channel LDKBaseSign *NONNULL_PTR this_arg, const struct LDKChannelTransactionParameters *NONNULL_PTR channel_parameters
1347         export function BaseSign_ready_channel(this_arg: number, channel_parameters: number): void {
1348                 if(!isWasmInitialized) {
1349                         throw new Error("initializeWasm() must be awaited first!");
1350                 }
1351                 const nativeResponseValue = wasm.TS_BaseSign_ready_channel(this_arg, channel_parameters);
1352                 // debug statements here
1353         }
1354         // LDKChannelPublicKeys BaseSign_get_pubkeys LDKBaseSign *NONNULL_PTR this_arg
1355         export function BaseSign_get_pubkeys(this_arg: number): number {
1356                 if(!isWasmInitialized) {
1357                         throw new Error("initializeWasm() must be awaited first!");
1358                 }
1359                 const nativeResponseValue = wasm.TS_BaseSign_get_pubkeys(this_arg);
1360                 return nativeResponseValue;
1361         }
1362
1363
1364
1365 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1366
1367                 export interface LDKSign {
1368                         write (): Uint8Array;
1369                 }
1370
1371                 export function LDKSign_new(impl: LDKSign, BaseSign: LDKBaseSign, pubkeys: number): number {
1372             throw new Error('unimplemented'); // TODO: bind to WASM
1373         }
1374
1375 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1376
1377
1378         // LDKCVec_u8Z Sign_write LDKSign *NONNULL_PTR this_arg
1379         export function Sign_write(this_arg: number): Uint8Array {
1380                 if(!isWasmInitialized) {
1381                         throw new Error("initializeWasm() must be awaited first!");
1382                 }
1383                 const nativeResponseValue = wasm.TS_Sign_write(this_arg);
1384                 return decodeUint8Array(nativeResponseValue);
1385         }
1386         // struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelMonitorZ_get_a(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR owner);
1387         export function C2Tuple_BlockHashChannelMonitorZ_get_a(owner: number): Uint8Array {
1388                 if(!isWasmInitialized) {
1389                         throw new Error("initializeWasm() must be awaited first!");
1390                 }
1391                 const nativeResponseValue = wasm.TS_C2Tuple_BlockHashChannelMonitorZ_get_a(owner);
1392                 return decodeUint8Array(nativeResponseValue);
1393         }
1394         // struct LDKChannelMonitor C2Tuple_BlockHashChannelMonitorZ_get_b(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR owner);
1395         export function C2Tuple_BlockHashChannelMonitorZ_get_b(owner: number): number {
1396                 if(!isWasmInitialized) {
1397                         throw new Error("initializeWasm() must be awaited first!");
1398                 }
1399                 const nativeResponseValue = wasm.TS_C2Tuple_BlockHashChannelMonitorZ_get_b(owner);
1400                 return nativeResponseValue;
1401         }
1402         // struct LDKC2Tuple_BlockHashChannelMonitorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR owner);
1403         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(owner: number): number {
1404                 if(!isWasmInitialized) {
1405                         throw new Error("initializeWasm() must be awaited first!");
1406                 }
1407                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(owner);
1408                 return nativeResponseValue;
1409         }
1410         // struct LDKDecodeError CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR owner);
1411         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(owner: number): number {
1412                 if(!isWasmInitialized) {
1413                         throw new Error("initializeWasm() must be awaited first!");
1414                 }
1415                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(owner);
1416                 return nativeResponseValue;
1417         }
1418         // struct LDKRouteHop CResult_RouteHopDecodeErrorZ_get_ok(LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR owner);
1419         export function CResult_RouteHopDecodeErrorZ_get_ok(owner: number): number {
1420                 if(!isWasmInitialized) {
1421                         throw new Error("initializeWasm() must be awaited first!");
1422                 }
1423                 const nativeResponseValue = wasm.TS_CResult_RouteHopDecodeErrorZ_get_ok(owner);
1424                 return nativeResponseValue;
1425         }
1426         // struct LDKDecodeError CResult_RouteHopDecodeErrorZ_get_err(LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR owner);
1427         export function CResult_RouteHopDecodeErrorZ_get_err(owner: number): number {
1428                 if(!isWasmInitialized) {
1429                         throw new Error("initializeWasm() must be awaited first!");
1430                 }
1431                 const nativeResponseValue = wasm.TS_CResult_RouteHopDecodeErrorZ_get_err(owner);
1432                 return nativeResponseValue;
1433         }
1434         // struct LDKRoute CResult_RouteDecodeErrorZ_get_ok(LDKCResult_RouteDecodeErrorZ *NONNULL_PTR owner);
1435         export function CResult_RouteDecodeErrorZ_get_ok(owner: number): number {
1436                 if(!isWasmInitialized) {
1437                         throw new Error("initializeWasm() must be awaited first!");
1438                 }
1439                 const nativeResponseValue = wasm.TS_CResult_RouteDecodeErrorZ_get_ok(owner);
1440                 return nativeResponseValue;
1441         }
1442         // struct LDKDecodeError CResult_RouteDecodeErrorZ_get_err(LDKCResult_RouteDecodeErrorZ *NONNULL_PTR owner);
1443         export function CResult_RouteDecodeErrorZ_get_err(owner: number): number {
1444                 if(!isWasmInitialized) {
1445                         throw new Error("initializeWasm() must be awaited first!");
1446                 }
1447                 const nativeResponseValue = wasm.TS_CResult_RouteDecodeErrorZ_get_err(owner);
1448                 return nativeResponseValue;
1449         }
1450         // struct LDKRouteParameters CResult_RouteParametersDecodeErrorZ_get_ok(LDKCResult_RouteParametersDecodeErrorZ *NONNULL_PTR owner);
1451         export function CResult_RouteParametersDecodeErrorZ_get_ok(owner: number): number {
1452                 if(!isWasmInitialized) {
1453                         throw new Error("initializeWasm() must be awaited first!");
1454                 }
1455                 const nativeResponseValue = wasm.TS_CResult_RouteParametersDecodeErrorZ_get_ok(owner);
1456                 return nativeResponseValue;
1457         }
1458         // struct LDKDecodeError CResult_RouteParametersDecodeErrorZ_get_err(LDKCResult_RouteParametersDecodeErrorZ *NONNULL_PTR owner);
1459         export function CResult_RouteParametersDecodeErrorZ_get_err(owner: number): number {
1460                 if(!isWasmInitialized) {
1461                         throw new Error("initializeWasm() must be awaited first!");
1462                 }
1463                 const nativeResponseValue = wasm.TS_CResult_RouteParametersDecodeErrorZ_get_err(owner);
1464                 return nativeResponseValue;
1465         }
1466         // struct LDKPayee CResult_PayeeDecodeErrorZ_get_ok(LDKCResult_PayeeDecodeErrorZ *NONNULL_PTR owner);
1467         export function CResult_PayeeDecodeErrorZ_get_ok(owner: number): number {
1468                 if(!isWasmInitialized) {
1469                         throw new Error("initializeWasm() must be awaited first!");
1470                 }
1471                 const nativeResponseValue = wasm.TS_CResult_PayeeDecodeErrorZ_get_ok(owner);
1472                 return nativeResponseValue;
1473         }
1474         // struct LDKDecodeError CResult_PayeeDecodeErrorZ_get_err(LDKCResult_PayeeDecodeErrorZ *NONNULL_PTR owner);
1475         export function CResult_PayeeDecodeErrorZ_get_err(owner: number): number {
1476                 if(!isWasmInitialized) {
1477                         throw new Error("initializeWasm() must be awaited first!");
1478                 }
1479                 const nativeResponseValue = wasm.TS_CResult_PayeeDecodeErrorZ_get_err(owner);
1480                 return nativeResponseValue;
1481         }
1482         // struct LDKRouteHint CResult_RouteHintDecodeErrorZ_get_ok(LDKCResult_RouteHintDecodeErrorZ *NONNULL_PTR owner);
1483         export function CResult_RouteHintDecodeErrorZ_get_ok(owner: number): number {
1484                 if(!isWasmInitialized) {
1485                         throw new Error("initializeWasm() must be awaited first!");
1486                 }
1487                 const nativeResponseValue = wasm.TS_CResult_RouteHintDecodeErrorZ_get_ok(owner);
1488                 return nativeResponseValue;
1489         }
1490         // struct LDKDecodeError CResult_RouteHintDecodeErrorZ_get_err(LDKCResult_RouteHintDecodeErrorZ *NONNULL_PTR owner);
1491         export function CResult_RouteHintDecodeErrorZ_get_err(owner: number): number {
1492                 if(!isWasmInitialized) {
1493                         throw new Error("initializeWasm() must be awaited first!");
1494                 }
1495                 const nativeResponseValue = wasm.TS_CResult_RouteHintDecodeErrorZ_get_err(owner);
1496                 return nativeResponseValue;
1497         }
1498         // struct LDKRouteHintHop CResult_RouteHintHopDecodeErrorZ_get_ok(LDKCResult_RouteHintHopDecodeErrorZ *NONNULL_PTR owner);
1499         export function CResult_RouteHintHopDecodeErrorZ_get_ok(owner: number): number {
1500                 if(!isWasmInitialized) {
1501                         throw new Error("initializeWasm() must be awaited first!");
1502                 }
1503                 const nativeResponseValue = wasm.TS_CResult_RouteHintHopDecodeErrorZ_get_ok(owner);
1504                 return nativeResponseValue;
1505         }
1506         // struct LDKDecodeError CResult_RouteHintHopDecodeErrorZ_get_err(LDKCResult_RouteHintHopDecodeErrorZ *NONNULL_PTR owner);
1507         export function CResult_RouteHintHopDecodeErrorZ_get_err(owner: number): number {
1508                 if(!isWasmInitialized) {
1509                         throw new Error("initializeWasm() must be awaited first!");
1510                 }
1511                 const nativeResponseValue = wasm.TS_CResult_RouteHintHopDecodeErrorZ_get_err(owner);
1512                 return nativeResponseValue;
1513         }
1514         // struct LDKRoute CResult_RouteLightningErrorZ_get_ok(LDKCResult_RouteLightningErrorZ *NONNULL_PTR owner);
1515         export function CResult_RouteLightningErrorZ_get_ok(owner: number): number {
1516                 if(!isWasmInitialized) {
1517                         throw new Error("initializeWasm() must be awaited first!");
1518                 }
1519                 const nativeResponseValue = wasm.TS_CResult_RouteLightningErrorZ_get_ok(owner);
1520                 return nativeResponseValue;
1521         }
1522         // struct LDKLightningError CResult_RouteLightningErrorZ_get_err(LDKCResult_RouteLightningErrorZ *NONNULL_PTR owner);
1523         export function CResult_RouteLightningErrorZ_get_err(owner: number): number {
1524                 if(!isWasmInitialized) {
1525                         throw new Error("initializeWasm() must be awaited first!");
1526                 }
1527                 const nativeResponseValue = wasm.TS_CResult_RouteLightningErrorZ_get_err(owner);
1528                 return nativeResponseValue;
1529         }
1530         // void CResult_NoneLightningErrorZ_get_ok(LDKCResult_NoneLightningErrorZ *NONNULL_PTR owner);
1531         export function CResult_NoneLightningErrorZ_get_ok(owner: number): void {
1532                 if(!isWasmInitialized) {
1533                         throw new Error("initializeWasm() must be awaited first!");
1534                 }
1535                 const nativeResponseValue = wasm.TS_CResult_NoneLightningErrorZ_get_ok(owner);
1536                 // debug statements here
1537         }
1538         // struct LDKLightningError CResult_NoneLightningErrorZ_get_err(LDKCResult_NoneLightningErrorZ *NONNULL_PTR owner);
1539         export function CResult_NoneLightningErrorZ_get_err(owner: number): number {
1540                 if(!isWasmInitialized) {
1541                         throw new Error("initializeWasm() must be awaited first!");
1542                 }
1543                 const nativeResponseValue = wasm.TS_CResult_NoneLightningErrorZ_get_err(owner);
1544                 return nativeResponseValue;
1545         }
1546         // struct LDKPublicKey C2Tuple_PublicKeyTypeZ_get_a(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR owner);
1547         export function C2Tuple_PublicKeyTypeZ_get_a(owner: number): Uint8Array {
1548                 if(!isWasmInitialized) {
1549                         throw new Error("initializeWasm() must be awaited first!");
1550                 }
1551                 const nativeResponseValue = wasm.TS_C2Tuple_PublicKeyTypeZ_get_a(owner);
1552                 return decodeUint8Array(nativeResponseValue);
1553         }
1554         // struct LDKType C2Tuple_PublicKeyTypeZ_get_b(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR owner);
1555         export function C2Tuple_PublicKeyTypeZ_get_b(owner: number): number {
1556                 if(!isWasmInitialized) {
1557                         throw new Error("initializeWasm() must be awaited first!");
1558                 }
1559                 const nativeResponseValue = wasm.TS_C2Tuple_PublicKeyTypeZ_get_b(owner);
1560                 return nativeResponseValue;
1561         }
1562         export class LDKErrorAction {
1563                 protected constructor() {}
1564         }
1565         export class LDKErrorAction_DisconnectPeer extends LDKErrorAction {
1566                 constructor(public msg: number) { super(); }
1567         }
1568         export class LDKErrorAction_IgnoreError extends LDKErrorAction {
1569                 constructor() { super(); }
1570         }
1571         export class LDKErrorAction_IgnoreAndLog extends LDKErrorAction {
1572                 constructor(public ignore_and_log: Level) { super(); }
1573         }
1574         export class LDKErrorAction_IgnoreDuplicateGossip extends LDKErrorAction {
1575                 constructor() { super(); }
1576         }
1577         export class LDKErrorAction_SendErrorMessage extends LDKErrorAction {
1578                 constructor(public msg: number) { super(); }
1579         }
1580         export function LDKErrorAction_ref_from_ptr(ptr: number): number {
1581                 if(!isWasmInitialized) {
1582                         throw new Error("initializeWasm() must be awaited first!");
1583                 }
1584                 const nativeResponseValue = wasm.TS_LDKErrorAction_ref_from_ptr(ptr);
1585                 return nativeResponseValue;
1586         }
1587         export class LDKMessageSendEvent {
1588                 protected constructor() {}
1589         }
1590         export class LDKMessageSendEvent_SendAcceptChannel extends LDKMessageSendEvent {
1591                 constructor(public node_id: Uint8Array, public msg: number) { super(); }
1592         }
1593         export class LDKMessageSendEvent_SendOpenChannel extends LDKMessageSendEvent {
1594                 constructor(public node_id: Uint8Array, public msg: number) { super(); }
1595         }
1596         export class LDKMessageSendEvent_SendFundingCreated extends LDKMessageSendEvent {
1597                 constructor(public node_id: Uint8Array, public msg: number) { super(); }
1598         }
1599         export class LDKMessageSendEvent_SendFundingSigned extends LDKMessageSendEvent {
1600                 constructor(public node_id: Uint8Array, public msg: number) { super(); }
1601         }
1602         export class LDKMessageSendEvent_SendFundingLocked extends LDKMessageSendEvent {
1603                 constructor(public node_id: Uint8Array, public msg: number) { super(); }
1604         }
1605         export class LDKMessageSendEvent_SendAnnouncementSignatures extends LDKMessageSendEvent {
1606                 constructor(public node_id: Uint8Array, public msg: number) { super(); }
1607         }
1608         export class LDKMessageSendEvent_UpdateHTLCs extends LDKMessageSendEvent {
1609                 constructor(public node_id: Uint8Array, public updates: number) { super(); }
1610         }
1611         export class LDKMessageSendEvent_SendRevokeAndACK extends LDKMessageSendEvent {
1612                 constructor(public node_id: Uint8Array, public msg: number) { super(); }
1613         }
1614         export class LDKMessageSendEvent_SendClosingSigned extends LDKMessageSendEvent {
1615                 constructor(public node_id: Uint8Array, public msg: number) { super(); }
1616         }
1617         export class LDKMessageSendEvent_SendShutdown extends LDKMessageSendEvent {
1618                 constructor(public node_id: Uint8Array, public msg: number) { super(); }
1619         }
1620         export class LDKMessageSendEvent_SendChannelReestablish extends LDKMessageSendEvent {
1621                 constructor(public node_id: Uint8Array, public msg: number) { super(); }
1622         }
1623         export class LDKMessageSendEvent_BroadcastChannelAnnouncement extends LDKMessageSendEvent {
1624                 constructor(public msg: number, public update_msg: number) { super(); }
1625         }
1626         export class LDKMessageSendEvent_BroadcastNodeAnnouncement extends LDKMessageSendEvent {
1627                 constructor(public msg: number) { super(); }
1628         }
1629         export class LDKMessageSendEvent_BroadcastChannelUpdate extends LDKMessageSendEvent {
1630                 constructor(public msg: number) { super(); }
1631         }
1632         export class LDKMessageSendEvent_SendChannelUpdate extends LDKMessageSendEvent {
1633                 constructor(public node_id: Uint8Array, public msg: number) { super(); }
1634         }
1635         export class LDKMessageSendEvent_HandleError extends LDKMessageSendEvent {
1636                 constructor(public node_id: Uint8Array, public action: number) { super(); }
1637         }
1638         export class LDKMessageSendEvent_SendChannelRangeQuery extends LDKMessageSendEvent {
1639                 constructor(public node_id: Uint8Array, public msg: number) { super(); }
1640         }
1641         export class LDKMessageSendEvent_SendShortIdsQuery extends LDKMessageSendEvent {
1642                 constructor(public node_id: Uint8Array, public msg: number) { super(); }
1643         }
1644         export class LDKMessageSendEvent_SendReplyChannelRange extends LDKMessageSendEvent {
1645                 constructor(public node_id: Uint8Array, public msg: number) { super(); }
1646         }
1647         export function LDKMessageSendEvent_ref_from_ptr(ptr: number): number {
1648                 if(!isWasmInitialized) {
1649                         throw new Error("initializeWasm() must be awaited first!");
1650                 }
1651                 const nativeResponseValue = wasm.TS_LDKMessageSendEvent_ref_from_ptr(ptr);
1652                 return nativeResponseValue;
1653         }
1654         // bool CResult_boolLightningErrorZ_get_ok(LDKCResult_boolLightningErrorZ *NONNULL_PTR owner);
1655         export function CResult_boolLightningErrorZ_get_ok(owner: number): boolean {
1656                 if(!isWasmInitialized) {
1657                         throw new Error("initializeWasm() must be awaited first!");
1658                 }
1659                 const nativeResponseValue = wasm.TS_CResult_boolLightningErrorZ_get_ok(owner);
1660                 return nativeResponseValue;
1661         }
1662         // struct LDKLightningError CResult_boolLightningErrorZ_get_err(LDKCResult_boolLightningErrorZ *NONNULL_PTR owner);
1663         export function CResult_boolLightningErrorZ_get_err(owner: number): number {
1664                 if(!isWasmInitialized) {
1665                         throw new Error("initializeWasm() must be awaited first!");
1666                 }
1667                 const nativeResponseValue = wasm.TS_CResult_boolLightningErrorZ_get_err(owner);
1668                 return nativeResponseValue;
1669         }
1670         // struct LDKChannelAnnouncement C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR owner);
1671         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(owner: number): number {
1672                 if(!isWasmInitialized) {
1673                         throw new Error("initializeWasm() must be awaited first!");
1674                 }
1675                 const nativeResponseValue = wasm.TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(owner);
1676                 return nativeResponseValue;
1677         }
1678         // struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR owner);
1679         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(owner: number): number {
1680                 if(!isWasmInitialized) {
1681                         throw new Error("initializeWasm() must be awaited first!");
1682                 }
1683                 const nativeResponseValue = wasm.TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(owner);
1684                 return nativeResponseValue;
1685         }
1686         // struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR owner);
1687         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(owner: number): number {
1688                 if(!isWasmInitialized) {
1689                         throw new Error("initializeWasm() must be awaited first!");
1690                 }
1691                 const nativeResponseValue = wasm.TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(owner);
1692                 return nativeResponseValue;
1693         }
1694         // struct LDKCVec_u8Z CResult_CVec_u8ZPeerHandleErrorZ_get_ok(LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR owner);
1695         export function CResult_CVec_u8ZPeerHandleErrorZ_get_ok(owner: number): Uint8Array {
1696                 if(!isWasmInitialized) {
1697                         throw new Error("initializeWasm() must be awaited first!");
1698                 }
1699                 const nativeResponseValue = wasm.TS_CResult_CVec_u8ZPeerHandleErrorZ_get_ok(owner);
1700                 return decodeUint8Array(nativeResponseValue);
1701         }
1702         // struct LDKPeerHandleError CResult_CVec_u8ZPeerHandleErrorZ_get_err(LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR owner);
1703         export function CResult_CVec_u8ZPeerHandleErrorZ_get_err(owner: number): number {
1704                 if(!isWasmInitialized) {
1705                         throw new Error("initializeWasm() must be awaited first!");
1706                 }
1707                 const nativeResponseValue = wasm.TS_CResult_CVec_u8ZPeerHandleErrorZ_get_err(owner);
1708                 return nativeResponseValue;
1709         }
1710         // void CResult_NonePeerHandleErrorZ_get_ok(LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR owner);
1711         export function CResult_NonePeerHandleErrorZ_get_ok(owner: number): void {
1712                 if(!isWasmInitialized) {
1713                         throw new Error("initializeWasm() must be awaited first!");
1714                 }
1715                 const nativeResponseValue = wasm.TS_CResult_NonePeerHandleErrorZ_get_ok(owner);
1716                 // debug statements here
1717         }
1718         // struct LDKPeerHandleError CResult_NonePeerHandleErrorZ_get_err(LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR owner);
1719         export function CResult_NonePeerHandleErrorZ_get_err(owner: number): number {
1720                 if(!isWasmInitialized) {
1721                         throw new Error("initializeWasm() must be awaited first!");
1722                 }
1723                 const nativeResponseValue = wasm.TS_CResult_NonePeerHandleErrorZ_get_err(owner);
1724                 return nativeResponseValue;
1725         }
1726         // bool CResult_boolPeerHandleErrorZ_get_ok(LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR owner);
1727         export function CResult_boolPeerHandleErrorZ_get_ok(owner: number): boolean {
1728                 if(!isWasmInitialized) {
1729                         throw new Error("initializeWasm() must be awaited first!");
1730                 }
1731                 const nativeResponseValue = wasm.TS_CResult_boolPeerHandleErrorZ_get_ok(owner);
1732                 return nativeResponseValue;
1733         }
1734         // struct LDKPeerHandleError CResult_boolPeerHandleErrorZ_get_err(LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR owner);
1735         export function CResult_boolPeerHandleErrorZ_get_err(owner: number): number {
1736                 if(!isWasmInitialized) {
1737                         throw new Error("initializeWasm() must be awaited first!");
1738                 }
1739                 const nativeResponseValue = wasm.TS_CResult_boolPeerHandleErrorZ_get_err(owner);
1740                 return nativeResponseValue;
1741         }
1742         // struct LDKTxOut CResult_TxOutAccessErrorZ_get_ok(LDKCResult_TxOutAccessErrorZ *NONNULL_PTR owner);
1743         export function CResult_TxOutAccessErrorZ_get_ok(owner: number): number {
1744                 if(!isWasmInitialized) {
1745                         throw new Error("initializeWasm() must be awaited first!");
1746                 }
1747                 const nativeResponseValue = wasm.TS_CResult_TxOutAccessErrorZ_get_ok(owner);
1748                 return nativeResponseValue;
1749         }
1750         // enum LDKAccessError CResult_TxOutAccessErrorZ_get_err(LDKCResult_TxOutAccessErrorZ *NONNULL_PTR owner);
1751         export function CResult_TxOutAccessErrorZ_get_err(owner: number): AccessError {
1752                 if(!isWasmInitialized) {
1753                         throw new Error("initializeWasm() must be awaited first!");
1754                 }
1755                 const nativeResponseValue = wasm.TS_CResult_TxOutAccessErrorZ_get_err(owner);
1756                 return nativeResponseValue;
1757         }
1758         // void CResult_NoneChannelMonitorUpdateErrZ_get_ok(LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR owner);
1759         export function CResult_NoneChannelMonitorUpdateErrZ_get_ok(owner: number): void {
1760                 if(!isWasmInitialized) {
1761                         throw new Error("initializeWasm() must be awaited first!");
1762                 }
1763                 const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_get_ok(owner);
1764                 // debug statements here
1765         }
1766         // enum LDKChannelMonitorUpdateErr CResult_NoneChannelMonitorUpdateErrZ_get_err(LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR owner);
1767         export function CResult_NoneChannelMonitorUpdateErrZ_get_err(owner: number): ChannelMonitorUpdateErr {
1768                 if(!isWasmInitialized) {
1769                         throw new Error("initializeWasm() must be awaited first!");
1770                 }
1771                 const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_get_err(owner);
1772                 return nativeResponseValue;
1773         }
1774         export class LDKCOption_C2Tuple_usizeTransactionZZ {
1775                 protected constructor() {}
1776         }
1777         export class LDKCOption_C2Tuple_usizeTransactionZZ_Some extends LDKCOption_C2Tuple_usizeTransactionZZ {
1778                 constructor(public some: number) { super(); }
1779         }
1780         export class LDKCOption_C2Tuple_usizeTransactionZZ_None extends LDKCOption_C2Tuple_usizeTransactionZZ {
1781                 constructor() { super(); }
1782         }
1783         export function LDKCOption_C2Tuple_usizeTransactionZZ_ref_from_ptr(ptr: number): number {
1784                 if(!isWasmInitialized) {
1785                         throw new Error("initializeWasm() must be awaited first!");
1786                 }
1787                 const nativeResponseValue = wasm.TS_LDKCOption_C2Tuple_usizeTransactionZZ_ref_from_ptr(ptr);
1788                 return nativeResponseValue;
1789         }
1790         export class LDKCOption_ClosureReasonZ {
1791                 protected constructor() {}
1792         }
1793         export class LDKCOption_ClosureReasonZ_Some extends LDKCOption_ClosureReasonZ {
1794                 constructor(public some: number) { super(); }
1795         }
1796         export class LDKCOption_ClosureReasonZ_None extends LDKCOption_ClosureReasonZ {
1797                 constructor() { super(); }
1798         }
1799         export function LDKCOption_ClosureReasonZ_ref_from_ptr(ptr: number): number {
1800                 if(!isWasmInitialized) {
1801                         throw new Error("initializeWasm() must be awaited first!");
1802                 }
1803                 const nativeResponseValue = wasm.TS_LDKCOption_ClosureReasonZ_ref_from_ptr(ptr);
1804                 return nativeResponseValue;
1805         }
1806         // struct LDKCOption_ClosureReasonZ CResult_COption_ClosureReasonZDecodeErrorZ_get_ok(LDKCResult_COption_ClosureReasonZDecodeErrorZ *NONNULL_PTR owner);
1807         export function CResult_COption_ClosureReasonZDecodeErrorZ_get_ok(owner: number): number {
1808                 if(!isWasmInitialized) {
1809                         throw new Error("initializeWasm() must be awaited first!");
1810                 }
1811                 const nativeResponseValue = wasm.TS_CResult_COption_ClosureReasonZDecodeErrorZ_get_ok(owner);
1812                 return nativeResponseValue;
1813         }
1814         // struct LDKDecodeError CResult_COption_ClosureReasonZDecodeErrorZ_get_err(LDKCResult_COption_ClosureReasonZDecodeErrorZ *NONNULL_PTR owner);
1815         export function CResult_COption_ClosureReasonZDecodeErrorZ_get_err(owner: number): number {
1816                 if(!isWasmInitialized) {
1817                         throw new Error("initializeWasm() must be awaited first!");
1818                 }
1819                 const nativeResponseValue = wasm.TS_CResult_COption_ClosureReasonZDecodeErrorZ_get_err(owner);
1820                 return nativeResponseValue;
1821         }
1822         export class LDKCOption_EventZ {
1823                 protected constructor() {}
1824         }
1825         export class LDKCOption_EventZ_Some extends LDKCOption_EventZ {
1826                 constructor(public some: number) { super(); }
1827         }
1828         export class LDKCOption_EventZ_None extends LDKCOption_EventZ {
1829                 constructor() { super(); }
1830         }
1831         export function LDKCOption_EventZ_ref_from_ptr(ptr: number): number {
1832                 if(!isWasmInitialized) {
1833                         throw new Error("initializeWasm() must be awaited first!");
1834                 }
1835                 const nativeResponseValue = wasm.TS_LDKCOption_EventZ_ref_from_ptr(ptr);
1836                 return nativeResponseValue;
1837         }
1838         // struct LDKCOption_EventZ CResult_COption_EventZDecodeErrorZ_get_ok(LDKCResult_COption_EventZDecodeErrorZ *NONNULL_PTR owner);
1839         export function CResult_COption_EventZDecodeErrorZ_get_ok(owner: number): number {
1840                 if(!isWasmInitialized) {
1841                         throw new Error("initializeWasm() must be awaited first!");
1842                 }
1843                 const nativeResponseValue = wasm.TS_CResult_COption_EventZDecodeErrorZ_get_ok(owner);
1844                 return nativeResponseValue;
1845         }
1846         // struct LDKDecodeError CResult_COption_EventZDecodeErrorZ_get_err(LDKCResult_COption_EventZDecodeErrorZ *NONNULL_PTR owner);
1847         export function CResult_COption_EventZDecodeErrorZ_get_err(owner: number): number {
1848                 if(!isWasmInitialized) {
1849                         throw new Error("initializeWasm() must be awaited first!");
1850                 }
1851                 const nativeResponseValue = wasm.TS_CResult_COption_EventZDecodeErrorZ_get_err(owner);
1852                 return nativeResponseValue;
1853         }
1854         // struct LDKNodeId CResult_NodeIdDecodeErrorZ_get_ok(LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR owner);
1855         export function CResult_NodeIdDecodeErrorZ_get_ok(owner: number): number {
1856                 if(!isWasmInitialized) {
1857                         throw new Error("initializeWasm() must be awaited first!");
1858                 }
1859                 const nativeResponseValue = wasm.TS_CResult_NodeIdDecodeErrorZ_get_ok(owner);
1860                 return nativeResponseValue;
1861         }
1862         // struct LDKDecodeError CResult_NodeIdDecodeErrorZ_get_err(LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR owner);
1863         export function CResult_NodeIdDecodeErrorZ_get_err(owner: number): number {
1864                 if(!isWasmInitialized) {
1865                         throw new Error("initializeWasm() must be awaited first!");
1866                 }
1867                 const nativeResponseValue = wasm.TS_CResult_NodeIdDecodeErrorZ_get_err(owner);
1868                 return nativeResponseValue;
1869         }
1870         // struct LDKCOption_NetworkUpdateZ CResult_COption_NetworkUpdateZDecodeErrorZ_get_ok(LDKCResult_COption_NetworkUpdateZDecodeErrorZ *NONNULL_PTR owner);
1871         export function CResult_COption_NetworkUpdateZDecodeErrorZ_get_ok(owner: number): number {
1872                 if(!isWasmInitialized) {
1873                         throw new Error("initializeWasm() must be awaited first!");
1874                 }
1875                 const nativeResponseValue = wasm.TS_CResult_COption_NetworkUpdateZDecodeErrorZ_get_ok(owner);
1876                 return nativeResponseValue;
1877         }
1878         // struct LDKDecodeError CResult_COption_NetworkUpdateZDecodeErrorZ_get_err(LDKCResult_COption_NetworkUpdateZDecodeErrorZ *NONNULL_PTR owner);
1879         export function CResult_COption_NetworkUpdateZDecodeErrorZ_get_err(owner: number): number {
1880                 if(!isWasmInitialized) {
1881                         throw new Error("initializeWasm() must be awaited first!");
1882                 }
1883                 const nativeResponseValue = wasm.TS_CResult_COption_NetworkUpdateZDecodeErrorZ_get_err(owner);
1884                 return nativeResponseValue;
1885         }
1886
1887
1888
1889 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1890
1891                 export interface LDKAccess {
1892                         get_utxo (genesis_hash: Uint8Array, short_channel_id: number): number;
1893                 }
1894
1895                 export function LDKAccess_new(impl: LDKAccess): number {
1896             throw new Error('unimplemented'); // TODO: bind to WASM
1897         }
1898
1899 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1900
1901
1902         // LDKCResult_TxOutAccessErrorZ Access_get_utxo LDKAccess *NONNULL_PTR this_arg, const uint8_t (*genesis_hash)[32], uint64_t short_channel_id
1903         export function Access_get_utxo(this_arg: number, genesis_hash: Uint8Array, short_channel_id: number): number {
1904                 if(!isWasmInitialized) {
1905                         throw new Error("initializeWasm() must be awaited first!");
1906                 }
1907                 const nativeResponseValue = wasm.TS_Access_get_utxo(this_arg, encodeUint8Array(genesis_hash), short_channel_id);
1908                 return nativeResponseValue;
1909         }
1910         export class LDKCOption_AccessZ {
1911                 protected constructor() {}
1912         }
1913         export class LDKCOption_AccessZ_Some extends LDKCOption_AccessZ {
1914                 constructor(public some: number) { super(); }
1915         }
1916         export class LDKCOption_AccessZ_None extends LDKCOption_AccessZ {
1917                 constructor() { super(); }
1918         }
1919         export function LDKCOption_AccessZ_ref_from_ptr(ptr: number): number {
1920                 if(!isWasmInitialized) {
1921                         throw new Error("initializeWasm() must be awaited first!");
1922                 }
1923                 const nativeResponseValue = wasm.TS_LDKCOption_AccessZ_ref_from_ptr(ptr);
1924                 return nativeResponseValue;
1925         }
1926         // struct LDKDirectionalChannelInfo CResult_DirectionalChannelInfoDecodeErrorZ_get_ok(LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR owner);
1927         export function CResult_DirectionalChannelInfoDecodeErrorZ_get_ok(owner: number): number {
1928                 if(!isWasmInitialized) {
1929                         throw new Error("initializeWasm() must be awaited first!");
1930                 }
1931                 const nativeResponseValue = wasm.TS_CResult_DirectionalChannelInfoDecodeErrorZ_get_ok(owner);
1932                 return nativeResponseValue;
1933         }
1934         // struct LDKDecodeError CResult_DirectionalChannelInfoDecodeErrorZ_get_err(LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR owner);
1935         export function CResult_DirectionalChannelInfoDecodeErrorZ_get_err(owner: number): number {
1936                 if(!isWasmInitialized) {
1937                         throw new Error("initializeWasm() must be awaited first!");
1938                 }
1939                 const nativeResponseValue = wasm.TS_CResult_DirectionalChannelInfoDecodeErrorZ_get_err(owner);
1940                 return nativeResponseValue;
1941         }
1942         // struct LDKChannelInfo CResult_ChannelInfoDecodeErrorZ_get_ok(LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR owner);
1943         export function CResult_ChannelInfoDecodeErrorZ_get_ok(owner: number): number {
1944                 if(!isWasmInitialized) {
1945                         throw new Error("initializeWasm() must be awaited first!");
1946                 }
1947                 const nativeResponseValue = wasm.TS_CResult_ChannelInfoDecodeErrorZ_get_ok(owner);
1948                 return nativeResponseValue;
1949         }
1950         // struct LDKDecodeError CResult_ChannelInfoDecodeErrorZ_get_err(LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR owner);
1951         export function CResult_ChannelInfoDecodeErrorZ_get_err(owner: number): number {
1952                 if(!isWasmInitialized) {
1953                         throw new Error("initializeWasm() must be awaited first!");
1954                 }
1955                 const nativeResponseValue = wasm.TS_CResult_ChannelInfoDecodeErrorZ_get_err(owner);
1956                 return nativeResponseValue;
1957         }
1958         // struct LDKRoutingFees CResult_RoutingFeesDecodeErrorZ_get_ok(LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR owner);
1959         export function CResult_RoutingFeesDecodeErrorZ_get_ok(owner: number): number {
1960                 if(!isWasmInitialized) {
1961                         throw new Error("initializeWasm() must be awaited first!");
1962                 }
1963                 const nativeResponseValue = wasm.TS_CResult_RoutingFeesDecodeErrorZ_get_ok(owner);
1964                 return nativeResponseValue;
1965         }
1966         // struct LDKDecodeError CResult_RoutingFeesDecodeErrorZ_get_err(LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR owner);
1967         export function CResult_RoutingFeesDecodeErrorZ_get_err(owner: number): number {
1968                 if(!isWasmInitialized) {
1969                         throw new Error("initializeWasm() must be awaited first!");
1970                 }
1971                 const nativeResponseValue = wasm.TS_CResult_RoutingFeesDecodeErrorZ_get_err(owner);
1972                 return nativeResponseValue;
1973         }
1974         export class LDKNetAddress {
1975                 protected constructor() {}
1976         }
1977         export class LDKNetAddress_IPv4 extends LDKNetAddress {
1978                 constructor(public addr: Uint8Array, public port: number) { super(); }
1979         }
1980         export class LDKNetAddress_IPv6 extends LDKNetAddress {
1981                 constructor(public addr: Uint8Array, public port: number) { super(); }
1982         }
1983         export class LDKNetAddress_OnionV2 extends LDKNetAddress {
1984                 constructor(public onion_v2: Uint8Array) { super(); }
1985         }
1986         export class LDKNetAddress_OnionV3 extends LDKNetAddress {
1987                 constructor(public ed25519_pubkey: Uint8Array, public checksum: number, public version: number, public port: number) { super(); }
1988         }
1989         export function LDKNetAddress_ref_from_ptr(ptr: number): number {
1990                 if(!isWasmInitialized) {
1991                         throw new Error("initializeWasm() must be awaited first!");
1992                 }
1993                 const nativeResponseValue = wasm.TS_LDKNetAddress_ref_from_ptr(ptr);
1994                 return nativeResponseValue;
1995         }
1996         // struct LDKNodeAnnouncementInfo CResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR owner);
1997         export function CResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(owner: number): number {
1998                 if(!isWasmInitialized) {
1999                         throw new Error("initializeWasm() must be awaited first!");
2000                 }
2001                 const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(owner);
2002                 return nativeResponseValue;
2003         }
2004         // struct LDKDecodeError CResult_NodeAnnouncementInfoDecodeErrorZ_get_err(LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR owner);
2005         export function CResult_NodeAnnouncementInfoDecodeErrorZ_get_err(owner: number): number {
2006                 if(!isWasmInitialized) {
2007                         throw new Error("initializeWasm() must be awaited first!");
2008                 }
2009                 const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementInfoDecodeErrorZ_get_err(owner);
2010                 return nativeResponseValue;
2011         }
2012         // struct LDKNodeInfo CResult_NodeInfoDecodeErrorZ_get_ok(LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR owner);
2013         export function CResult_NodeInfoDecodeErrorZ_get_ok(owner: number): number {
2014                 if(!isWasmInitialized) {
2015                         throw new Error("initializeWasm() must be awaited first!");
2016                 }
2017                 const nativeResponseValue = wasm.TS_CResult_NodeInfoDecodeErrorZ_get_ok(owner);
2018                 return nativeResponseValue;
2019         }
2020         // struct LDKDecodeError CResult_NodeInfoDecodeErrorZ_get_err(LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR owner);
2021         export function CResult_NodeInfoDecodeErrorZ_get_err(owner: number): number {
2022                 if(!isWasmInitialized) {
2023                         throw new Error("initializeWasm() must be awaited first!");
2024                 }
2025                 const nativeResponseValue = wasm.TS_CResult_NodeInfoDecodeErrorZ_get_err(owner);
2026                 return nativeResponseValue;
2027         }
2028         // struct LDKNetworkGraph CResult_NetworkGraphDecodeErrorZ_get_ok(LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR owner);
2029         export function CResult_NetworkGraphDecodeErrorZ_get_ok(owner: number): number {
2030                 if(!isWasmInitialized) {
2031                         throw new Error("initializeWasm() must be awaited first!");
2032                 }
2033                 const nativeResponseValue = wasm.TS_CResult_NetworkGraphDecodeErrorZ_get_ok(owner);
2034                 return nativeResponseValue;
2035         }
2036         // struct LDKDecodeError CResult_NetworkGraphDecodeErrorZ_get_err(LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR owner);
2037         export function CResult_NetworkGraphDecodeErrorZ_get_err(owner: number): number {
2038                 if(!isWasmInitialized) {
2039                         throw new Error("initializeWasm() must be awaited first!");
2040                 }
2041                 const nativeResponseValue = wasm.TS_CResult_NetworkGraphDecodeErrorZ_get_err(owner);
2042                 return nativeResponseValue;
2043         }
2044         export class LDKCOption_CVec_NetAddressZZ {
2045                 protected constructor() {}
2046         }
2047         export class LDKCOption_CVec_NetAddressZZ_Some extends LDKCOption_CVec_NetAddressZZ {
2048                 constructor(public some: number[]) { super(); }
2049         }
2050         export class LDKCOption_CVec_NetAddressZZ_None extends LDKCOption_CVec_NetAddressZZ {
2051                 constructor() { super(); }
2052         }
2053         export function LDKCOption_CVec_NetAddressZZ_ref_from_ptr(ptr: number): number {
2054                 if(!isWasmInitialized) {
2055                         throw new Error("initializeWasm() must be awaited first!");
2056                 }
2057                 const nativeResponseValue = wasm.TS_LDKCOption_CVec_NetAddressZZ_ref_from_ptr(ptr);
2058                 return nativeResponseValue;
2059         }
2060         // struct LDKScoringParameters *CResult_ScoringParametersDecodeErrorZ_get_ok(LDKCResult_ScoringParametersDecodeErrorZ *NONNULL_PTR owner);
2061         export function CResult_ScoringParametersDecodeErrorZ_get_ok(owner: number): number {
2062                 if(!isWasmInitialized) {
2063                         throw new Error("initializeWasm() must be awaited first!");
2064                 }
2065                 const nativeResponseValue = wasm.TS_CResult_ScoringParametersDecodeErrorZ_get_ok(owner);
2066                 return nativeResponseValue;
2067         }
2068         // struct LDKDecodeError CResult_ScoringParametersDecodeErrorZ_get_err(LDKCResult_ScoringParametersDecodeErrorZ *NONNULL_PTR owner);
2069         export function CResult_ScoringParametersDecodeErrorZ_get_err(owner: number): number {
2070                 if(!isWasmInitialized) {
2071                         throw new Error("initializeWasm() must be awaited first!");
2072                 }
2073                 const nativeResponseValue = wasm.TS_CResult_ScoringParametersDecodeErrorZ_get_err(owner);
2074                 return nativeResponseValue;
2075         }
2076         // struct LDKInitFeatures CResult_InitFeaturesDecodeErrorZ_get_ok(LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR owner);
2077         export function CResult_InitFeaturesDecodeErrorZ_get_ok(owner: number): number {
2078                 if(!isWasmInitialized) {
2079                         throw new Error("initializeWasm() must be awaited first!");
2080                 }
2081                 const nativeResponseValue = wasm.TS_CResult_InitFeaturesDecodeErrorZ_get_ok(owner);
2082                 return nativeResponseValue;
2083         }
2084         // struct LDKDecodeError CResult_InitFeaturesDecodeErrorZ_get_err(LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR owner);
2085         export function CResult_InitFeaturesDecodeErrorZ_get_err(owner: number): number {
2086                 if(!isWasmInitialized) {
2087                         throw new Error("initializeWasm() must be awaited first!");
2088                 }
2089                 const nativeResponseValue = wasm.TS_CResult_InitFeaturesDecodeErrorZ_get_err(owner);
2090                 return nativeResponseValue;
2091         }
2092         // struct LDKChannelFeatures CResult_ChannelFeaturesDecodeErrorZ_get_ok(LDKCResult_ChannelFeaturesDecodeErrorZ *NONNULL_PTR owner);
2093         export function CResult_ChannelFeaturesDecodeErrorZ_get_ok(owner: number): number {
2094                 if(!isWasmInitialized) {
2095                         throw new Error("initializeWasm() must be awaited first!");
2096                 }
2097                 const nativeResponseValue = wasm.TS_CResult_ChannelFeaturesDecodeErrorZ_get_ok(owner);
2098                 return nativeResponseValue;
2099         }
2100         // struct LDKDecodeError CResult_ChannelFeaturesDecodeErrorZ_get_err(LDKCResult_ChannelFeaturesDecodeErrorZ *NONNULL_PTR owner);
2101         export function CResult_ChannelFeaturesDecodeErrorZ_get_err(owner: number): number {
2102                 if(!isWasmInitialized) {
2103                         throw new Error("initializeWasm() must be awaited first!");
2104                 }
2105                 const nativeResponseValue = wasm.TS_CResult_ChannelFeaturesDecodeErrorZ_get_err(owner);
2106                 return nativeResponseValue;
2107         }
2108         // struct LDKNodeFeatures CResult_NodeFeaturesDecodeErrorZ_get_ok(LDKCResult_NodeFeaturesDecodeErrorZ *NONNULL_PTR owner);
2109         export function CResult_NodeFeaturesDecodeErrorZ_get_ok(owner: number): number {
2110                 if(!isWasmInitialized) {
2111                         throw new Error("initializeWasm() must be awaited first!");
2112                 }
2113                 const nativeResponseValue = wasm.TS_CResult_NodeFeaturesDecodeErrorZ_get_ok(owner);
2114                 return nativeResponseValue;
2115         }
2116         // struct LDKDecodeError CResult_NodeFeaturesDecodeErrorZ_get_err(LDKCResult_NodeFeaturesDecodeErrorZ *NONNULL_PTR owner);
2117         export function CResult_NodeFeaturesDecodeErrorZ_get_err(owner: number): number {
2118                 if(!isWasmInitialized) {
2119                         throw new Error("initializeWasm() must be awaited first!");
2120                 }
2121                 const nativeResponseValue = wasm.TS_CResult_NodeFeaturesDecodeErrorZ_get_err(owner);
2122                 return nativeResponseValue;
2123         }
2124         // struct LDKInvoiceFeatures CResult_InvoiceFeaturesDecodeErrorZ_get_ok(LDKCResult_InvoiceFeaturesDecodeErrorZ *NONNULL_PTR owner);
2125         export function CResult_InvoiceFeaturesDecodeErrorZ_get_ok(owner: number): number {
2126                 if(!isWasmInitialized) {
2127                         throw new Error("initializeWasm() must be awaited first!");
2128                 }
2129                 const nativeResponseValue = wasm.TS_CResult_InvoiceFeaturesDecodeErrorZ_get_ok(owner);
2130                 return nativeResponseValue;
2131         }
2132         // struct LDKDecodeError CResult_InvoiceFeaturesDecodeErrorZ_get_err(LDKCResult_InvoiceFeaturesDecodeErrorZ *NONNULL_PTR owner);
2133         export function CResult_InvoiceFeaturesDecodeErrorZ_get_err(owner: number): number {
2134                 if(!isWasmInitialized) {
2135                         throw new Error("initializeWasm() must be awaited first!");
2136                 }
2137                 const nativeResponseValue = wasm.TS_CResult_InvoiceFeaturesDecodeErrorZ_get_err(owner);
2138                 return nativeResponseValue;
2139         }
2140         // struct LDKChannelTypeFeatures CResult_ChannelTypeFeaturesDecodeErrorZ_get_ok(LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR owner);
2141         export function CResult_ChannelTypeFeaturesDecodeErrorZ_get_ok(owner: number): number {
2142                 if(!isWasmInitialized) {
2143                         throw new Error("initializeWasm() must be awaited first!");
2144                 }
2145                 const nativeResponseValue = wasm.TS_CResult_ChannelTypeFeaturesDecodeErrorZ_get_ok(owner);
2146                 return nativeResponseValue;
2147         }
2148         // struct LDKDecodeError CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR owner);
2149         export function CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(owner: number): number {
2150                 if(!isWasmInitialized) {
2151                         throw new Error("initializeWasm() must be awaited first!");
2152                 }
2153                 const nativeResponseValue = wasm.TS_CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(owner);
2154                 return nativeResponseValue;
2155         }
2156         // struct LDKNetAddress CResult_NetAddressDecodeErrorZ_get_ok(LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR owner);
2157         export function CResult_NetAddressDecodeErrorZ_get_ok(owner: number): number {
2158                 if(!isWasmInitialized) {
2159                         throw new Error("initializeWasm() must be awaited first!");
2160                 }
2161                 const nativeResponseValue = wasm.TS_CResult_NetAddressDecodeErrorZ_get_ok(owner);
2162                 return nativeResponseValue;
2163         }
2164         // struct LDKDecodeError CResult_NetAddressDecodeErrorZ_get_err(LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR owner);
2165         export function CResult_NetAddressDecodeErrorZ_get_err(owner: number): number {
2166                 if(!isWasmInitialized) {
2167                         throw new Error("initializeWasm() must be awaited first!");
2168                 }
2169                 const nativeResponseValue = wasm.TS_CResult_NetAddressDecodeErrorZ_get_err(owner);
2170                 return nativeResponseValue;
2171         }
2172         // struct LDKAcceptChannel CResult_AcceptChannelDecodeErrorZ_get_ok(LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR owner);
2173         export function CResult_AcceptChannelDecodeErrorZ_get_ok(owner: number): number {
2174                 if(!isWasmInitialized) {
2175                         throw new Error("initializeWasm() must be awaited first!");
2176                 }
2177                 const nativeResponseValue = wasm.TS_CResult_AcceptChannelDecodeErrorZ_get_ok(owner);
2178                 return nativeResponseValue;
2179         }
2180         // struct LDKDecodeError CResult_AcceptChannelDecodeErrorZ_get_err(LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR owner);
2181         export function CResult_AcceptChannelDecodeErrorZ_get_err(owner: number): number {
2182                 if(!isWasmInitialized) {
2183                         throw new Error("initializeWasm() must be awaited first!");
2184                 }
2185                 const nativeResponseValue = wasm.TS_CResult_AcceptChannelDecodeErrorZ_get_err(owner);
2186                 return nativeResponseValue;
2187         }
2188         // struct LDKAnnouncementSignatures CResult_AnnouncementSignaturesDecodeErrorZ_get_ok(LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR owner);
2189         export function CResult_AnnouncementSignaturesDecodeErrorZ_get_ok(owner: number): number {
2190                 if(!isWasmInitialized) {
2191                         throw new Error("initializeWasm() must be awaited first!");
2192                 }
2193                 const nativeResponseValue = wasm.TS_CResult_AnnouncementSignaturesDecodeErrorZ_get_ok(owner);
2194                 return nativeResponseValue;
2195         }
2196         // struct LDKDecodeError CResult_AnnouncementSignaturesDecodeErrorZ_get_err(LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR owner);
2197         export function CResult_AnnouncementSignaturesDecodeErrorZ_get_err(owner: number): number {
2198                 if(!isWasmInitialized) {
2199                         throw new Error("initializeWasm() must be awaited first!");
2200                 }
2201                 const nativeResponseValue = wasm.TS_CResult_AnnouncementSignaturesDecodeErrorZ_get_err(owner);
2202                 return nativeResponseValue;
2203         }
2204         // struct LDKChannelReestablish CResult_ChannelReestablishDecodeErrorZ_get_ok(LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR owner);
2205         export function CResult_ChannelReestablishDecodeErrorZ_get_ok(owner: number): number {
2206                 if(!isWasmInitialized) {
2207                         throw new Error("initializeWasm() must be awaited first!");
2208                 }
2209                 const nativeResponseValue = wasm.TS_CResult_ChannelReestablishDecodeErrorZ_get_ok(owner);
2210                 return nativeResponseValue;
2211         }
2212         // struct LDKDecodeError CResult_ChannelReestablishDecodeErrorZ_get_err(LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR owner);
2213         export function CResult_ChannelReestablishDecodeErrorZ_get_err(owner: number): number {
2214                 if(!isWasmInitialized) {
2215                         throw new Error("initializeWasm() must be awaited first!");
2216                 }
2217                 const nativeResponseValue = wasm.TS_CResult_ChannelReestablishDecodeErrorZ_get_err(owner);
2218                 return nativeResponseValue;
2219         }
2220         // struct LDKClosingSigned CResult_ClosingSignedDecodeErrorZ_get_ok(LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR owner);
2221         export function CResult_ClosingSignedDecodeErrorZ_get_ok(owner: number): number {
2222                 if(!isWasmInitialized) {
2223                         throw new Error("initializeWasm() must be awaited first!");
2224                 }
2225                 const nativeResponseValue = wasm.TS_CResult_ClosingSignedDecodeErrorZ_get_ok(owner);
2226                 return nativeResponseValue;
2227         }
2228         // struct LDKDecodeError CResult_ClosingSignedDecodeErrorZ_get_err(LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR owner);
2229         export function CResult_ClosingSignedDecodeErrorZ_get_err(owner: number): number {
2230                 if(!isWasmInitialized) {
2231                         throw new Error("initializeWasm() must be awaited first!");
2232                 }
2233                 const nativeResponseValue = wasm.TS_CResult_ClosingSignedDecodeErrorZ_get_err(owner);
2234                 return nativeResponseValue;
2235         }
2236         // struct LDKClosingSignedFeeRange CResult_ClosingSignedFeeRangeDecodeErrorZ_get_ok(LDKCResult_ClosingSignedFeeRangeDecodeErrorZ *NONNULL_PTR owner);
2237         export function CResult_ClosingSignedFeeRangeDecodeErrorZ_get_ok(owner: number): number {
2238                 if(!isWasmInitialized) {
2239                         throw new Error("initializeWasm() must be awaited first!");
2240                 }
2241                 const nativeResponseValue = wasm.TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_get_ok(owner);
2242                 return nativeResponseValue;
2243         }
2244         // struct LDKDecodeError CResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(LDKCResult_ClosingSignedFeeRangeDecodeErrorZ *NONNULL_PTR owner);
2245         export function CResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(owner: number): number {
2246                 if(!isWasmInitialized) {
2247                         throw new Error("initializeWasm() must be awaited first!");
2248                 }
2249                 const nativeResponseValue = wasm.TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(owner);
2250                 return nativeResponseValue;
2251         }
2252         // struct LDKCommitmentSigned CResult_CommitmentSignedDecodeErrorZ_get_ok(LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR owner);
2253         export function CResult_CommitmentSignedDecodeErrorZ_get_ok(owner: number): number {
2254                 if(!isWasmInitialized) {
2255                         throw new Error("initializeWasm() must be awaited first!");
2256                 }
2257                 const nativeResponseValue = wasm.TS_CResult_CommitmentSignedDecodeErrorZ_get_ok(owner);
2258                 return nativeResponseValue;
2259         }
2260         // struct LDKDecodeError CResult_CommitmentSignedDecodeErrorZ_get_err(LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR owner);
2261         export function CResult_CommitmentSignedDecodeErrorZ_get_err(owner: number): number {
2262                 if(!isWasmInitialized) {
2263                         throw new Error("initializeWasm() must be awaited first!");
2264                 }
2265                 const nativeResponseValue = wasm.TS_CResult_CommitmentSignedDecodeErrorZ_get_err(owner);
2266                 return nativeResponseValue;
2267         }
2268         // struct LDKFundingCreated CResult_FundingCreatedDecodeErrorZ_get_ok(LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR owner);
2269         export function CResult_FundingCreatedDecodeErrorZ_get_ok(owner: number): number {
2270                 if(!isWasmInitialized) {
2271                         throw new Error("initializeWasm() must be awaited first!");
2272                 }
2273                 const nativeResponseValue = wasm.TS_CResult_FundingCreatedDecodeErrorZ_get_ok(owner);
2274                 return nativeResponseValue;
2275         }
2276         // struct LDKDecodeError CResult_FundingCreatedDecodeErrorZ_get_err(LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR owner);
2277         export function CResult_FundingCreatedDecodeErrorZ_get_err(owner: number): number {
2278                 if(!isWasmInitialized) {
2279                         throw new Error("initializeWasm() must be awaited first!");
2280                 }
2281                 const nativeResponseValue = wasm.TS_CResult_FundingCreatedDecodeErrorZ_get_err(owner);
2282                 return nativeResponseValue;
2283         }
2284         // struct LDKFundingSigned CResult_FundingSignedDecodeErrorZ_get_ok(LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR owner);
2285         export function CResult_FundingSignedDecodeErrorZ_get_ok(owner: number): number {
2286                 if(!isWasmInitialized) {
2287                         throw new Error("initializeWasm() must be awaited first!");
2288                 }
2289                 const nativeResponseValue = wasm.TS_CResult_FundingSignedDecodeErrorZ_get_ok(owner);
2290                 return nativeResponseValue;
2291         }
2292         // struct LDKDecodeError CResult_FundingSignedDecodeErrorZ_get_err(LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR owner);
2293         export function CResult_FundingSignedDecodeErrorZ_get_err(owner: number): number {
2294                 if(!isWasmInitialized) {
2295                         throw new Error("initializeWasm() must be awaited first!");
2296                 }
2297                 const nativeResponseValue = wasm.TS_CResult_FundingSignedDecodeErrorZ_get_err(owner);
2298                 return nativeResponseValue;
2299         }
2300         // struct LDKFundingLocked CResult_FundingLockedDecodeErrorZ_get_ok(LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR owner);
2301         export function CResult_FundingLockedDecodeErrorZ_get_ok(owner: number): number {
2302                 if(!isWasmInitialized) {
2303                         throw new Error("initializeWasm() must be awaited first!");
2304                 }
2305                 const nativeResponseValue = wasm.TS_CResult_FundingLockedDecodeErrorZ_get_ok(owner);
2306                 return nativeResponseValue;
2307         }
2308         // struct LDKDecodeError CResult_FundingLockedDecodeErrorZ_get_err(LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR owner);
2309         export function CResult_FundingLockedDecodeErrorZ_get_err(owner: number): number {
2310                 if(!isWasmInitialized) {
2311                         throw new Error("initializeWasm() must be awaited first!");
2312                 }
2313                 const nativeResponseValue = wasm.TS_CResult_FundingLockedDecodeErrorZ_get_err(owner);
2314                 return nativeResponseValue;
2315         }
2316         // struct LDKInit CResult_InitDecodeErrorZ_get_ok(LDKCResult_InitDecodeErrorZ *NONNULL_PTR owner);
2317         export function CResult_InitDecodeErrorZ_get_ok(owner: number): number {
2318                 if(!isWasmInitialized) {
2319                         throw new Error("initializeWasm() must be awaited first!");
2320                 }
2321                 const nativeResponseValue = wasm.TS_CResult_InitDecodeErrorZ_get_ok(owner);
2322                 return nativeResponseValue;
2323         }
2324         // struct LDKDecodeError CResult_InitDecodeErrorZ_get_err(LDKCResult_InitDecodeErrorZ *NONNULL_PTR owner);
2325         export function CResult_InitDecodeErrorZ_get_err(owner: number): number {
2326                 if(!isWasmInitialized) {
2327                         throw new Error("initializeWasm() must be awaited first!");
2328                 }
2329                 const nativeResponseValue = wasm.TS_CResult_InitDecodeErrorZ_get_err(owner);
2330                 return nativeResponseValue;
2331         }
2332         // struct LDKOpenChannel CResult_OpenChannelDecodeErrorZ_get_ok(LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR owner);
2333         export function CResult_OpenChannelDecodeErrorZ_get_ok(owner: number): number {
2334                 if(!isWasmInitialized) {
2335                         throw new Error("initializeWasm() must be awaited first!");
2336                 }
2337                 const nativeResponseValue = wasm.TS_CResult_OpenChannelDecodeErrorZ_get_ok(owner);
2338                 return nativeResponseValue;
2339         }
2340         // struct LDKDecodeError CResult_OpenChannelDecodeErrorZ_get_err(LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR owner);
2341         export function CResult_OpenChannelDecodeErrorZ_get_err(owner: number): number {
2342                 if(!isWasmInitialized) {
2343                         throw new Error("initializeWasm() must be awaited first!");
2344                 }
2345                 const nativeResponseValue = wasm.TS_CResult_OpenChannelDecodeErrorZ_get_err(owner);
2346                 return nativeResponseValue;
2347         }
2348         // struct LDKRevokeAndACK CResult_RevokeAndACKDecodeErrorZ_get_ok(LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR owner);
2349         export function CResult_RevokeAndACKDecodeErrorZ_get_ok(owner: number): number {
2350                 if(!isWasmInitialized) {
2351                         throw new Error("initializeWasm() must be awaited first!");
2352                 }
2353                 const nativeResponseValue = wasm.TS_CResult_RevokeAndACKDecodeErrorZ_get_ok(owner);
2354                 return nativeResponseValue;
2355         }
2356         // struct LDKDecodeError CResult_RevokeAndACKDecodeErrorZ_get_err(LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR owner);
2357         export function CResult_RevokeAndACKDecodeErrorZ_get_err(owner: number): number {
2358                 if(!isWasmInitialized) {
2359                         throw new Error("initializeWasm() must be awaited first!");
2360                 }
2361                 const nativeResponseValue = wasm.TS_CResult_RevokeAndACKDecodeErrorZ_get_err(owner);
2362                 return nativeResponseValue;
2363         }
2364         // struct LDKShutdown CResult_ShutdownDecodeErrorZ_get_ok(LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR owner);
2365         export function CResult_ShutdownDecodeErrorZ_get_ok(owner: number): number {
2366                 if(!isWasmInitialized) {
2367                         throw new Error("initializeWasm() must be awaited first!");
2368                 }
2369                 const nativeResponseValue = wasm.TS_CResult_ShutdownDecodeErrorZ_get_ok(owner);
2370                 return nativeResponseValue;
2371         }
2372         // struct LDKDecodeError CResult_ShutdownDecodeErrorZ_get_err(LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR owner);
2373         export function CResult_ShutdownDecodeErrorZ_get_err(owner: number): number {
2374                 if(!isWasmInitialized) {
2375                         throw new Error("initializeWasm() must be awaited first!");
2376                 }
2377                 const nativeResponseValue = wasm.TS_CResult_ShutdownDecodeErrorZ_get_err(owner);
2378                 return nativeResponseValue;
2379         }
2380         // struct LDKUpdateFailHTLC CResult_UpdateFailHTLCDecodeErrorZ_get_ok(LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR owner);
2381         export function CResult_UpdateFailHTLCDecodeErrorZ_get_ok(owner: number): number {
2382                 if(!isWasmInitialized) {
2383                         throw new Error("initializeWasm() must be awaited first!");
2384                 }
2385                 const nativeResponseValue = wasm.TS_CResult_UpdateFailHTLCDecodeErrorZ_get_ok(owner);
2386                 return nativeResponseValue;
2387         }
2388         // struct LDKDecodeError CResult_UpdateFailHTLCDecodeErrorZ_get_err(LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR owner);
2389         export function CResult_UpdateFailHTLCDecodeErrorZ_get_err(owner: number): number {
2390                 if(!isWasmInitialized) {
2391                         throw new Error("initializeWasm() must be awaited first!");
2392                 }
2393                 const nativeResponseValue = wasm.TS_CResult_UpdateFailHTLCDecodeErrorZ_get_err(owner);
2394                 return nativeResponseValue;
2395         }
2396         // struct LDKUpdateFailMalformedHTLC CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR owner);
2397         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(owner: number): number {
2398                 if(!isWasmInitialized) {
2399                         throw new Error("initializeWasm() must be awaited first!");
2400                 }
2401                 const nativeResponseValue = wasm.TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(owner);
2402                 return nativeResponseValue;
2403         }
2404         // struct LDKDecodeError CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR owner);
2405         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(owner: number): number {
2406                 if(!isWasmInitialized) {
2407                         throw new Error("initializeWasm() must be awaited first!");
2408                 }
2409                 const nativeResponseValue = wasm.TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(owner);
2410                 return nativeResponseValue;
2411         }
2412         // struct LDKUpdateFee CResult_UpdateFeeDecodeErrorZ_get_ok(LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR owner);
2413         export function CResult_UpdateFeeDecodeErrorZ_get_ok(owner: number): number {
2414                 if(!isWasmInitialized) {
2415                         throw new Error("initializeWasm() must be awaited first!");
2416                 }
2417                 const nativeResponseValue = wasm.TS_CResult_UpdateFeeDecodeErrorZ_get_ok(owner);
2418                 return nativeResponseValue;
2419         }
2420         // struct LDKDecodeError CResult_UpdateFeeDecodeErrorZ_get_err(LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR owner);
2421         export function CResult_UpdateFeeDecodeErrorZ_get_err(owner: number): number {
2422                 if(!isWasmInitialized) {
2423                         throw new Error("initializeWasm() must be awaited first!");
2424                 }
2425                 const nativeResponseValue = wasm.TS_CResult_UpdateFeeDecodeErrorZ_get_err(owner);
2426                 return nativeResponseValue;
2427         }
2428         // struct LDKUpdateFulfillHTLC CResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR owner);
2429         export function CResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(owner: number): number {
2430                 if(!isWasmInitialized) {
2431                         throw new Error("initializeWasm() must be awaited first!");
2432                 }
2433                 const nativeResponseValue = wasm.TS_CResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(owner);
2434                 return nativeResponseValue;
2435         }
2436         // struct LDKDecodeError CResult_UpdateFulfillHTLCDecodeErrorZ_get_err(LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR owner);
2437         export function CResult_UpdateFulfillHTLCDecodeErrorZ_get_err(owner: number): number {
2438                 if(!isWasmInitialized) {
2439                         throw new Error("initializeWasm() must be awaited first!");
2440                 }
2441                 const nativeResponseValue = wasm.TS_CResult_UpdateFulfillHTLCDecodeErrorZ_get_err(owner);
2442                 return nativeResponseValue;
2443         }
2444         // struct LDKUpdateAddHTLC CResult_UpdateAddHTLCDecodeErrorZ_get_ok(LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR owner);
2445         export function CResult_UpdateAddHTLCDecodeErrorZ_get_ok(owner: number): number {
2446                 if(!isWasmInitialized) {
2447                         throw new Error("initializeWasm() must be awaited first!");
2448                 }
2449                 const nativeResponseValue = wasm.TS_CResult_UpdateAddHTLCDecodeErrorZ_get_ok(owner);
2450                 return nativeResponseValue;
2451         }
2452         // struct LDKDecodeError CResult_UpdateAddHTLCDecodeErrorZ_get_err(LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR owner);
2453         export function CResult_UpdateAddHTLCDecodeErrorZ_get_err(owner: number): number {
2454                 if(!isWasmInitialized) {
2455                         throw new Error("initializeWasm() must be awaited first!");
2456                 }
2457                 const nativeResponseValue = wasm.TS_CResult_UpdateAddHTLCDecodeErrorZ_get_err(owner);
2458                 return nativeResponseValue;
2459         }
2460         // struct LDKPing CResult_PingDecodeErrorZ_get_ok(LDKCResult_PingDecodeErrorZ *NONNULL_PTR owner);
2461         export function CResult_PingDecodeErrorZ_get_ok(owner: number): number {
2462                 if(!isWasmInitialized) {
2463                         throw new Error("initializeWasm() must be awaited first!");
2464                 }
2465                 const nativeResponseValue = wasm.TS_CResult_PingDecodeErrorZ_get_ok(owner);
2466                 return nativeResponseValue;
2467         }
2468         // struct LDKDecodeError CResult_PingDecodeErrorZ_get_err(LDKCResult_PingDecodeErrorZ *NONNULL_PTR owner);
2469         export function CResult_PingDecodeErrorZ_get_err(owner: number): number {
2470                 if(!isWasmInitialized) {
2471                         throw new Error("initializeWasm() must be awaited first!");
2472                 }
2473                 const nativeResponseValue = wasm.TS_CResult_PingDecodeErrorZ_get_err(owner);
2474                 return nativeResponseValue;
2475         }
2476         // struct LDKPong CResult_PongDecodeErrorZ_get_ok(LDKCResult_PongDecodeErrorZ *NONNULL_PTR owner);
2477         export function CResult_PongDecodeErrorZ_get_ok(owner: number): number {
2478                 if(!isWasmInitialized) {
2479                         throw new Error("initializeWasm() must be awaited first!");
2480                 }
2481                 const nativeResponseValue = wasm.TS_CResult_PongDecodeErrorZ_get_ok(owner);
2482                 return nativeResponseValue;
2483         }
2484         // struct LDKDecodeError CResult_PongDecodeErrorZ_get_err(LDKCResult_PongDecodeErrorZ *NONNULL_PTR owner);
2485         export function CResult_PongDecodeErrorZ_get_err(owner: number): number {
2486                 if(!isWasmInitialized) {
2487                         throw new Error("initializeWasm() must be awaited first!");
2488                 }
2489                 const nativeResponseValue = wasm.TS_CResult_PongDecodeErrorZ_get_err(owner);
2490                 return nativeResponseValue;
2491         }
2492         // struct LDKUnsignedChannelAnnouncement CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR owner);
2493         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(owner: number): number {
2494                 if(!isWasmInitialized) {
2495                         throw new Error("initializeWasm() must be awaited first!");
2496                 }
2497                 const nativeResponseValue = wasm.TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(owner);
2498                 return nativeResponseValue;
2499         }
2500         // struct LDKDecodeError CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR owner);
2501         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(owner: number): number {
2502                 if(!isWasmInitialized) {
2503                         throw new Error("initializeWasm() must be awaited first!");
2504                 }
2505                 const nativeResponseValue = wasm.TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(owner);
2506                 return nativeResponseValue;
2507         }
2508         // struct LDKChannelAnnouncement CResult_ChannelAnnouncementDecodeErrorZ_get_ok(LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR owner);
2509         export function CResult_ChannelAnnouncementDecodeErrorZ_get_ok(owner: number): number {
2510                 if(!isWasmInitialized) {
2511                         throw new Error("initializeWasm() must be awaited first!");
2512                 }
2513                 const nativeResponseValue = wasm.TS_CResult_ChannelAnnouncementDecodeErrorZ_get_ok(owner);
2514                 return nativeResponseValue;
2515         }
2516         // struct LDKDecodeError CResult_ChannelAnnouncementDecodeErrorZ_get_err(LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR owner);
2517         export function CResult_ChannelAnnouncementDecodeErrorZ_get_err(owner: number): number {
2518                 if(!isWasmInitialized) {
2519                         throw new Error("initializeWasm() must be awaited first!");
2520                 }
2521                 const nativeResponseValue = wasm.TS_CResult_ChannelAnnouncementDecodeErrorZ_get_err(owner);
2522                 return nativeResponseValue;
2523         }
2524         // struct LDKUnsignedChannelUpdate CResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR owner);
2525         export function CResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(owner: number): number {
2526                 if(!isWasmInitialized) {
2527                         throw new Error("initializeWasm() must be awaited first!");
2528                 }
2529                 const nativeResponseValue = wasm.TS_CResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(owner);
2530                 return nativeResponseValue;
2531         }
2532         // struct LDKDecodeError CResult_UnsignedChannelUpdateDecodeErrorZ_get_err(LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR owner);
2533         export function CResult_UnsignedChannelUpdateDecodeErrorZ_get_err(owner: number): number {
2534                 if(!isWasmInitialized) {
2535                         throw new Error("initializeWasm() must be awaited first!");
2536                 }
2537                 const nativeResponseValue = wasm.TS_CResult_UnsignedChannelUpdateDecodeErrorZ_get_err(owner);
2538                 return nativeResponseValue;
2539         }
2540         // struct LDKChannelUpdate CResult_ChannelUpdateDecodeErrorZ_get_ok(LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR owner);
2541         export function CResult_ChannelUpdateDecodeErrorZ_get_ok(owner: number): number {
2542                 if(!isWasmInitialized) {
2543                         throw new Error("initializeWasm() must be awaited first!");
2544                 }
2545                 const nativeResponseValue = wasm.TS_CResult_ChannelUpdateDecodeErrorZ_get_ok(owner);
2546                 return nativeResponseValue;
2547         }
2548         // struct LDKDecodeError CResult_ChannelUpdateDecodeErrorZ_get_err(LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR owner);
2549         export function CResult_ChannelUpdateDecodeErrorZ_get_err(owner: number): number {
2550                 if(!isWasmInitialized) {
2551                         throw new Error("initializeWasm() must be awaited first!");
2552                 }
2553                 const nativeResponseValue = wasm.TS_CResult_ChannelUpdateDecodeErrorZ_get_err(owner);
2554                 return nativeResponseValue;
2555         }
2556         // struct LDKErrorMessage CResult_ErrorMessageDecodeErrorZ_get_ok(LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR owner);
2557         export function CResult_ErrorMessageDecodeErrorZ_get_ok(owner: number): number {
2558                 if(!isWasmInitialized) {
2559                         throw new Error("initializeWasm() must be awaited first!");
2560                 }
2561                 const nativeResponseValue = wasm.TS_CResult_ErrorMessageDecodeErrorZ_get_ok(owner);
2562                 return nativeResponseValue;
2563         }
2564         // struct LDKDecodeError CResult_ErrorMessageDecodeErrorZ_get_err(LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR owner);
2565         export function CResult_ErrorMessageDecodeErrorZ_get_err(owner: number): number {
2566                 if(!isWasmInitialized) {
2567                         throw new Error("initializeWasm() must be awaited first!");
2568                 }
2569                 const nativeResponseValue = wasm.TS_CResult_ErrorMessageDecodeErrorZ_get_err(owner);
2570                 return nativeResponseValue;
2571         }
2572         // struct LDKUnsignedNodeAnnouncement CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR owner);
2573         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(owner: number): number {
2574                 if(!isWasmInitialized) {
2575                         throw new Error("initializeWasm() must be awaited first!");
2576                 }
2577                 const nativeResponseValue = wasm.TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(owner);
2578                 return nativeResponseValue;
2579         }
2580         // struct LDKDecodeError CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR owner);
2581         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(owner: number): number {
2582                 if(!isWasmInitialized) {
2583                         throw new Error("initializeWasm() must be awaited first!");
2584                 }
2585                 const nativeResponseValue = wasm.TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(owner);
2586                 return nativeResponseValue;
2587         }
2588         // struct LDKNodeAnnouncement CResult_NodeAnnouncementDecodeErrorZ_get_ok(LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR owner);
2589         export function CResult_NodeAnnouncementDecodeErrorZ_get_ok(owner: number): number {
2590                 if(!isWasmInitialized) {
2591                         throw new Error("initializeWasm() must be awaited first!");
2592                 }
2593                 const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementDecodeErrorZ_get_ok(owner);
2594                 return nativeResponseValue;
2595         }
2596         // struct LDKDecodeError CResult_NodeAnnouncementDecodeErrorZ_get_err(LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR owner);
2597         export function CResult_NodeAnnouncementDecodeErrorZ_get_err(owner: number): number {
2598                 if(!isWasmInitialized) {
2599                         throw new Error("initializeWasm() must be awaited first!");
2600                 }
2601                 const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementDecodeErrorZ_get_err(owner);
2602                 return nativeResponseValue;
2603         }
2604         // struct LDKQueryShortChannelIds CResult_QueryShortChannelIdsDecodeErrorZ_get_ok(LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR owner);
2605         export function CResult_QueryShortChannelIdsDecodeErrorZ_get_ok(owner: number): number {
2606                 if(!isWasmInitialized) {
2607                         throw new Error("initializeWasm() must be awaited first!");
2608                 }
2609                 const nativeResponseValue = wasm.TS_CResult_QueryShortChannelIdsDecodeErrorZ_get_ok(owner);
2610                 return nativeResponseValue;
2611         }
2612         // struct LDKDecodeError CResult_QueryShortChannelIdsDecodeErrorZ_get_err(LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR owner);
2613         export function CResult_QueryShortChannelIdsDecodeErrorZ_get_err(owner: number): number {
2614                 if(!isWasmInitialized) {
2615                         throw new Error("initializeWasm() must be awaited first!");
2616                 }
2617                 const nativeResponseValue = wasm.TS_CResult_QueryShortChannelIdsDecodeErrorZ_get_err(owner);
2618                 return nativeResponseValue;
2619         }
2620         // struct LDKReplyShortChannelIdsEnd CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR owner);
2621         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(owner: number): number {
2622                 if(!isWasmInitialized) {
2623                         throw new Error("initializeWasm() must be awaited first!");
2624                 }
2625                 const nativeResponseValue = wasm.TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(owner);
2626                 return nativeResponseValue;
2627         }
2628         // struct LDKDecodeError CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR owner);
2629         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(owner: number): number {
2630                 if(!isWasmInitialized) {
2631                         throw new Error("initializeWasm() must be awaited first!");
2632                 }
2633                 const nativeResponseValue = wasm.TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(owner);
2634                 return nativeResponseValue;
2635         }
2636         // struct LDKQueryChannelRange CResult_QueryChannelRangeDecodeErrorZ_get_ok(LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR owner);
2637         export function CResult_QueryChannelRangeDecodeErrorZ_get_ok(owner: number): number {
2638                 if(!isWasmInitialized) {
2639                         throw new Error("initializeWasm() must be awaited first!");
2640                 }
2641                 const nativeResponseValue = wasm.TS_CResult_QueryChannelRangeDecodeErrorZ_get_ok(owner);
2642                 return nativeResponseValue;
2643         }
2644         // struct LDKDecodeError CResult_QueryChannelRangeDecodeErrorZ_get_err(LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR owner);
2645         export function CResult_QueryChannelRangeDecodeErrorZ_get_err(owner: number): number {
2646                 if(!isWasmInitialized) {
2647                         throw new Error("initializeWasm() must be awaited first!");
2648                 }
2649                 const nativeResponseValue = wasm.TS_CResult_QueryChannelRangeDecodeErrorZ_get_err(owner);
2650                 return nativeResponseValue;
2651         }
2652         // struct LDKReplyChannelRange CResult_ReplyChannelRangeDecodeErrorZ_get_ok(LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR owner);
2653         export function CResult_ReplyChannelRangeDecodeErrorZ_get_ok(owner: number): number {
2654                 if(!isWasmInitialized) {
2655                         throw new Error("initializeWasm() must be awaited first!");
2656                 }
2657                 const nativeResponseValue = wasm.TS_CResult_ReplyChannelRangeDecodeErrorZ_get_ok(owner);
2658                 return nativeResponseValue;
2659         }
2660         // struct LDKDecodeError CResult_ReplyChannelRangeDecodeErrorZ_get_err(LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR owner);
2661         export function CResult_ReplyChannelRangeDecodeErrorZ_get_err(owner: number): number {
2662                 if(!isWasmInitialized) {
2663                         throw new Error("initializeWasm() must be awaited first!");
2664                 }
2665                 const nativeResponseValue = wasm.TS_CResult_ReplyChannelRangeDecodeErrorZ_get_err(owner);
2666                 return nativeResponseValue;
2667         }
2668         // struct LDKGossipTimestampFilter CResult_GossipTimestampFilterDecodeErrorZ_get_ok(LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR owner);
2669         export function CResult_GossipTimestampFilterDecodeErrorZ_get_ok(owner: number): number {
2670                 if(!isWasmInitialized) {
2671                         throw new Error("initializeWasm() must be awaited first!");
2672                 }
2673                 const nativeResponseValue = wasm.TS_CResult_GossipTimestampFilterDecodeErrorZ_get_ok(owner);
2674                 return nativeResponseValue;
2675         }
2676         // struct LDKDecodeError CResult_GossipTimestampFilterDecodeErrorZ_get_err(LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR owner);
2677         export function CResult_GossipTimestampFilterDecodeErrorZ_get_err(owner: number): number {
2678                 if(!isWasmInitialized) {
2679                         throw new Error("initializeWasm() must be awaited first!");
2680                 }
2681                 const nativeResponseValue = wasm.TS_CResult_GossipTimestampFilterDecodeErrorZ_get_err(owner);
2682                 return nativeResponseValue;
2683         }
2684         // struct LDKDelayedPaymentOutputDescriptor CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR owner);
2685         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_ok(owner: number): number {
2686                 if(!isWasmInitialized) {
2687                         throw new Error("initializeWasm() must be awaited first!");
2688                 }
2689                 const nativeResponseValue = wasm.TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_ok(owner);
2690                 return nativeResponseValue;
2691         }
2692         // struct LDKDecodeError CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR owner);
2693         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(owner: number): number {
2694                 if(!isWasmInitialized) {
2695                         throw new Error("initializeWasm() must be awaited first!");
2696                 }
2697                 const nativeResponseValue = wasm.TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(owner);
2698                 return nativeResponseValue;
2699         }
2700         // struct LDKStaticPaymentOutputDescriptor CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_ok(LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR owner);
2701         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_ok(owner: number): number {
2702                 if(!isWasmInitialized) {
2703                         throw new Error("initializeWasm() must be awaited first!");
2704                 }
2705                 const nativeResponseValue = wasm.TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_ok(owner);
2706                 return nativeResponseValue;
2707         }
2708         // struct LDKDecodeError CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR owner);
2709         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(owner: number): number {
2710                 if(!isWasmInitialized) {
2711                         throw new Error("initializeWasm() must be awaited first!");
2712                 }
2713                 const nativeResponseValue = wasm.TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(owner);
2714                 return nativeResponseValue;
2715         }
2716         // struct LDKSpendableOutputDescriptor CResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR owner);
2717         export function CResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(owner: number): number {
2718                 if(!isWasmInitialized) {
2719                         throw new Error("initializeWasm() must be awaited first!");
2720                 }
2721                 const nativeResponseValue = wasm.TS_CResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(owner);
2722                 return nativeResponseValue;
2723         }
2724         // struct LDKDecodeError CResult_SpendableOutputDescriptorDecodeErrorZ_get_err(LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR owner);
2725         export function CResult_SpendableOutputDescriptorDecodeErrorZ_get_err(owner: number): number {
2726                 if(!isWasmInitialized) {
2727                         throw new Error("initializeWasm() must be awaited first!");
2728                 }
2729                 const nativeResponseValue = wasm.TS_CResult_SpendableOutputDescriptorDecodeErrorZ_get_err(owner);
2730                 return nativeResponseValue;
2731         }
2732         // struct LDKSign CResult_SignDecodeErrorZ_get_ok(LDKCResult_SignDecodeErrorZ *NONNULL_PTR owner);
2733         export function CResult_SignDecodeErrorZ_get_ok(owner: number): number {
2734                 if(!isWasmInitialized) {
2735                         throw new Error("initializeWasm() must be awaited first!");
2736                 }
2737                 const nativeResponseValue = wasm.TS_CResult_SignDecodeErrorZ_get_ok(owner);
2738                 return nativeResponseValue;
2739         }
2740         // struct LDKDecodeError CResult_SignDecodeErrorZ_get_err(LDKCResult_SignDecodeErrorZ *NONNULL_PTR owner);
2741         export function CResult_SignDecodeErrorZ_get_err(owner: number): number {
2742                 if(!isWasmInitialized) {
2743                         throw new Error("initializeWasm() must be awaited first!");
2744                 }
2745                 const nativeResponseValue = wasm.TS_CResult_SignDecodeErrorZ_get_err(owner);
2746                 return nativeResponseValue;
2747         }
2748         // struct LDKRecoverableSignature CResult_RecoverableSignatureNoneZ_get_ok(LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR owner);
2749         export function CResult_RecoverableSignatureNoneZ_get_ok(owner: number): Uint8Array {
2750                 if(!isWasmInitialized) {
2751                         throw new Error("initializeWasm() must be awaited first!");
2752                 }
2753                 const nativeResponseValue = wasm.TS_CResult_RecoverableSignatureNoneZ_get_ok(owner);
2754                 return decodeUint8Array(nativeResponseValue);
2755         }
2756         // void CResult_RecoverableSignatureNoneZ_get_err(LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR owner);
2757         export function CResult_RecoverableSignatureNoneZ_get_err(owner: number): void {
2758                 if(!isWasmInitialized) {
2759                         throw new Error("initializeWasm() must be awaited first!");
2760                 }
2761                 const nativeResponseValue = wasm.TS_CResult_RecoverableSignatureNoneZ_get_err(owner);
2762                 // debug statements here
2763         }
2764         // struct LDKCVec_CVec_u8ZZ CResult_CVec_CVec_u8ZZNoneZ_get_ok(LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR owner);
2765         export function CResult_CVec_CVec_u8ZZNoneZ_get_ok(owner: number): Uint8Array[] {
2766                 if(!isWasmInitialized) {
2767                         throw new Error("initializeWasm() must be awaited first!");
2768                 }
2769                 const nativeResponseValue = wasm.TS_CResult_CVec_CVec_u8ZZNoneZ_get_ok(owner);
2770                 return nativeResponseValue;
2771         }
2772         // void CResult_CVec_CVec_u8ZZNoneZ_get_err(LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR owner);
2773         export function CResult_CVec_CVec_u8ZZNoneZ_get_err(owner: number): void {
2774                 if(!isWasmInitialized) {
2775                         throw new Error("initializeWasm() must be awaited first!");
2776                 }
2777                 const nativeResponseValue = wasm.TS_CResult_CVec_CVec_u8ZZNoneZ_get_err(owner);
2778                 // debug statements here
2779         }
2780         // struct LDKInMemorySigner CResult_InMemorySignerDecodeErrorZ_get_ok(LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR owner);
2781         export function CResult_InMemorySignerDecodeErrorZ_get_ok(owner: number): number {
2782                 if(!isWasmInitialized) {
2783                         throw new Error("initializeWasm() must be awaited first!");
2784                 }
2785                 const nativeResponseValue = wasm.TS_CResult_InMemorySignerDecodeErrorZ_get_ok(owner);
2786                 return nativeResponseValue;
2787         }
2788         // struct LDKDecodeError CResult_InMemorySignerDecodeErrorZ_get_err(LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR owner);
2789         export function CResult_InMemorySignerDecodeErrorZ_get_err(owner: number): number {
2790                 if(!isWasmInitialized) {
2791                         throw new Error("initializeWasm() must be awaited first!");
2792                 }
2793                 const nativeResponseValue = wasm.TS_CResult_InMemorySignerDecodeErrorZ_get_err(owner);
2794                 return nativeResponseValue;
2795         }
2796         // struct LDKTransaction CResult_TransactionNoneZ_get_ok(LDKCResult_TransactionNoneZ *NONNULL_PTR owner);
2797         export function CResult_TransactionNoneZ_get_ok(owner: number): Uint8Array {
2798                 if(!isWasmInitialized) {
2799                         throw new Error("initializeWasm() must be awaited first!");
2800                 }
2801                 const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_get_ok(owner);
2802                 return decodeUint8Array(nativeResponseValue);
2803         }
2804         // void CResult_TransactionNoneZ_get_err(LDKCResult_TransactionNoneZ *NONNULL_PTR owner);
2805         export function CResult_TransactionNoneZ_get_err(owner: number): void {
2806                 if(!isWasmInitialized) {
2807                         throw new Error("initializeWasm() must be awaited first!");
2808                 }
2809                 const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_get_err(owner);
2810                 // debug statements here
2811         }
2812
2813
2814
2815 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2816
2817                 export interface LDKFilter {
2818                         register_tx (txid: Uint8Array, script_pubkey: Uint8Array): void;
2819                         register_output (output: number): number;
2820                 }
2821
2822                 export function LDKFilter_new(impl: LDKFilter): number {
2823             throw new Error('unimplemented'); // TODO: bind to WASM
2824         }
2825
2826 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2827
2828
2829         // void Filter_register_tx LDKFilter *NONNULL_PTR this_arg, const uint8_t (*txid)[32], struct LDKu8slice script_pubkey
2830         export function Filter_register_tx(this_arg: number, txid: Uint8Array, script_pubkey: Uint8Array): void {
2831                 if(!isWasmInitialized) {
2832                         throw new Error("initializeWasm() must be awaited first!");
2833                 }
2834                 const nativeResponseValue = wasm.TS_Filter_register_tx(this_arg, encodeUint8Array(txid), encodeUint8Array(script_pubkey));
2835                 // debug statements here
2836         }
2837         // LDKCOption_C2Tuple_usizeTransactionZZ Filter_register_output LDKFilter *NONNULL_PTR this_arg, struct LDKWatchedOutput output
2838         export function Filter_register_output(this_arg: number, output: number): number {
2839                 if(!isWasmInitialized) {
2840                         throw new Error("initializeWasm() must be awaited first!");
2841                 }
2842                 const nativeResponseValue = wasm.TS_Filter_register_output(this_arg, output);
2843                 return nativeResponseValue;
2844         }
2845         export class LDKCOption_FilterZ {
2846                 protected constructor() {}
2847         }
2848         export class LDKCOption_FilterZ_Some extends LDKCOption_FilterZ {
2849                 constructor(public some: number) { super(); }
2850         }
2851         export class LDKCOption_FilterZ_None extends LDKCOption_FilterZ {
2852                 constructor() { super(); }
2853         }
2854         export function LDKCOption_FilterZ_ref_from_ptr(ptr: number): number {
2855                 if(!isWasmInitialized) {
2856                         throw new Error("initializeWasm() must be awaited first!");
2857                 }
2858                 const nativeResponseValue = wasm.TS_LDKCOption_FilterZ_ref_from_ptr(ptr);
2859                 return nativeResponseValue;
2860         }
2861         // struct LDKLockedChannelMonitor *CResult_LockedChannelMonitorNoneZ_get_ok(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner);
2862         export function CResult_LockedChannelMonitorNoneZ_get_ok(owner: number): number {
2863                 if(!isWasmInitialized) {
2864                         throw new Error("initializeWasm() must be awaited first!");
2865                 }
2866                 const nativeResponseValue = wasm.TS_CResult_LockedChannelMonitorNoneZ_get_ok(owner);
2867                 return nativeResponseValue;
2868         }
2869         // void CResult_LockedChannelMonitorNoneZ_get_err(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner);
2870         export function CResult_LockedChannelMonitorNoneZ_get_err(owner: number): void {
2871                 if(!isWasmInitialized) {
2872                         throw new Error("initializeWasm() must be awaited first!");
2873                 }
2874                 const nativeResponseValue = wasm.TS_CResult_LockedChannelMonitorNoneZ_get_err(owner);
2875                 // debug statements here
2876         }
2877         export class LDKAPIError {
2878                 protected constructor() {}
2879         }
2880         export class LDKAPIError_APIMisuseError extends LDKAPIError {
2881                 constructor(public err: String) { super(); }
2882         }
2883         export class LDKAPIError_FeeRateTooHigh extends LDKAPIError {
2884                 constructor(public err: String, public feerate: number) { super(); }
2885         }
2886         export class LDKAPIError_RouteError extends LDKAPIError {
2887                 constructor(public err: String) { super(); }
2888         }
2889         export class LDKAPIError_ChannelUnavailable extends LDKAPIError {
2890                 constructor(public err: String) { super(); }
2891         }
2892         export class LDKAPIError_MonitorUpdateFailed extends LDKAPIError {
2893                 constructor() { super(); }
2894         }
2895         export class LDKAPIError_IncompatibleShutdownScript extends LDKAPIError {
2896                 constructor(public script: number) { super(); }
2897         }
2898         export function LDKAPIError_ref_from_ptr(ptr: number): number {
2899                 if(!isWasmInitialized) {
2900                         throw new Error("initializeWasm() must be awaited first!");
2901                 }
2902                 const nativeResponseValue = wasm.TS_LDKAPIError_ref_from_ptr(ptr);
2903                 return nativeResponseValue;
2904         }
2905         // void CResult_NoneAPIErrorZ_get_ok(LDKCResult_NoneAPIErrorZ *NONNULL_PTR owner);
2906         export function CResult_NoneAPIErrorZ_get_ok(owner: number): void {
2907                 if(!isWasmInitialized) {
2908                         throw new Error("initializeWasm() must be awaited first!");
2909                 }
2910                 const nativeResponseValue = wasm.TS_CResult_NoneAPIErrorZ_get_ok(owner);
2911                 // debug statements here
2912         }
2913         // struct LDKAPIError CResult_NoneAPIErrorZ_get_err(LDKCResult_NoneAPIErrorZ *NONNULL_PTR owner);
2914         export function CResult_NoneAPIErrorZ_get_err(owner: number): number {
2915                 if(!isWasmInitialized) {
2916                         throw new Error("initializeWasm() must be awaited first!");
2917                 }
2918                 const nativeResponseValue = wasm.TS_CResult_NoneAPIErrorZ_get_err(owner);
2919                 return nativeResponseValue;
2920         }
2921         export class LDKCOption_u16Z {
2922                 protected constructor() {}
2923         }
2924         export class LDKCOption_u16Z_Some extends LDKCOption_u16Z {
2925                 constructor(public some: number) { super(); }
2926         }
2927         export class LDKCOption_u16Z_None extends LDKCOption_u16Z {
2928                 constructor() { super(); }
2929         }
2930         export function LDKCOption_u16Z_ref_from_ptr(ptr: number): number {
2931                 if(!isWasmInitialized) {
2932                         throw new Error("initializeWasm() must be awaited first!");
2933                 }
2934                 const nativeResponseValue = wasm.TS_LDKCOption_u16Z_ref_from_ptr(ptr);
2935                 return nativeResponseValue;
2936         }
2937         // struct LDKThirtyTwoBytes CResult__u832APIErrorZ_get_ok(LDKCResult__u832APIErrorZ *NONNULL_PTR owner);
2938         export function CResult__u832APIErrorZ_get_ok(owner: number): Uint8Array {
2939                 if(!isWasmInitialized) {
2940                         throw new Error("initializeWasm() must be awaited first!");
2941                 }
2942                 const nativeResponseValue = wasm.TS_CResult__u832APIErrorZ_get_ok(owner);
2943                 return decodeUint8Array(nativeResponseValue);
2944         }
2945         // struct LDKAPIError CResult__u832APIErrorZ_get_err(LDKCResult__u832APIErrorZ *NONNULL_PTR owner);
2946         export function CResult__u832APIErrorZ_get_err(owner: number): number {
2947                 if(!isWasmInitialized) {
2948                         throw new Error("initializeWasm() must be awaited first!");
2949                 }
2950                 const nativeResponseValue = wasm.TS_CResult__u832APIErrorZ_get_err(owner);
2951                 return nativeResponseValue;
2952         }
2953         export class LDKPaymentSendFailure {
2954                 protected constructor() {}
2955         }
2956         export class LDKPaymentSendFailure_ParameterError extends LDKPaymentSendFailure {
2957                 constructor(public parameter_error: number) { super(); }
2958         }
2959         export class LDKPaymentSendFailure_PathParameterError extends LDKPaymentSendFailure {
2960                 constructor(public path_parameter_error: number[]) { super(); }
2961         }
2962         export class LDKPaymentSendFailure_AllFailedRetrySafe extends LDKPaymentSendFailure {
2963                 constructor(public all_failed_retry_safe: number[]) { super(); }
2964         }
2965         export class LDKPaymentSendFailure_PartialFailure extends LDKPaymentSendFailure {
2966                 constructor(public results: number[], public failed_paths_retry: number, public payment_id: Uint8Array) { super(); }
2967         }
2968         export function LDKPaymentSendFailure_ref_from_ptr(ptr: number): number {
2969                 if(!isWasmInitialized) {
2970                         throw new Error("initializeWasm() must be awaited first!");
2971                 }
2972                 const nativeResponseValue = wasm.TS_LDKPaymentSendFailure_ref_from_ptr(ptr);
2973                 return nativeResponseValue;
2974         }
2975         // struct LDKThirtyTwoBytes CResult_PaymentIdPaymentSendFailureZ_get_ok(LDKCResult_PaymentIdPaymentSendFailureZ *NONNULL_PTR owner);
2976         export function CResult_PaymentIdPaymentSendFailureZ_get_ok(owner: number): Uint8Array {
2977                 if(!isWasmInitialized) {
2978                         throw new Error("initializeWasm() must be awaited first!");
2979                 }
2980                 const nativeResponseValue = wasm.TS_CResult_PaymentIdPaymentSendFailureZ_get_ok(owner);
2981                 return decodeUint8Array(nativeResponseValue);
2982         }
2983         // struct LDKPaymentSendFailure CResult_PaymentIdPaymentSendFailureZ_get_err(LDKCResult_PaymentIdPaymentSendFailureZ *NONNULL_PTR owner);
2984         export function CResult_PaymentIdPaymentSendFailureZ_get_err(owner: number): number {
2985                 if(!isWasmInitialized) {
2986                         throw new Error("initializeWasm() must be awaited first!");
2987                 }
2988                 const nativeResponseValue = wasm.TS_CResult_PaymentIdPaymentSendFailureZ_get_err(owner);
2989                 return nativeResponseValue;
2990         }
2991         // void CResult_NonePaymentSendFailureZ_get_ok(LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR owner);
2992         export function CResult_NonePaymentSendFailureZ_get_ok(owner: number): void {
2993                 if(!isWasmInitialized) {
2994                         throw new Error("initializeWasm() must be awaited first!");
2995                 }
2996                 const nativeResponseValue = wasm.TS_CResult_NonePaymentSendFailureZ_get_ok(owner);
2997                 // debug statements here
2998         }
2999         // struct LDKPaymentSendFailure CResult_NonePaymentSendFailureZ_get_err(LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR owner);
3000         export function CResult_NonePaymentSendFailureZ_get_err(owner: number): number {
3001                 if(!isWasmInitialized) {
3002                         throw new Error("initializeWasm() must be awaited first!");
3003                 }
3004                 const nativeResponseValue = wasm.TS_CResult_NonePaymentSendFailureZ_get_err(owner);
3005                 return nativeResponseValue;
3006         }
3007         // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentIdZ_get_a(LDKC2Tuple_PaymentHashPaymentIdZ *NONNULL_PTR owner);
3008         export function C2Tuple_PaymentHashPaymentIdZ_get_a(owner: number): Uint8Array {
3009                 if(!isWasmInitialized) {
3010                         throw new Error("initializeWasm() must be awaited first!");
3011                 }
3012                 const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentIdZ_get_a(owner);
3013                 return decodeUint8Array(nativeResponseValue);
3014         }
3015         // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentIdZ_get_b(LDKC2Tuple_PaymentHashPaymentIdZ *NONNULL_PTR owner);
3016         export function C2Tuple_PaymentHashPaymentIdZ_get_b(owner: number): Uint8Array {
3017                 if(!isWasmInitialized) {
3018                         throw new Error("initializeWasm() must be awaited first!");
3019                 }
3020                 const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentIdZ_get_b(owner);
3021                 return decodeUint8Array(nativeResponseValue);
3022         }
3023         // struct LDKC2Tuple_PaymentHashPaymentIdZ CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_get_ok(LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ *NONNULL_PTR owner);
3024         export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_get_ok(owner: number): number {
3025                 if(!isWasmInitialized) {
3026                         throw new Error("initializeWasm() must be awaited first!");
3027                 }
3028                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_get_ok(owner);
3029                 return nativeResponseValue;
3030         }
3031         // struct LDKPaymentSendFailure CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_get_err(LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ *NONNULL_PTR owner);
3032         export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_get_err(owner: number): number {
3033                 if(!isWasmInitialized) {
3034                         throw new Error("initializeWasm() must be awaited first!");
3035                 }
3036                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_get_err(owner);
3037                 return nativeResponseValue;
3038         }
3039         // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_a(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR owner);
3040         export function C2Tuple_PaymentHashPaymentSecretZ_get_a(owner: number): Uint8Array {
3041                 if(!isWasmInitialized) {
3042                         throw new Error("initializeWasm() must be awaited first!");
3043                 }
3044                 const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentSecretZ_get_a(owner);
3045                 return decodeUint8Array(nativeResponseValue);
3046         }
3047         // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_b(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR owner);
3048         export function C2Tuple_PaymentHashPaymentSecretZ_get_b(owner: number): Uint8Array {
3049                 if(!isWasmInitialized) {
3050                         throw new Error("initializeWasm() must be awaited first!");
3051                 }
3052                 const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentSecretZ_get_b(owner);
3053                 return decodeUint8Array(nativeResponseValue);
3054         }
3055         // struct LDKC2Tuple_PaymentHashPaymentSecretZ CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_get_ok(LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ *NONNULL_PTR owner);
3056         export function CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_get_ok(owner: number): number {
3057                 if(!isWasmInitialized) {
3058                         throw new Error("initializeWasm() must be awaited first!");
3059                 }
3060                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_get_ok(owner);
3061                 return nativeResponseValue;
3062         }
3063         // void CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_get_err(LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ *NONNULL_PTR owner);
3064         export function CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_get_err(owner: number): void {
3065                 if(!isWasmInitialized) {
3066                         throw new Error("initializeWasm() must be awaited first!");
3067                 }
3068                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_get_err(owner);
3069                 // debug statements here
3070         }
3071         // struct LDKC2Tuple_PaymentHashPaymentSecretZ CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_get_ok(LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ *NONNULL_PTR owner);
3072         export function CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_get_ok(owner: number): number {
3073                 if(!isWasmInitialized) {
3074                         throw new Error("initializeWasm() must be awaited first!");
3075                 }
3076                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_get_ok(owner);
3077                 return nativeResponseValue;
3078         }
3079         // struct LDKAPIError CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_get_err(LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ *NONNULL_PTR owner);
3080         export function CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_get_err(owner: number): number {
3081                 if(!isWasmInitialized) {
3082                         throw new Error("initializeWasm() must be awaited first!");
3083                 }
3084                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_get_err(owner);
3085                 return nativeResponseValue;
3086         }
3087         // struct LDKThirtyTwoBytes CResult_PaymentSecretNoneZ_get_ok(LDKCResult_PaymentSecretNoneZ *NONNULL_PTR owner);
3088         export function CResult_PaymentSecretNoneZ_get_ok(owner: number): Uint8Array {
3089                 if(!isWasmInitialized) {
3090                         throw new Error("initializeWasm() must be awaited first!");
3091                 }
3092                 const nativeResponseValue = wasm.TS_CResult_PaymentSecretNoneZ_get_ok(owner);
3093                 return decodeUint8Array(nativeResponseValue);
3094         }
3095         // void CResult_PaymentSecretNoneZ_get_err(LDKCResult_PaymentSecretNoneZ *NONNULL_PTR owner);
3096         export function CResult_PaymentSecretNoneZ_get_err(owner: number): void {
3097                 if(!isWasmInitialized) {
3098                         throw new Error("initializeWasm() must be awaited first!");
3099                 }
3100                 const nativeResponseValue = wasm.TS_CResult_PaymentSecretNoneZ_get_err(owner);
3101                 // debug statements here
3102         }
3103         // struct LDKThirtyTwoBytes CResult_PaymentSecretAPIErrorZ_get_ok(LDKCResult_PaymentSecretAPIErrorZ *NONNULL_PTR owner);
3104         export function CResult_PaymentSecretAPIErrorZ_get_ok(owner: number): Uint8Array {
3105                 if(!isWasmInitialized) {
3106                         throw new Error("initializeWasm() must be awaited first!");
3107                 }
3108                 const nativeResponseValue = wasm.TS_CResult_PaymentSecretAPIErrorZ_get_ok(owner);
3109                 return decodeUint8Array(nativeResponseValue);
3110         }
3111         // struct LDKAPIError CResult_PaymentSecretAPIErrorZ_get_err(LDKCResult_PaymentSecretAPIErrorZ *NONNULL_PTR owner);
3112         export function CResult_PaymentSecretAPIErrorZ_get_err(owner: number): number {
3113                 if(!isWasmInitialized) {
3114                         throw new Error("initializeWasm() must be awaited first!");
3115                 }
3116                 const nativeResponseValue = wasm.TS_CResult_PaymentSecretAPIErrorZ_get_err(owner);
3117                 return nativeResponseValue;
3118         }
3119         // struct LDKThirtyTwoBytes CResult_PaymentPreimageAPIErrorZ_get_ok(LDKCResult_PaymentPreimageAPIErrorZ *NONNULL_PTR owner);
3120         export function CResult_PaymentPreimageAPIErrorZ_get_ok(owner: number): Uint8Array {
3121                 if(!isWasmInitialized) {
3122                         throw new Error("initializeWasm() must be awaited first!");
3123                 }
3124                 const nativeResponseValue = wasm.TS_CResult_PaymentPreimageAPIErrorZ_get_ok(owner);
3125                 return decodeUint8Array(nativeResponseValue);
3126         }
3127         // struct LDKAPIError CResult_PaymentPreimageAPIErrorZ_get_err(LDKCResult_PaymentPreimageAPIErrorZ *NONNULL_PTR owner);
3128         export function CResult_PaymentPreimageAPIErrorZ_get_err(owner: number): number {
3129                 if(!isWasmInitialized) {
3130                         throw new Error("initializeWasm() must be awaited first!");
3131                 }
3132                 const nativeResponseValue = wasm.TS_CResult_PaymentPreimageAPIErrorZ_get_err(owner);
3133                 return nativeResponseValue;
3134         }
3135
3136
3137
3138 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
3139
3140                 export interface LDKWatch {
3141                         watch_channel (funding_txo: number, monitor: number): number;
3142                         update_channel (funding_txo: number, update: number): number;
3143                         release_pending_monitor_events (): number[];
3144                 }
3145
3146                 export function LDKWatch_new(impl: LDKWatch): number {
3147             throw new Error('unimplemented'); // TODO: bind to WASM
3148         }
3149
3150 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
3151
3152
3153         // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_watch_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitor monitor
3154         export function Watch_watch_channel(this_arg: number, funding_txo: number, monitor: number): number {
3155                 if(!isWasmInitialized) {
3156                         throw new Error("initializeWasm() must be awaited first!");
3157                 }
3158                 const nativeResponseValue = wasm.TS_Watch_watch_channel(this_arg, funding_txo, monitor);
3159                 return nativeResponseValue;
3160         }
3161         // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_update_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitorUpdate update
3162         export function Watch_update_channel(this_arg: number, funding_txo: number, update: number): number {
3163                 if(!isWasmInitialized) {
3164                         throw new Error("initializeWasm() must be awaited first!");
3165                 }
3166                 const nativeResponseValue = wasm.TS_Watch_update_channel(this_arg, funding_txo, update);
3167                 return nativeResponseValue;
3168         }
3169         // LDKCVec_MonitorEventZ Watch_release_pending_monitor_events LDKWatch *NONNULL_PTR this_arg
3170         export function Watch_release_pending_monitor_events(this_arg: number): number[] {
3171                 if(!isWasmInitialized) {
3172                         throw new Error("initializeWasm() must be awaited first!");
3173                 }
3174                 const nativeResponseValue = wasm.TS_Watch_release_pending_monitor_events(this_arg);
3175                 return nativeResponseValue;
3176         }
3177
3178
3179
3180 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
3181
3182                 export interface LDKBroadcasterInterface {
3183                         broadcast_transaction (tx: Uint8Array): void;
3184                 }
3185
3186                 export function LDKBroadcasterInterface_new(impl: LDKBroadcasterInterface): number {
3187             throw new Error('unimplemented'); // TODO: bind to WASM
3188         }
3189
3190 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
3191
3192
3193         // void BroadcasterInterface_broadcast_transaction LDKBroadcasterInterface *NONNULL_PTR this_arg, struct LDKTransaction tx
3194         export function BroadcasterInterface_broadcast_transaction(this_arg: number, tx: Uint8Array): void {
3195                 if(!isWasmInitialized) {
3196                         throw new Error("initializeWasm() must be awaited first!");
3197                 }
3198                 const nativeResponseValue = wasm.TS_BroadcasterInterface_broadcast_transaction(this_arg, encodeUint8Array(tx));
3199                 // debug statements here
3200         }
3201
3202
3203
3204 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
3205
3206                 export interface LDKKeysInterface {
3207                         get_node_secret (): Uint8Array;
3208                         get_destination_script (): Uint8Array;
3209                         get_shutdown_scriptpubkey (): number;
3210                         get_channel_signer (inbound: boolean, channel_value_satoshis: number): number;
3211                         get_secure_random_bytes (): Uint8Array;
3212                         read_chan_signer (reader: Uint8Array): number;
3213                         sign_invoice (invoice_preimage: Uint8Array): number;
3214                         get_inbound_payment_key_material (): Uint8Array;
3215                 }
3216
3217                 export function LDKKeysInterface_new(impl: LDKKeysInterface): number {
3218             throw new Error('unimplemented'); // TODO: bind to WASM
3219         }
3220
3221 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
3222
3223
3224         // LDKSecretKey KeysInterface_get_node_secret LDKKeysInterface *NONNULL_PTR this_arg
3225         export function KeysInterface_get_node_secret(this_arg: number): Uint8Array {
3226                 if(!isWasmInitialized) {
3227                         throw new Error("initializeWasm() must be awaited first!");
3228                 }
3229                 const nativeResponseValue = wasm.TS_KeysInterface_get_node_secret(this_arg);
3230                 return decodeUint8Array(nativeResponseValue);
3231         }
3232         // LDKCVec_u8Z KeysInterface_get_destination_script LDKKeysInterface *NONNULL_PTR this_arg
3233         export function KeysInterface_get_destination_script(this_arg: number): Uint8Array {
3234                 if(!isWasmInitialized) {
3235                         throw new Error("initializeWasm() must be awaited first!");
3236                 }
3237                 const nativeResponseValue = wasm.TS_KeysInterface_get_destination_script(this_arg);
3238                 return decodeUint8Array(nativeResponseValue);
3239         }
3240         // LDKShutdownScript KeysInterface_get_shutdown_scriptpubkey LDKKeysInterface *NONNULL_PTR this_arg
3241         export function KeysInterface_get_shutdown_scriptpubkey(this_arg: number): number {
3242                 if(!isWasmInitialized) {
3243                         throw new Error("initializeWasm() must be awaited first!");
3244                 }
3245                 const nativeResponseValue = wasm.TS_KeysInterface_get_shutdown_scriptpubkey(this_arg);
3246                 return nativeResponseValue;
3247         }
3248         // LDKSign KeysInterface_get_channel_signer LDKKeysInterface *NONNULL_PTR this_arg, bool inbound, uint64_t channel_value_satoshis
3249         export function KeysInterface_get_channel_signer(this_arg: number, inbound: boolean, channel_value_satoshis: number): number {
3250                 if(!isWasmInitialized) {
3251                         throw new Error("initializeWasm() must be awaited first!");
3252                 }
3253                 const nativeResponseValue = wasm.TS_KeysInterface_get_channel_signer(this_arg, inbound, channel_value_satoshis);
3254                 return nativeResponseValue;
3255         }
3256         // LDKThirtyTwoBytes KeysInterface_get_secure_random_bytes LDKKeysInterface *NONNULL_PTR this_arg
3257         export function KeysInterface_get_secure_random_bytes(this_arg: number): Uint8Array {
3258                 if(!isWasmInitialized) {
3259                         throw new Error("initializeWasm() must be awaited first!");
3260                 }
3261                 const nativeResponseValue = wasm.TS_KeysInterface_get_secure_random_bytes(this_arg);
3262                 return decodeUint8Array(nativeResponseValue);
3263         }
3264         // LDKCResult_SignDecodeErrorZ KeysInterface_read_chan_signer LDKKeysInterface *NONNULL_PTR this_arg, struct LDKu8slice reader
3265         export function KeysInterface_read_chan_signer(this_arg: number, reader: Uint8Array): number {
3266                 if(!isWasmInitialized) {
3267                         throw new Error("initializeWasm() must be awaited first!");
3268                 }
3269                 const nativeResponseValue = wasm.TS_KeysInterface_read_chan_signer(this_arg, encodeUint8Array(reader));
3270                 return nativeResponseValue;
3271         }
3272         // LDKCResult_RecoverableSignatureNoneZ KeysInterface_sign_invoice LDKKeysInterface *NONNULL_PTR this_arg, struct LDKCVec_u8Z invoice_preimage
3273         export function KeysInterface_sign_invoice(this_arg: number, invoice_preimage: Uint8Array): number {
3274                 if(!isWasmInitialized) {
3275                         throw new Error("initializeWasm() must be awaited first!");
3276                 }
3277                 const nativeResponseValue = wasm.TS_KeysInterface_sign_invoice(this_arg, encodeUint8Array(invoice_preimage));
3278                 return nativeResponseValue;
3279         }
3280         // LDKThirtyTwoBytes KeysInterface_get_inbound_payment_key_material LDKKeysInterface *NONNULL_PTR this_arg
3281         export function KeysInterface_get_inbound_payment_key_material(this_arg: number): Uint8Array {
3282                 if(!isWasmInitialized) {
3283                         throw new Error("initializeWasm() must be awaited first!");
3284                 }
3285                 const nativeResponseValue = wasm.TS_KeysInterface_get_inbound_payment_key_material(this_arg);
3286                 return decodeUint8Array(nativeResponseValue);
3287         }
3288
3289
3290
3291 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
3292
3293                 export interface LDKFeeEstimator {
3294                         get_est_sat_per_1000_weight (confirmation_target: ConfirmationTarget): number;
3295                 }
3296
3297                 export function LDKFeeEstimator_new(impl: LDKFeeEstimator): number {
3298             throw new Error('unimplemented'); // TODO: bind to WASM
3299         }
3300
3301 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
3302
3303
3304         // uint32_t FeeEstimator_get_est_sat_per_1000_weight LDKFeeEstimator *NONNULL_PTR this_arg, enum LDKConfirmationTarget confirmation_target
3305         export function FeeEstimator_get_est_sat_per_1000_weight(this_arg: number, confirmation_target: ConfirmationTarget): number {
3306                 if(!isWasmInitialized) {
3307                         throw new Error("initializeWasm() must be awaited first!");
3308                 }
3309                 const nativeResponseValue = wasm.TS_FeeEstimator_get_est_sat_per_1000_weight(this_arg, confirmation_target);
3310                 return nativeResponseValue;
3311         }
3312
3313
3314
3315 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
3316
3317                 export interface LDKLogger {
3318                         log (record: number): void;
3319                 }
3320
3321                 export function LDKLogger_new(impl: LDKLogger): number {
3322             throw new Error('unimplemented'); // TODO: bind to WASM
3323         }
3324
3325 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
3326
3327
3328         // struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelManagerZ_get_a(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR owner);
3329         export function C2Tuple_BlockHashChannelManagerZ_get_a(owner: number): Uint8Array {
3330                 if(!isWasmInitialized) {
3331                         throw new Error("initializeWasm() must be awaited first!");
3332                 }
3333                 const nativeResponseValue = wasm.TS_C2Tuple_BlockHashChannelManagerZ_get_a(owner);
3334                 return decodeUint8Array(nativeResponseValue);
3335         }
3336         // struct LDKChannelManager *C2Tuple_BlockHashChannelManagerZ_get_b(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR owner);
3337         export function C2Tuple_BlockHashChannelManagerZ_get_b(owner: number): number {
3338                 if(!isWasmInitialized) {
3339                         throw new Error("initializeWasm() must be awaited first!");
3340                 }
3341                 const nativeResponseValue = wasm.TS_C2Tuple_BlockHashChannelManagerZ_get_b(owner);
3342                 return nativeResponseValue;
3343         }
3344         // struct LDKC2Tuple_BlockHashChannelManagerZ *CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *NONNULL_PTR owner);
3345         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(owner: number): number {
3346                 if(!isWasmInitialized) {
3347                         throw new Error("initializeWasm() must be awaited first!");
3348                 }
3349                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(owner);
3350                 return nativeResponseValue;
3351         }
3352         // struct LDKDecodeError CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *NONNULL_PTR owner);
3353         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(owner: number): number {
3354                 if(!isWasmInitialized) {
3355                         throw new Error("initializeWasm() must be awaited first!");
3356                 }
3357                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(owner);
3358                 return nativeResponseValue;
3359         }
3360
3361
3362
3363 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
3364
3365                 export interface LDKMessageSendEventsProvider {
3366                         get_and_clear_pending_msg_events (): number[];
3367                 }
3368
3369                 export function LDKMessageSendEventsProvider_new(impl: LDKMessageSendEventsProvider): number {
3370             throw new Error('unimplemented'); // TODO: bind to WASM
3371         }
3372
3373 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
3374
3375
3376         // LDKCVec_MessageSendEventZ MessageSendEventsProvider_get_and_clear_pending_msg_events LDKMessageSendEventsProvider *NONNULL_PTR this_arg
3377         export function MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg: number): number[] {
3378                 if(!isWasmInitialized) {
3379                         throw new Error("initializeWasm() must be awaited first!");
3380                 }
3381                 const nativeResponseValue = wasm.TS_MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg);
3382                 return nativeResponseValue;
3383         }
3384
3385
3386
3387 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
3388
3389                 export interface LDKEventHandler {
3390                         handle_event (event: number): void;
3391                 }
3392
3393                 export function LDKEventHandler_new(impl: LDKEventHandler): number {
3394             throw new Error('unimplemented'); // TODO: bind to WASM
3395         }
3396
3397 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
3398
3399
3400         // void EventHandler_handle_event LDKEventHandler *NONNULL_PTR this_arg, const struct LDKEvent *NONNULL_PTR event
3401         export function EventHandler_handle_event(this_arg: number, event: number): void {
3402                 if(!isWasmInitialized) {
3403                         throw new Error("initializeWasm() must be awaited first!");
3404                 }
3405                 const nativeResponseValue = wasm.TS_EventHandler_handle_event(this_arg, event);
3406                 // debug statements here
3407         }
3408
3409
3410
3411 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
3412
3413                 export interface LDKEventsProvider {
3414                         process_pending_events (handler: number): void;
3415                 }
3416
3417                 export function LDKEventsProvider_new(impl: LDKEventsProvider): number {
3418             throw new Error('unimplemented'); // TODO: bind to WASM
3419         }
3420
3421 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
3422
3423
3424         // void EventsProvider_process_pending_events LDKEventsProvider *NONNULL_PTR this_arg, struct LDKEventHandler handler
3425         export function EventsProvider_process_pending_events(this_arg: number, handler: number): void {
3426                 if(!isWasmInitialized) {
3427                         throw new Error("initializeWasm() must be awaited first!");
3428                 }
3429                 const nativeResponseValue = wasm.TS_EventsProvider_process_pending_events(this_arg, handler);
3430                 // debug statements here
3431         }
3432
3433
3434
3435 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
3436
3437                 export interface LDKListen {
3438                         block_connected (block: Uint8Array, height: number): void;
3439                         block_disconnected (header: Uint8Array, height: number): void;
3440                 }
3441
3442                 export function LDKListen_new(impl: LDKListen): number {
3443             throw new Error('unimplemented'); // TODO: bind to WASM
3444         }
3445
3446 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
3447
3448
3449         // void Listen_block_connected LDKListen *NONNULL_PTR this_arg, struct LDKu8slice block, uint32_t height
3450         export function Listen_block_connected(this_arg: number, block: Uint8Array, height: number): void {
3451                 if(!isWasmInitialized) {
3452                         throw new Error("initializeWasm() must be awaited first!");
3453                 }
3454                 const nativeResponseValue = wasm.TS_Listen_block_connected(this_arg, encodeUint8Array(block), height);
3455                 // debug statements here
3456         }
3457         // void Listen_block_disconnected LDKListen *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
3458         export function Listen_block_disconnected(this_arg: number, header: Uint8Array, height: number): void {
3459                 if(!isWasmInitialized) {
3460                         throw new Error("initializeWasm() must be awaited first!");
3461                 }
3462                 const nativeResponseValue = wasm.TS_Listen_block_disconnected(this_arg, encodeUint8Array(header), height);
3463                 // debug statements here
3464         }
3465
3466
3467
3468 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
3469
3470                 export interface LDKConfirm {
3471                         transactions_confirmed (header: Uint8Array, txdata: number[], height: number): void;
3472                         transaction_unconfirmed (txid: Uint8Array): void;
3473                         best_block_updated (header: Uint8Array, height: number): void;
3474                         get_relevant_txids (): Uint8Array[];
3475                 }
3476
3477                 export function LDKConfirm_new(impl: LDKConfirm): number {
3478             throw new Error('unimplemented'); // TODO: bind to WASM
3479         }
3480
3481 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
3482
3483
3484         // void Confirm_transactions_confirmed LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height
3485         export function Confirm_transactions_confirmed(this_arg: number, header: Uint8Array, txdata: number[], height: number): void {
3486                 if(!isWasmInitialized) {
3487                         throw new Error("initializeWasm() must be awaited first!");
3488                 }
3489                 const nativeResponseValue = wasm.TS_Confirm_transactions_confirmed(this_arg, encodeUint8Array(header), txdata, height);
3490                 // debug statements here
3491         }
3492         // void Confirm_transaction_unconfirmed LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*txid)[32]
3493         export function Confirm_transaction_unconfirmed(this_arg: number, txid: Uint8Array): void {
3494                 if(!isWasmInitialized) {
3495                         throw new Error("initializeWasm() must be awaited first!");
3496                 }
3497                 const nativeResponseValue = wasm.TS_Confirm_transaction_unconfirmed(this_arg, encodeUint8Array(txid));
3498                 // debug statements here
3499         }
3500         // void Confirm_best_block_updated LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
3501         export function Confirm_best_block_updated(this_arg: number, header: Uint8Array, height: number): void {
3502                 if(!isWasmInitialized) {
3503                         throw new Error("initializeWasm() must be awaited first!");
3504                 }
3505                 const nativeResponseValue = wasm.TS_Confirm_best_block_updated(this_arg, encodeUint8Array(header), height);
3506                 // debug statements here
3507         }
3508         // LDKCVec_TxidZ Confirm_get_relevant_txids LDKConfirm *NONNULL_PTR this_arg
3509         export function Confirm_get_relevant_txids(this_arg: number): Uint8Array[] {
3510                 if(!isWasmInitialized) {
3511                         throw new Error("initializeWasm() must be awaited first!");
3512                 }
3513                 const nativeResponseValue = wasm.TS_Confirm_get_relevant_txids(this_arg);
3514                 return nativeResponseValue;
3515         }
3516
3517
3518
3519 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
3520
3521                 export interface LDKPersist {
3522                         persist_new_channel (channel_id: number, data: number, update_id: number): number;
3523                         update_persisted_channel (channel_id: number, update: number, data: number, update_id: number): number;
3524                 }
3525
3526                 export function LDKPersist_new(impl: LDKPersist): number {
3527             throw new Error('unimplemented'); // TODO: bind to WASM
3528         }
3529
3530 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
3531
3532
3533         // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_persist_new_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_id, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id
3534         export function Persist_persist_new_channel(this_arg: number, channel_id: number, data: number, update_id: number): number {
3535                 if(!isWasmInitialized) {
3536                         throw new Error("initializeWasm() must be awaited first!");
3537                 }
3538                 const nativeResponseValue = wasm.TS_Persist_persist_new_channel(this_arg, channel_id, data, update_id);
3539                 return nativeResponseValue;
3540         }
3541         // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_update_persisted_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_id, const struct LDKChannelMonitorUpdate *NONNULL_PTR update, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id
3542         export function Persist_update_persisted_channel(this_arg: number, channel_id: number, update: number, data: number, update_id: number): number {
3543                 if(!isWasmInitialized) {
3544                         throw new Error("initializeWasm() must be awaited first!");
3545                 }
3546                 const nativeResponseValue = wasm.TS_Persist_update_persisted_channel(this_arg, channel_id, update, data, update_id);
3547                 return nativeResponseValue;
3548         }
3549
3550
3551
3552 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
3553
3554                 export interface LDKChannelMessageHandler {
3555                         handle_open_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
3556                         handle_accept_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
3557                         handle_funding_created (their_node_id: Uint8Array, msg: number): void;
3558                         handle_funding_signed (their_node_id: Uint8Array, msg: number): void;
3559                         handle_funding_locked (their_node_id: Uint8Array, msg: number): void;
3560                         handle_shutdown (their_node_id: Uint8Array, their_features: number, msg: number): void;
3561                         handle_closing_signed (their_node_id: Uint8Array, msg: number): void;
3562                         handle_update_add_htlc (their_node_id: Uint8Array, msg: number): void;
3563                         handle_update_fulfill_htlc (their_node_id: Uint8Array, msg: number): void;
3564                         handle_update_fail_htlc (their_node_id: Uint8Array, msg: number): void;
3565                         handle_update_fail_malformed_htlc (their_node_id: Uint8Array, msg: number): void;
3566                         handle_commitment_signed (their_node_id: Uint8Array, msg: number): void;
3567                         handle_revoke_and_ack (their_node_id: Uint8Array, msg: number): void;
3568                         handle_update_fee (their_node_id: Uint8Array, msg: number): void;
3569                         handle_announcement_signatures (their_node_id: Uint8Array, msg: number): void;
3570                         peer_disconnected (their_node_id: Uint8Array, no_connection_possible: boolean): void;
3571                         peer_connected (their_node_id: Uint8Array, msg: number): void;
3572                         handle_channel_reestablish (their_node_id: Uint8Array, msg: number): void;
3573                         handle_channel_update (their_node_id: Uint8Array, msg: number): void;
3574                         handle_error (their_node_id: Uint8Array, msg: number): void;
3575                 }
3576
3577                 export function LDKChannelMessageHandler_new(impl: LDKChannelMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
3578             throw new Error('unimplemented'); // TODO: bind to WASM
3579         }
3580
3581 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
3582
3583
3584         // 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
3585         export function ChannelMessageHandler_handle_open_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
3586                 if(!isWasmInitialized) {
3587                         throw new Error("initializeWasm() must be awaited first!");
3588                 }
3589                 const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_open_channel(this_arg, encodeUint8Array(their_node_id), their_features, msg);
3590                 // debug statements here
3591         }
3592         // 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
3593         export function ChannelMessageHandler_handle_accept_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
3594                 if(!isWasmInitialized) {
3595                         throw new Error("initializeWasm() must be awaited first!");
3596                 }
3597                 const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_accept_channel(this_arg, encodeUint8Array(their_node_id), their_features, msg);
3598                 // debug statements here
3599         }
3600         // void ChannelMessageHandler_handle_funding_created LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingCreated *NONNULL_PTR msg
3601         export function ChannelMessageHandler_handle_funding_created(this_arg: number, their_node_id: Uint8Array, msg: number): void {
3602                 if(!isWasmInitialized) {
3603                         throw new Error("initializeWasm() must be awaited first!");
3604                 }
3605                 const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_funding_created(this_arg, encodeUint8Array(their_node_id), msg);
3606                 // debug statements here
3607         }
3608         // void ChannelMessageHandler_handle_funding_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingSigned *NONNULL_PTR msg
3609         export function ChannelMessageHandler_handle_funding_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
3610                 if(!isWasmInitialized) {
3611                         throw new Error("initializeWasm() must be awaited first!");
3612                 }
3613                 const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_funding_signed(this_arg, encodeUint8Array(their_node_id), msg);
3614                 // debug statements here
3615         }
3616         // void ChannelMessageHandler_handle_funding_locked LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingLocked *NONNULL_PTR msg
3617         export function ChannelMessageHandler_handle_funding_locked(this_arg: number, their_node_id: Uint8Array, msg: number): void {
3618                 if(!isWasmInitialized) {
3619                         throw new Error("initializeWasm() must be awaited first!");
3620                 }
3621                 const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_funding_locked(this_arg, encodeUint8Array(their_node_id), msg);
3622                 // debug statements here
3623         }
3624         // 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
3625         export function ChannelMessageHandler_handle_shutdown(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
3626                 if(!isWasmInitialized) {
3627                         throw new Error("initializeWasm() must be awaited first!");
3628                 }
3629                 const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_shutdown(this_arg, encodeUint8Array(their_node_id), their_features, msg);
3630                 // debug statements here
3631         }
3632         // void ChannelMessageHandler_handle_closing_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKClosingSigned *NONNULL_PTR msg
3633         export function ChannelMessageHandler_handle_closing_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
3634                 if(!isWasmInitialized) {
3635                         throw new Error("initializeWasm() must be awaited first!");
3636                 }
3637                 const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_closing_signed(this_arg, encodeUint8Array(their_node_id), msg);
3638                 // debug statements here
3639         }
3640         // void ChannelMessageHandler_handle_update_add_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateAddHTLC *NONNULL_PTR msg
3641         export function ChannelMessageHandler_handle_update_add_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
3642                 if(!isWasmInitialized) {
3643                         throw new Error("initializeWasm() must be awaited first!");
3644                 }
3645                 const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_update_add_htlc(this_arg, encodeUint8Array(their_node_id), msg);
3646                 // debug statements here
3647         }
3648         // void ChannelMessageHandler_handle_update_fulfill_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFulfillHTLC *NONNULL_PTR msg
3649         export function ChannelMessageHandler_handle_update_fulfill_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
3650                 if(!isWasmInitialized) {
3651                         throw new Error("initializeWasm() must be awaited first!");
3652                 }
3653                 const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_update_fulfill_htlc(this_arg, encodeUint8Array(their_node_id), msg);
3654                 // debug statements here
3655         }
3656         // void ChannelMessageHandler_handle_update_fail_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailHTLC *NONNULL_PTR msg
3657         export function ChannelMessageHandler_handle_update_fail_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
3658                 if(!isWasmInitialized) {
3659                         throw new Error("initializeWasm() must be awaited first!");
3660                 }
3661                 const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_update_fail_htlc(this_arg, encodeUint8Array(their_node_id), msg);
3662                 // debug statements here
3663         }
3664         // void ChannelMessageHandler_handle_update_fail_malformed_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR msg
3665         export function ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
3666                 if(!isWasmInitialized) {
3667                         throw new Error("initializeWasm() must be awaited first!");
3668                 }
3669                 const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg, encodeUint8Array(their_node_id), msg);
3670                 // debug statements here
3671         }
3672         // void ChannelMessageHandler_handle_commitment_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKCommitmentSigned *NONNULL_PTR msg
3673         export function ChannelMessageHandler_handle_commitment_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
3674                 if(!isWasmInitialized) {
3675                         throw new Error("initializeWasm() must be awaited first!");
3676                 }
3677                 const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_commitment_signed(this_arg, encodeUint8Array(their_node_id), msg);
3678                 // debug statements here
3679         }
3680         // void ChannelMessageHandler_handle_revoke_and_ack LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKRevokeAndACK *NONNULL_PTR msg
3681         export function ChannelMessageHandler_handle_revoke_and_ack(this_arg: number, their_node_id: Uint8Array, msg: number): void {
3682                 if(!isWasmInitialized) {
3683                         throw new Error("initializeWasm() must be awaited first!");
3684                 }
3685                 const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_revoke_and_ack(this_arg, encodeUint8Array(their_node_id), msg);
3686                 // debug statements here
3687         }
3688         // void ChannelMessageHandler_handle_update_fee LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFee *NONNULL_PTR msg
3689         export function ChannelMessageHandler_handle_update_fee(this_arg: number, their_node_id: Uint8Array, msg: number): void {
3690                 if(!isWasmInitialized) {
3691                         throw new Error("initializeWasm() must be awaited first!");
3692                 }
3693                 const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_update_fee(this_arg, encodeUint8Array(their_node_id), msg);
3694                 // debug statements here
3695         }
3696         // void ChannelMessageHandler_handle_announcement_signatures LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKAnnouncementSignatures *NONNULL_PTR msg
3697         export function ChannelMessageHandler_handle_announcement_signatures(this_arg: number, their_node_id: Uint8Array, msg: number): void {
3698                 if(!isWasmInitialized) {
3699                         throw new Error("initializeWasm() must be awaited first!");
3700                 }
3701                 const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_announcement_signatures(this_arg, encodeUint8Array(their_node_id), msg);
3702                 // debug statements here
3703         }
3704         // void ChannelMessageHandler_peer_disconnected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, bool no_connection_possible
3705         export function ChannelMessageHandler_peer_disconnected(this_arg: number, their_node_id: Uint8Array, no_connection_possible: boolean): void {
3706                 if(!isWasmInitialized) {
3707                         throw new Error("initializeWasm() must be awaited first!");
3708                 }
3709                 const nativeResponseValue = wasm.TS_ChannelMessageHandler_peer_disconnected(this_arg, encodeUint8Array(their_node_id), no_connection_possible);
3710                 // debug statements here
3711         }
3712         // void ChannelMessageHandler_peer_connected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR msg
3713         export function ChannelMessageHandler_peer_connected(this_arg: number, their_node_id: Uint8Array, msg: number): void {
3714                 if(!isWasmInitialized) {
3715                         throw new Error("initializeWasm() must be awaited first!");
3716                 }
3717                 const nativeResponseValue = wasm.TS_ChannelMessageHandler_peer_connected(this_arg, encodeUint8Array(their_node_id), msg);
3718                 // debug statements here
3719         }
3720         // void ChannelMessageHandler_handle_channel_reestablish LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelReestablish *NONNULL_PTR msg
3721         export function ChannelMessageHandler_handle_channel_reestablish(this_arg: number, their_node_id: Uint8Array, msg: number): void {
3722                 if(!isWasmInitialized) {
3723                         throw new Error("initializeWasm() must be awaited first!");
3724                 }
3725                 const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_channel_reestablish(this_arg, encodeUint8Array(their_node_id), msg);
3726                 // debug statements here
3727         }
3728         // void ChannelMessageHandler_handle_channel_update LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelUpdate *NONNULL_PTR msg
3729         export function ChannelMessageHandler_handle_channel_update(this_arg: number, their_node_id: Uint8Array, msg: number): void {
3730                 if(!isWasmInitialized) {
3731                         throw new Error("initializeWasm() must be awaited first!");
3732                 }
3733                 const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_channel_update(this_arg, encodeUint8Array(their_node_id), msg);
3734                 // debug statements here
3735         }
3736         // void ChannelMessageHandler_handle_error LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKErrorMessage *NONNULL_PTR msg
3737         export function ChannelMessageHandler_handle_error(this_arg: number, their_node_id: Uint8Array, msg: number): void {
3738                 if(!isWasmInitialized) {
3739                         throw new Error("initializeWasm() must be awaited first!");
3740                 }
3741                 const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_error(this_arg, encodeUint8Array(their_node_id), msg);
3742                 // debug statements here
3743         }
3744
3745
3746
3747 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
3748
3749                 export interface LDKRoutingMessageHandler {
3750                         handle_node_announcement (msg: number): number;
3751                         handle_channel_announcement (msg: number): number;
3752                         handle_channel_update (msg: number): number;
3753                         get_next_channel_announcements (starting_point: number, batch_amount: number): number[];
3754                         get_next_node_announcements (starting_point: Uint8Array, batch_amount: number): number[];
3755                         sync_routing_table (their_node_id: Uint8Array, init: number): void;
3756                         handle_reply_channel_range (their_node_id: Uint8Array, msg: number): number;
3757                         handle_reply_short_channel_ids_end (their_node_id: Uint8Array, msg: number): number;
3758                         handle_query_channel_range (their_node_id: Uint8Array, msg: number): number;
3759                         handle_query_short_channel_ids (their_node_id: Uint8Array, msg: number): number;
3760                 }
3761
3762                 export function LDKRoutingMessageHandler_new(impl: LDKRoutingMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
3763             throw new Error('unimplemented'); // TODO: bind to WASM
3764         }
3765
3766 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
3767
3768
3769         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_node_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg
3770         export function RoutingMessageHandler_handle_node_announcement(this_arg: number, msg: number): number {
3771                 if(!isWasmInitialized) {
3772                         throw new Error("initializeWasm() must be awaited first!");
3773                 }
3774                 const nativeResponseValue = wasm.TS_RoutingMessageHandler_handle_node_announcement(this_arg, msg);
3775                 return nativeResponseValue;
3776         }
3777         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg
3778         export function RoutingMessageHandler_handle_channel_announcement(this_arg: number, msg: number): number {
3779                 if(!isWasmInitialized) {
3780                         throw new Error("initializeWasm() must be awaited first!");
3781                 }
3782                 const nativeResponseValue = wasm.TS_RoutingMessageHandler_handle_channel_announcement(this_arg, msg);
3783                 return nativeResponseValue;
3784         }
3785         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_update LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg
3786         export function RoutingMessageHandler_handle_channel_update(this_arg: number, msg: number): number {
3787                 if(!isWasmInitialized) {
3788                         throw new Error("initializeWasm() must be awaited first!");
3789                 }
3790                 const nativeResponseValue = wasm.TS_RoutingMessageHandler_handle_channel_update(this_arg, msg);
3791                 return nativeResponseValue;
3792         }
3793         // LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ RoutingMessageHandler_get_next_channel_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, uint64_t starting_point, uint8_t batch_amount
3794         export function RoutingMessageHandler_get_next_channel_announcements(this_arg: number, starting_point: number, batch_amount: number): number[] {
3795                 if(!isWasmInitialized) {
3796                         throw new Error("initializeWasm() must be awaited first!");
3797                 }
3798                 const nativeResponseValue = wasm.TS_RoutingMessageHandler_get_next_channel_announcements(this_arg, starting_point, batch_amount);
3799                 return nativeResponseValue;
3800         }
3801         // LDKCVec_NodeAnnouncementZ RoutingMessageHandler_get_next_node_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey starting_point, uint8_t batch_amount
3802         export function RoutingMessageHandler_get_next_node_announcements(this_arg: number, starting_point: Uint8Array, batch_amount: number): number[] {
3803                 if(!isWasmInitialized) {
3804                         throw new Error("initializeWasm() must be awaited first!");
3805                 }
3806                 const nativeResponseValue = wasm.TS_RoutingMessageHandler_get_next_node_announcements(this_arg, encodeUint8Array(starting_point), batch_amount);
3807                 return nativeResponseValue;
3808         }
3809         // void RoutingMessageHandler_sync_routing_table LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init
3810         export function RoutingMessageHandler_sync_routing_table(this_arg: number, their_node_id: Uint8Array, init: number): void {
3811                 if(!isWasmInitialized) {
3812                         throw new Error("initializeWasm() must be awaited first!");
3813                 }
3814                 const nativeResponseValue = wasm.TS_RoutingMessageHandler_sync_routing_table(this_arg, encodeUint8Array(their_node_id), init);
3815                 // debug statements here
3816         }
3817         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyChannelRange msg
3818         export function RoutingMessageHandler_handle_reply_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
3819                 if(!isWasmInitialized) {
3820                         throw new Error("initializeWasm() must be awaited first!");
3821                 }
3822                 const nativeResponseValue = wasm.TS_RoutingMessageHandler_handle_reply_channel_range(this_arg, encodeUint8Array(their_node_id), msg);
3823                 return nativeResponseValue;
3824         }
3825         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_short_channel_ids_end LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyShortChannelIdsEnd msg
3826         export function RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg: number, their_node_id: Uint8Array, msg: number): number {
3827                 if(!isWasmInitialized) {
3828                         throw new Error("initializeWasm() must be awaited first!");
3829                 }
3830                 const nativeResponseValue = wasm.TS_RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg, encodeUint8Array(their_node_id), msg);
3831                 return nativeResponseValue;
3832         }
3833         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryChannelRange msg
3834         export function RoutingMessageHandler_handle_query_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
3835                 if(!isWasmInitialized) {
3836                         throw new Error("initializeWasm() must be awaited first!");
3837                 }
3838                 const nativeResponseValue = wasm.TS_RoutingMessageHandler_handle_query_channel_range(this_arg, encodeUint8Array(their_node_id), msg);
3839                 return nativeResponseValue;
3840         }
3841         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_short_channel_ids LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryShortChannelIds msg
3842         export function RoutingMessageHandler_handle_query_short_channel_ids(this_arg: number, their_node_id: Uint8Array, msg: number): number {
3843                 if(!isWasmInitialized) {
3844                         throw new Error("initializeWasm() must be awaited first!");
3845                 }
3846                 const nativeResponseValue = wasm.TS_RoutingMessageHandler_handle_query_short_channel_ids(this_arg, encodeUint8Array(their_node_id), msg);
3847                 return nativeResponseValue;
3848         }
3849
3850
3851
3852 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
3853
3854                 export interface LDKCustomMessageReader {
3855                         read (message_type: number, buffer: Uint8Array): number;
3856                 }
3857
3858                 export function LDKCustomMessageReader_new(impl: LDKCustomMessageReader): number {
3859             throw new Error('unimplemented'); // TODO: bind to WASM
3860         }
3861
3862 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
3863
3864
3865         // LDKCResult_COption_TypeZDecodeErrorZ CustomMessageReader_read LDKCustomMessageReader *NONNULL_PTR this_arg, uint16_t message_type, struct LDKu8slice buffer
3866         export function CustomMessageReader_read(this_arg: number, message_type: number, buffer: Uint8Array): number {
3867                 if(!isWasmInitialized) {
3868                         throw new Error("initializeWasm() must be awaited first!");
3869                 }
3870                 const nativeResponseValue = wasm.TS_CustomMessageReader_read(this_arg, message_type, encodeUint8Array(buffer));
3871                 return nativeResponseValue;
3872         }
3873
3874
3875
3876 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
3877
3878                 export interface LDKCustomMessageHandler {
3879                         handle_custom_message (msg: number, sender_node_id: Uint8Array): number;
3880                         get_and_clear_pending_msg (): number[];
3881                 }
3882
3883                 export function LDKCustomMessageHandler_new(impl: LDKCustomMessageHandler, CustomMessageReader: LDKCustomMessageReader): number {
3884             throw new Error('unimplemented'); // TODO: bind to WASM
3885         }
3886
3887 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
3888
3889
3890         // LDKCResult_NoneLightningErrorZ CustomMessageHandler_handle_custom_message LDKCustomMessageHandler *NONNULL_PTR this_arg, struct LDKType msg, struct LDKPublicKey sender_node_id
3891         export function CustomMessageHandler_handle_custom_message(this_arg: number, msg: number, sender_node_id: Uint8Array): number {
3892                 if(!isWasmInitialized) {
3893                         throw new Error("initializeWasm() must be awaited first!");
3894                 }
3895                 const nativeResponseValue = wasm.TS_CustomMessageHandler_handle_custom_message(this_arg, msg, encodeUint8Array(sender_node_id));
3896                 return nativeResponseValue;
3897         }
3898         // LDKCVec_C2Tuple_PublicKeyTypeZZ CustomMessageHandler_get_and_clear_pending_msg LDKCustomMessageHandler *NONNULL_PTR this_arg
3899         export function CustomMessageHandler_get_and_clear_pending_msg(this_arg: number): number[] {
3900                 if(!isWasmInitialized) {
3901                         throw new Error("initializeWasm() must be awaited first!");
3902                 }
3903                 const nativeResponseValue = wasm.TS_CustomMessageHandler_get_and_clear_pending_msg(this_arg);
3904                 return nativeResponseValue;
3905         }
3906
3907
3908
3909 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
3910
3911                 export interface LDKSocketDescriptor {
3912                         send_data (data: Uint8Array, resume_read: boolean): number;
3913                         disconnect_socket (): void;
3914                         eq (other_arg: number): boolean;
3915                         hash (): number;
3916                 }
3917
3918                 export function LDKSocketDescriptor_new(impl: LDKSocketDescriptor): number {
3919             throw new Error('unimplemented'); // TODO: bind to WASM
3920         }
3921
3922 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
3923
3924
3925         // uintptr_t SocketDescriptor_send_data LDKSocketDescriptor *NONNULL_PTR this_arg, struct LDKu8slice data, bool resume_read
3926         export function SocketDescriptor_send_data(this_arg: number, data: Uint8Array, resume_read: boolean): number {
3927                 if(!isWasmInitialized) {
3928                         throw new Error("initializeWasm() must be awaited first!");
3929                 }
3930                 const nativeResponseValue = wasm.TS_SocketDescriptor_send_data(this_arg, encodeUint8Array(data), resume_read);
3931                 return nativeResponseValue;
3932         }
3933         // void SocketDescriptor_disconnect_socket LDKSocketDescriptor *NONNULL_PTR this_arg
3934         export function SocketDescriptor_disconnect_socket(this_arg: number): void {
3935                 if(!isWasmInitialized) {
3936                         throw new Error("initializeWasm() must be awaited first!");
3937                 }
3938                 const nativeResponseValue = wasm.TS_SocketDescriptor_disconnect_socket(this_arg);
3939                 // debug statements here
3940         }
3941         // uint64_t SocketDescriptor_hash LDKSocketDescriptor *NONNULL_PTR this_arg
3942         export function SocketDescriptor_hash(this_arg: number): number {
3943                 if(!isWasmInitialized) {
3944                         throw new Error("initializeWasm() must be awaited first!");
3945                 }
3946                 const nativeResponseValue = wasm.TS_SocketDescriptor_hash(this_arg);
3947                 return nativeResponseValue;
3948         }
3949
3950
3951
3952 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
3953
3954                 export interface LDKScore {
3955                         channel_penalty_msat (short_channel_id: number, send_amt_msat: number, channel_capacity_msat: number, source: number, target: number): number;
3956                         payment_path_failed (path: number[], short_channel_id: number): void;
3957                         payment_path_successful (path: number[]): void;
3958                         write (): Uint8Array;
3959                 }
3960
3961                 export function LDKScore_new(impl: LDKScore): number {
3962             throw new Error('unimplemented'); // TODO: bind to WASM
3963         }
3964
3965 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
3966
3967
3968         // uint64_t Score_channel_penalty_msat LDKScore *NONNULL_PTR this_arg, uint64_t short_channel_id, uint64_t send_amt_msat, struct LDKCOption_u64Z channel_capacity_msat, const struct LDKNodeId *NONNULL_PTR source, const struct LDKNodeId *NONNULL_PTR target
3969         export function Score_channel_penalty_msat(this_arg: number, short_channel_id: number, send_amt_msat: number, channel_capacity_msat: number, source: number, target: number): number {
3970                 if(!isWasmInitialized) {
3971                         throw new Error("initializeWasm() must be awaited first!");
3972                 }
3973                 const nativeResponseValue = wasm.TS_Score_channel_penalty_msat(this_arg, short_channel_id, send_amt_msat, channel_capacity_msat, source, target);
3974                 return nativeResponseValue;
3975         }
3976         // void Score_payment_path_failed LDKScore *NONNULL_PTR this_arg, struct LDKCVec_RouteHopZ path, uint64_t short_channel_id
3977         export function Score_payment_path_failed(this_arg: number, path: number[], short_channel_id: number): void {
3978                 if(!isWasmInitialized) {
3979                         throw new Error("initializeWasm() must be awaited first!");
3980                 }
3981                 const nativeResponseValue = wasm.TS_Score_payment_path_failed(this_arg, path, short_channel_id);
3982                 // debug statements here
3983         }
3984         // void Score_payment_path_successful LDKScore *NONNULL_PTR this_arg, struct LDKCVec_RouteHopZ path
3985         export function Score_payment_path_successful(this_arg: number, path: number[]): void {
3986                 if(!isWasmInitialized) {
3987                         throw new Error("initializeWasm() must be awaited first!");
3988                 }
3989                 const nativeResponseValue = wasm.TS_Score_payment_path_successful(this_arg, path);
3990                 // debug statements here
3991         }
3992         // LDKCVec_u8Z Score_write LDKScore *NONNULL_PTR this_arg
3993         export function Score_write(this_arg: number): Uint8Array {
3994                 if(!isWasmInitialized) {
3995                         throw new Error("initializeWasm() must be awaited first!");
3996                 }
3997                 const nativeResponseValue = wasm.TS_Score_write(this_arg);
3998                 return decodeUint8Array(nativeResponseValue);
3999         }
4000
4001
4002
4003 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
4004
4005                 export interface LDKLockableScore {
4006                         lock (): number;
4007                 }
4008
4009                 export function LDKLockableScore_new(impl: LDKLockableScore): number {
4010             throw new Error('unimplemented'); // TODO: bind to WASM
4011         }
4012
4013 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
4014
4015
4016         // LDKScore LockableScore_lock LDKLockableScore *NONNULL_PTR this_arg
4017         export function LockableScore_lock(this_arg: number): number {
4018                 if(!isWasmInitialized) {
4019                         throw new Error("initializeWasm() must be awaited first!");
4020                 }
4021                 const nativeResponseValue = wasm.TS_LockableScore_lock(this_arg);
4022                 return nativeResponseValue;
4023         }
4024         // struct LDKStr _ldk_get_compiled_version(void);
4025         export function _ldk_get_compiled_version(): String {
4026                 if(!isWasmInitialized) {
4027                         throw new Error("initializeWasm() must be awaited first!");
4028                 }
4029                 const nativeResponseValue = wasm.TS__ldk_get_compiled_version();
4030                 return nativeResponseValue;
4031         }
4032         // struct LDKStr _ldk_c_bindings_get_compiled_version(void);
4033         export function _ldk_c_bindings_get_compiled_version(): String {
4034                 if(!isWasmInitialized) {
4035                         throw new Error("initializeWasm() must be awaited first!");
4036                 }
4037                 const nativeResponseValue = wasm.TS__ldk_c_bindings_get_compiled_version();
4038                 return nativeResponseValue;
4039         }
4040         // void Transaction_free(struct LDKTransaction _res);
4041         export function Transaction_free(_res: Uint8Array): void {
4042                 if(!isWasmInitialized) {
4043                         throw new Error("initializeWasm() must be awaited first!");
4044                 }
4045                 const nativeResponseValue = wasm.TS_Transaction_free(encodeUint8Array(_res));
4046                 // debug statements here
4047         }
4048         // struct LDKTxOut TxOut_new(struct LDKCVec_u8Z script_pubkey, uint64_t value);
4049         export function TxOut_new(script_pubkey: Uint8Array, value: number): number {
4050                 if(!isWasmInitialized) {
4051                         throw new Error("initializeWasm() must be awaited first!");
4052                 }
4053                 const nativeResponseValue = wasm.TS_TxOut_new(encodeUint8Array(script_pubkey), value);
4054                 return nativeResponseValue;
4055         }
4056         // void TxOut_free(struct LDKTxOut _res);
4057         export function TxOut_free(_res: number): void {
4058                 if(!isWasmInitialized) {
4059                         throw new Error("initializeWasm() must be awaited first!");
4060                 }
4061                 const nativeResponseValue = wasm.TS_TxOut_free(_res);
4062                 // debug statements here
4063         }
4064         // uint64_t TxOut_clone_ptr(LDKTxOut *NONNULL_PTR arg);
4065         export function TxOut_clone_ptr(arg: number): number {
4066                 if(!isWasmInitialized) {
4067                         throw new Error("initializeWasm() must be awaited first!");
4068                 }
4069                 const nativeResponseValue = wasm.TS_TxOut_clone_ptr(arg);
4070                 return nativeResponseValue;
4071         }
4072         // struct LDKTxOut TxOut_clone(const struct LDKTxOut *NONNULL_PTR orig);
4073         export function TxOut_clone(orig: number): number {
4074                 if(!isWasmInitialized) {
4075                         throw new Error("initializeWasm() must be awaited first!");
4076                 }
4077                 const nativeResponseValue = wasm.TS_TxOut_clone(orig);
4078                 return nativeResponseValue;
4079         }
4080         // void Str_free(struct LDKStr _res);
4081         export function Str_free(_res: String): void {
4082                 if(!isWasmInitialized) {
4083                         throw new Error("initializeWasm() must be awaited first!");
4084                 }
4085                 const nativeResponseValue = wasm.TS_Str_free(_res);
4086                 // debug statements here
4087         }
4088         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_ok(struct LDKChannelConfig o);
4089         export function CResult_ChannelConfigDecodeErrorZ_ok(o: number): number {
4090                 if(!isWasmInitialized) {
4091                         throw new Error("initializeWasm() must be awaited first!");
4092                 }
4093                 const nativeResponseValue = wasm.TS_CResult_ChannelConfigDecodeErrorZ_ok(o);
4094                 return nativeResponseValue;
4095         }
4096         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_err(struct LDKDecodeError e);
4097         export function CResult_ChannelConfigDecodeErrorZ_err(e: number): number {
4098                 if(!isWasmInitialized) {
4099                         throw new Error("initializeWasm() must be awaited first!");
4100                 }
4101                 const nativeResponseValue = wasm.TS_CResult_ChannelConfigDecodeErrorZ_err(e);
4102                 return nativeResponseValue;
4103         }
4104         // bool CResult_ChannelConfigDecodeErrorZ_is_ok(const struct LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR o);
4105         export function CResult_ChannelConfigDecodeErrorZ_is_ok(o: number): boolean {
4106                 if(!isWasmInitialized) {
4107                         throw new Error("initializeWasm() must be awaited first!");
4108                 }
4109                 const nativeResponseValue = wasm.TS_CResult_ChannelConfigDecodeErrorZ_is_ok(o);
4110                 return nativeResponseValue;
4111         }
4112         // void CResult_ChannelConfigDecodeErrorZ_free(struct LDKCResult_ChannelConfigDecodeErrorZ _res);
4113         export function CResult_ChannelConfigDecodeErrorZ_free(_res: number): void {
4114                 if(!isWasmInitialized) {
4115                         throw new Error("initializeWasm() must be awaited first!");
4116                 }
4117                 const nativeResponseValue = wasm.TS_CResult_ChannelConfigDecodeErrorZ_free(_res);
4118                 // debug statements here
4119         }
4120         // uint64_t CResult_ChannelConfigDecodeErrorZ_clone_ptr(LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR arg);
4121         export function CResult_ChannelConfigDecodeErrorZ_clone_ptr(arg: number): number {
4122                 if(!isWasmInitialized) {
4123                         throw new Error("initializeWasm() must be awaited first!");
4124                 }
4125                 const nativeResponseValue = wasm.TS_CResult_ChannelConfigDecodeErrorZ_clone_ptr(arg);
4126                 return nativeResponseValue;
4127         }
4128         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_clone(const struct LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR orig);
4129         export function CResult_ChannelConfigDecodeErrorZ_clone(orig: number): number {
4130                 if(!isWasmInitialized) {
4131                         throw new Error("initializeWasm() must be awaited first!");
4132                 }
4133                 const nativeResponseValue = wasm.TS_CResult_ChannelConfigDecodeErrorZ_clone(orig);
4134                 return nativeResponseValue;
4135         }
4136         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_ok(struct LDKOutPoint o);
4137         export function CResult_OutPointDecodeErrorZ_ok(o: number): number {
4138                 if(!isWasmInitialized) {
4139                         throw new Error("initializeWasm() must be awaited first!");
4140                 }
4141                 const nativeResponseValue = wasm.TS_CResult_OutPointDecodeErrorZ_ok(o);
4142                 return nativeResponseValue;
4143         }
4144         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_err(struct LDKDecodeError e);
4145         export function CResult_OutPointDecodeErrorZ_err(e: number): number {
4146                 if(!isWasmInitialized) {
4147                         throw new Error("initializeWasm() must be awaited first!");
4148                 }
4149                 const nativeResponseValue = wasm.TS_CResult_OutPointDecodeErrorZ_err(e);
4150                 return nativeResponseValue;
4151         }
4152         // bool CResult_OutPointDecodeErrorZ_is_ok(const struct LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR o);
4153         export function CResult_OutPointDecodeErrorZ_is_ok(o: number): boolean {
4154                 if(!isWasmInitialized) {
4155                         throw new Error("initializeWasm() must be awaited first!");
4156                 }
4157                 const nativeResponseValue = wasm.TS_CResult_OutPointDecodeErrorZ_is_ok(o);
4158                 return nativeResponseValue;
4159         }
4160         // void CResult_OutPointDecodeErrorZ_free(struct LDKCResult_OutPointDecodeErrorZ _res);
4161         export function CResult_OutPointDecodeErrorZ_free(_res: number): void {
4162                 if(!isWasmInitialized) {
4163                         throw new Error("initializeWasm() must be awaited first!");
4164                 }
4165                 const nativeResponseValue = wasm.TS_CResult_OutPointDecodeErrorZ_free(_res);
4166                 // debug statements here
4167         }
4168         // uint64_t CResult_OutPointDecodeErrorZ_clone_ptr(LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR arg);
4169         export function CResult_OutPointDecodeErrorZ_clone_ptr(arg: number): number {
4170                 if(!isWasmInitialized) {
4171                         throw new Error("initializeWasm() must be awaited first!");
4172                 }
4173                 const nativeResponseValue = wasm.TS_CResult_OutPointDecodeErrorZ_clone_ptr(arg);
4174                 return nativeResponseValue;
4175         }
4176         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_clone(const struct LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR orig);
4177         export function CResult_OutPointDecodeErrorZ_clone(orig: number): number {
4178                 if(!isWasmInitialized) {
4179                         throw new Error("initializeWasm() must be awaited first!");
4180                 }
4181                 const nativeResponseValue = wasm.TS_CResult_OutPointDecodeErrorZ_clone(orig);
4182                 return nativeResponseValue;
4183         }
4184         // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_ok(struct LDKSecretKey o);
4185         export function CResult_SecretKeyErrorZ_ok(o: Uint8Array): number {
4186                 if(!isWasmInitialized) {
4187                         throw new Error("initializeWasm() must be awaited first!");
4188                 }
4189                 const nativeResponseValue = wasm.TS_CResult_SecretKeyErrorZ_ok(encodeUint8Array(o));
4190                 return nativeResponseValue;
4191         }
4192         // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_err(enum LDKSecp256k1Error e);
4193         export function CResult_SecretKeyErrorZ_err(e: Secp256k1Error): number {
4194                 if(!isWasmInitialized) {
4195                         throw new Error("initializeWasm() must be awaited first!");
4196                 }
4197                 const nativeResponseValue = wasm.TS_CResult_SecretKeyErrorZ_err(e);
4198                 return nativeResponseValue;
4199         }
4200         // bool CResult_SecretKeyErrorZ_is_ok(const struct LDKCResult_SecretKeyErrorZ *NONNULL_PTR o);
4201         export function CResult_SecretKeyErrorZ_is_ok(o: number): boolean {
4202                 if(!isWasmInitialized) {
4203                         throw new Error("initializeWasm() must be awaited first!");
4204                 }
4205                 const nativeResponseValue = wasm.TS_CResult_SecretKeyErrorZ_is_ok(o);
4206                 return nativeResponseValue;
4207         }
4208         // void CResult_SecretKeyErrorZ_free(struct LDKCResult_SecretKeyErrorZ _res);
4209         export function CResult_SecretKeyErrorZ_free(_res: number): void {
4210                 if(!isWasmInitialized) {
4211                         throw new Error("initializeWasm() must be awaited first!");
4212                 }
4213                 const nativeResponseValue = wasm.TS_CResult_SecretKeyErrorZ_free(_res);
4214                 // debug statements here
4215         }
4216         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_ok(struct LDKPublicKey o);
4217         export function CResult_PublicKeyErrorZ_ok(o: Uint8Array): number {
4218                 if(!isWasmInitialized) {
4219                         throw new Error("initializeWasm() must be awaited first!");
4220                 }
4221                 const nativeResponseValue = wasm.TS_CResult_PublicKeyErrorZ_ok(encodeUint8Array(o));
4222                 return nativeResponseValue;
4223         }
4224         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_err(enum LDKSecp256k1Error e);
4225         export function CResult_PublicKeyErrorZ_err(e: Secp256k1Error): number {
4226                 if(!isWasmInitialized) {
4227                         throw new Error("initializeWasm() must be awaited first!");
4228                 }
4229                 const nativeResponseValue = wasm.TS_CResult_PublicKeyErrorZ_err(e);
4230                 return nativeResponseValue;
4231         }
4232         // bool CResult_PublicKeyErrorZ_is_ok(const struct LDKCResult_PublicKeyErrorZ *NONNULL_PTR o);
4233         export function CResult_PublicKeyErrorZ_is_ok(o: number): boolean {
4234                 if(!isWasmInitialized) {
4235                         throw new Error("initializeWasm() must be awaited first!");
4236                 }
4237                 const nativeResponseValue = wasm.TS_CResult_PublicKeyErrorZ_is_ok(o);
4238                 return nativeResponseValue;
4239         }
4240         // void CResult_PublicKeyErrorZ_free(struct LDKCResult_PublicKeyErrorZ _res);
4241         export function CResult_PublicKeyErrorZ_free(_res: number): void {
4242                 if(!isWasmInitialized) {
4243                         throw new Error("initializeWasm() must be awaited first!");
4244                 }
4245                 const nativeResponseValue = wasm.TS_CResult_PublicKeyErrorZ_free(_res);
4246                 // debug statements here
4247         }
4248         // uint64_t CResult_PublicKeyErrorZ_clone_ptr(LDKCResult_PublicKeyErrorZ *NONNULL_PTR arg);
4249         export function CResult_PublicKeyErrorZ_clone_ptr(arg: number): number {
4250                 if(!isWasmInitialized) {
4251                         throw new Error("initializeWasm() must be awaited first!");
4252                 }
4253                 const nativeResponseValue = wasm.TS_CResult_PublicKeyErrorZ_clone_ptr(arg);
4254                 return nativeResponseValue;
4255         }
4256         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_clone(const struct LDKCResult_PublicKeyErrorZ *NONNULL_PTR orig);
4257         export function CResult_PublicKeyErrorZ_clone(orig: number): number {
4258                 if(!isWasmInitialized) {
4259                         throw new Error("initializeWasm() must be awaited first!");
4260                 }
4261                 const nativeResponseValue = wasm.TS_CResult_PublicKeyErrorZ_clone(orig);
4262                 return nativeResponseValue;
4263         }
4264         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_ok(struct LDKTxCreationKeys o);
4265         export function CResult_TxCreationKeysDecodeErrorZ_ok(o: number): number {
4266                 if(!isWasmInitialized) {
4267                         throw new Error("initializeWasm() must be awaited first!");
4268                 }
4269                 const nativeResponseValue = wasm.TS_CResult_TxCreationKeysDecodeErrorZ_ok(o);
4270                 return nativeResponseValue;
4271         }
4272         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_err(struct LDKDecodeError e);
4273         export function CResult_TxCreationKeysDecodeErrorZ_err(e: number): number {
4274                 if(!isWasmInitialized) {
4275                         throw new Error("initializeWasm() must be awaited first!");
4276                 }
4277                 const nativeResponseValue = wasm.TS_CResult_TxCreationKeysDecodeErrorZ_err(e);
4278                 return nativeResponseValue;
4279         }
4280         // bool CResult_TxCreationKeysDecodeErrorZ_is_ok(const struct LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR o);
4281         export function CResult_TxCreationKeysDecodeErrorZ_is_ok(o: number): boolean {
4282                 if(!isWasmInitialized) {
4283                         throw new Error("initializeWasm() must be awaited first!");
4284                 }
4285                 const nativeResponseValue = wasm.TS_CResult_TxCreationKeysDecodeErrorZ_is_ok(o);
4286                 return nativeResponseValue;
4287         }
4288         // void CResult_TxCreationKeysDecodeErrorZ_free(struct LDKCResult_TxCreationKeysDecodeErrorZ _res);
4289         export function CResult_TxCreationKeysDecodeErrorZ_free(_res: number): void {
4290                 if(!isWasmInitialized) {
4291                         throw new Error("initializeWasm() must be awaited first!");
4292                 }
4293                 const nativeResponseValue = wasm.TS_CResult_TxCreationKeysDecodeErrorZ_free(_res);
4294                 // debug statements here
4295         }
4296         // uint64_t CResult_TxCreationKeysDecodeErrorZ_clone_ptr(LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR arg);
4297         export function CResult_TxCreationKeysDecodeErrorZ_clone_ptr(arg: number): number {
4298                 if(!isWasmInitialized) {
4299                         throw new Error("initializeWasm() must be awaited first!");
4300                 }
4301                 const nativeResponseValue = wasm.TS_CResult_TxCreationKeysDecodeErrorZ_clone_ptr(arg);
4302                 return nativeResponseValue;
4303         }
4304         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_clone(const struct LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR orig);
4305         export function CResult_TxCreationKeysDecodeErrorZ_clone(orig: number): number {
4306                 if(!isWasmInitialized) {
4307                         throw new Error("initializeWasm() must be awaited first!");
4308                 }
4309                 const nativeResponseValue = wasm.TS_CResult_TxCreationKeysDecodeErrorZ_clone(orig);
4310                 return nativeResponseValue;
4311         }
4312         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_ok(struct LDKChannelPublicKeys o);
4313         export function CResult_ChannelPublicKeysDecodeErrorZ_ok(o: number): number {
4314                 if(!isWasmInitialized) {
4315                         throw new Error("initializeWasm() must be awaited first!");
4316                 }
4317                 const nativeResponseValue = wasm.TS_CResult_ChannelPublicKeysDecodeErrorZ_ok(o);
4318                 return nativeResponseValue;
4319         }
4320         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_err(struct LDKDecodeError e);
4321         export function CResult_ChannelPublicKeysDecodeErrorZ_err(e: number): number {
4322                 if(!isWasmInitialized) {
4323                         throw new Error("initializeWasm() must be awaited first!");
4324                 }
4325                 const nativeResponseValue = wasm.TS_CResult_ChannelPublicKeysDecodeErrorZ_err(e);
4326                 return nativeResponseValue;
4327         }
4328         // bool CResult_ChannelPublicKeysDecodeErrorZ_is_ok(const struct LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR o);
4329         export function CResult_ChannelPublicKeysDecodeErrorZ_is_ok(o: number): boolean {
4330                 if(!isWasmInitialized) {
4331                         throw new Error("initializeWasm() must be awaited first!");
4332                 }
4333                 const nativeResponseValue = wasm.TS_CResult_ChannelPublicKeysDecodeErrorZ_is_ok(o);
4334                 return nativeResponseValue;
4335         }
4336         // void CResult_ChannelPublicKeysDecodeErrorZ_free(struct LDKCResult_ChannelPublicKeysDecodeErrorZ _res);
4337         export function CResult_ChannelPublicKeysDecodeErrorZ_free(_res: number): void {
4338                 if(!isWasmInitialized) {
4339                         throw new Error("initializeWasm() must be awaited first!");
4340                 }
4341                 const nativeResponseValue = wasm.TS_CResult_ChannelPublicKeysDecodeErrorZ_free(_res);
4342                 // debug statements here
4343         }
4344         // uint64_t CResult_ChannelPublicKeysDecodeErrorZ_clone_ptr(LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR arg);
4345         export function CResult_ChannelPublicKeysDecodeErrorZ_clone_ptr(arg: number): number {
4346                 if(!isWasmInitialized) {
4347                         throw new Error("initializeWasm() must be awaited first!");
4348                 }
4349                 const nativeResponseValue = wasm.TS_CResult_ChannelPublicKeysDecodeErrorZ_clone_ptr(arg);
4350                 return nativeResponseValue;
4351         }
4352         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_clone(const struct LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR orig);
4353         export function CResult_ChannelPublicKeysDecodeErrorZ_clone(orig: number): number {
4354                 if(!isWasmInitialized) {
4355                         throw new Error("initializeWasm() must be awaited first!");
4356                 }
4357                 const nativeResponseValue = wasm.TS_CResult_ChannelPublicKeysDecodeErrorZ_clone(orig);
4358                 return nativeResponseValue;
4359         }
4360         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_ok(struct LDKTxCreationKeys o);
4361         export function CResult_TxCreationKeysErrorZ_ok(o: number): number {
4362                 if(!isWasmInitialized) {
4363                         throw new Error("initializeWasm() must be awaited first!");
4364                 }
4365                 const nativeResponseValue = wasm.TS_CResult_TxCreationKeysErrorZ_ok(o);
4366                 return nativeResponseValue;
4367         }
4368         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_err(enum LDKSecp256k1Error e);
4369         export function CResult_TxCreationKeysErrorZ_err(e: Secp256k1Error): number {
4370                 if(!isWasmInitialized) {
4371                         throw new Error("initializeWasm() must be awaited first!");
4372                 }
4373                 const nativeResponseValue = wasm.TS_CResult_TxCreationKeysErrorZ_err(e);
4374                 return nativeResponseValue;
4375         }
4376         // bool CResult_TxCreationKeysErrorZ_is_ok(const struct LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR o);
4377         export function CResult_TxCreationKeysErrorZ_is_ok(o: number): boolean {
4378                 if(!isWasmInitialized) {
4379                         throw new Error("initializeWasm() must be awaited first!");
4380                 }
4381                 const nativeResponseValue = wasm.TS_CResult_TxCreationKeysErrorZ_is_ok(o);
4382                 return nativeResponseValue;
4383         }
4384         // void CResult_TxCreationKeysErrorZ_free(struct LDKCResult_TxCreationKeysErrorZ _res);
4385         export function CResult_TxCreationKeysErrorZ_free(_res: number): void {
4386                 if(!isWasmInitialized) {
4387                         throw new Error("initializeWasm() must be awaited first!");
4388                 }
4389                 const nativeResponseValue = wasm.TS_CResult_TxCreationKeysErrorZ_free(_res);
4390                 // debug statements here
4391         }
4392         // uint64_t CResult_TxCreationKeysErrorZ_clone_ptr(LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR arg);
4393         export function CResult_TxCreationKeysErrorZ_clone_ptr(arg: number): number {
4394                 if(!isWasmInitialized) {
4395                         throw new Error("initializeWasm() must be awaited first!");
4396                 }
4397                 const nativeResponseValue = wasm.TS_CResult_TxCreationKeysErrorZ_clone_ptr(arg);
4398                 return nativeResponseValue;
4399         }
4400         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_clone(const struct LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR orig);
4401         export function CResult_TxCreationKeysErrorZ_clone(orig: number): number {
4402                 if(!isWasmInitialized) {
4403                         throw new Error("initializeWasm() must be awaited first!");
4404                 }
4405                 const nativeResponseValue = wasm.TS_CResult_TxCreationKeysErrorZ_clone(orig);
4406                 return nativeResponseValue;
4407         }
4408         // struct LDKCOption_u32Z COption_u32Z_some(uint32_t o);
4409         export function COption_u32Z_some(o: number): number {
4410                 if(!isWasmInitialized) {
4411                         throw new Error("initializeWasm() must be awaited first!");
4412                 }
4413                 const nativeResponseValue = wasm.TS_COption_u32Z_some(o);
4414                 return nativeResponseValue;
4415         }
4416         // struct LDKCOption_u32Z COption_u32Z_none(void);
4417         export function COption_u32Z_none(): number {
4418                 if(!isWasmInitialized) {
4419                         throw new Error("initializeWasm() must be awaited first!");
4420                 }
4421                 const nativeResponseValue = wasm.TS_COption_u32Z_none();
4422                 return nativeResponseValue;
4423         }
4424         // void COption_u32Z_free(struct LDKCOption_u32Z _res);
4425         export function COption_u32Z_free(_res: number): void {
4426                 if(!isWasmInitialized) {
4427                         throw new Error("initializeWasm() must be awaited first!");
4428                 }
4429                 const nativeResponseValue = wasm.TS_COption_u32Z_free(_res);
4430                 // debug statements here
4431         }
4432         // uint64_t COption_u32Z_clone_ptr(LDKCOption_u32Z *NONNULL_PTR arg);
4433         export function COption_u32Z_clone_ptr(arg: number): number {
4434                 if(!isWasmInitialized) {
4435                         throw new Error("initializeWasm() must be awaited first!");
4436                 }
4437                 const nativeResponseValue = wasm.TS_COption_u32Z_clone_ptr(arg);
4438                 return nativeResponseValue;
4439         }
4440         // struct LDKCOption_u32Z COption_u32Z_clone(const struct LDKCOption_u32Z *NONNULL_PTR orig);
4441         export function COption_u32Z_clone(orig: number): number {
4442                 if(!isWasmInitialized) {
4443                         throw new Error("initializeWasm() must be awaited first!");
4444                 }
4445                 const nativeResponseValue = wasm.TS_COption_u32Z_clone(orig);
4446                 return nativeResponseValue;
4447         }
4448         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(struct LDKHTLCOutputInCommitment o);
4449         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o: number): number {
4450                 if(!isWasmInitialized) {
4451                         throw new Error("initializeWasm() must be awaited first!");
4452                 }
4453                 const nativeResponseValue = wasm.TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o);
4454                 return nativeResponseValue;
4455         }
4456         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_err(struct LDKDecodeError e);
4457         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e: number): number {
4458                 if(!isWasmInitialized) {
4459                         throw new Error("initializeWasm() must be awaited first!");
4460                 }
4461                 const nativeResponseValue = wasm.TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e);
4462                 return nativeResponseValue;
4463         }
4464         // bool CResult_HTLCOutputInCommitmentDecodeErrorZ_is_ok(const struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR o);
4465         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_is_ok(o: number): boolean {
4466                 if(!isWasmInitialized) {
4467                         throw new Error("initializeWasm() must be awaited first!");
4468                 }
4469                 const nativeResponseValue = wasm.TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_is_ok(o);
4470                 return nativeResponseValue;
4471         }
4472         // void CResult_HTLCOutputInCommitmentDecodeErrorZ_free(struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ _res);
4473         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res: number): void {
4474                 if(!isWasmInitialized) {
4475                         throw new Error("initializeWasm() must be awaited first!");
4476                 }
4477                 const nativeResponseValue = wasm.TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res);
4478                 // debug statements here
4479         }
4480         // uint64_t CResult_HTLCOutputInCommitmentDecodeErrorZ_clone_ptr(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR arg);
4481         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_clone_ptr(arg: number): number {
4482                 if(!isWasmInitialized) {
4483                         throw new Error("initializeWasm() must be awaited first!");
4484                 }
4485                 const nativeResponseValue = wasm.TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_clone_ptr(arg);
4486                 return nativeResponseValue;
4487         }
4488         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(const struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR orig);
4489         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig: number): number {
4490                 if(!isWasmInitialized) {
4491                         throw new Error("initializeWasm() must be awaited first!");
4492                 }
4493                 const nativeResponseValue = wasm.TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig);
4494                 return nativeResponseValue;
4495         }
4496         // enum LDKCOption_NoneZ COption_NoneZ_some(void);
4497         export function COption_NoneZ_some(): COption_NoneZ {
4498                 if(!isWasmInitialized) {
4499                         throw new Error("initializeWasm() must be awaited first!");
4500                 }
4501                 const nativeResponseValue = wasm.TS_COption_NoneZ_some();
4502                 return nativeResponseValue;
4503         }
4504         // enum LDKCOption_NoneZ COption_NoneZ_none(void);
4505         export function COption_NoneZ_none(): COption_NoneZ {
4506                 if(!isWasmInitialized) {
4507                         throw new Error("initializeWasm() must be awaited first!");
4508                 }
4509                 const nativeResponseValue = wasm.TS_COption_NoneZ_none();
4510                 return nativeResponseValue;
4511         }
4512         // void COption_NoneZ_free(enum LDKCOption_NoneZ _res);
4513         export function COption_NoneZ_free(_res: COption_NoneZ): void {
4514                 if(!isWasmInitialized) {
4515                         throw new Error("initializeWasm() must be awaited first!");
4516                 }
4517                 const nativeResponseValue = wasm.TS_COption_NoneZ_free(_res);
4518                 // debug statements here
4519         }
4520         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(struct LDKCounterpartyChannelTransactionParameters o);
4521         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
4522                 if(!isWasmInitialized) {
4523                         throw new Error("initializeWasm() must be awaited first!");
4524                 }
4525                 const nativeResponseValue = wasm.TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o);
4526                 return nativeResponseValue;
4527         }
4528         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
4529         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e: number): number {
4530                 if(!isWasmInitialized) {
4531                         throw new Error("initializeWasm() must be awaited first!");
4532                 }
4533                 const nativeResponseValue = wasm.TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e);
4534                 return nativeResponseValue;
4535         }
4536         // bool CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_is_ok(const struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR o);
4537         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_is_ok(o: number): boolean {
4538                 if(!isWasmInitialized) {
4539                         throw new Error("initializeWasm() must be awaited first!");
4540                 }
4541                 const nativeResponseValue = wasm.TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_is_ok(o);
4542                 return nativeResponseValue;
4543         }
4544         // void CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ _res);
4545         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
4546                 if(!isWasmInitialized) {
4547                         throw new Error("initializeWasm() must be awaited first!");
4548                 }
4549                 const nativeResponseValue = wasm.TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res);
4550                 // debug statements here
4551         }
4552         // uint64_t CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone_ptr(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR arg);
4553         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone_ptr(arg: number): number {
4554                 if(!isWasmInitialized) {
4555                         throw new Error("initializeWasm() must be awaited first!");
4556                 }
4557                 const nativeResponseValue = wasm.TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone_ptr(arg);
4558                 return nativeResponseValue;
4559         }
4560         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
4561         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
4562                 if(!isWasmInitialized) {
4563                         throw new Error("initializeWasm() must be awaited first!");
4564                 }
4565                 const nativeResponseValue = wasm.TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig);
4566                 return nativeResponseValue;
4567         }
4568         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_ok(struct LDKChannelTransactionParameters o);
4569         export function CResult_ChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
4570                 if(!isWasmInitialized) {
4571                         throw new Error("initializeWasm() must be awaited first!");
4572                 }
4573                 const nativeResponseValue = wasm.TS_CResult_ChannelTransactionParametersDecodeErrorZ_ok(o);
4574                 return nativeResponseValue;
4575         }
4576         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
4577         export function CResult_ChannelTransactionParametersDecodeErrorZ_err(e: number): number {
4578                 if(!isWasmInitialized) {
4579                         throw new Error("initializeWasm() must be awaited first!");
4580                 }
4581                 const nativeResponseValue = wasm.TS_CResult_ChannelTransactionParametersDecodeErrorZ_err(e);
4582                 return nativeResponseValue;
4583         }
4584         // bool CResult_ChannelTransactionParametersDecodeErrorZ_is_ok(const struct LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR o);
4585         export function CResult_ChannelTransactionParametersDecodeErrorZ_is_ok(o: number): boolean {
4586                 if(!isWasmInitialized) {
4587                         throw new Error("initializeWasm() must be awaited first!");
4588                 }
4589                 const nativeResponseValue = wasm.TS_CResult_ChannelTransactionParametersDecodeErrorZ_is_ok(o);
4590                 return nativeResponseValue;
4591         }
4592         // void CResult_ChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_ChannelTransactionParametersDecodeErrorZ _res);
4593         export function CResult_ChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
4594                 if(!isWasmInitialized) {
4595                         throw new Error("initializeWasm() must be awaited first!");
4596                 }
4597                 const nativeResponseValue = wasm.TS_CResult_ChannelTransactionParametersDecodeErrorZ_free(_res);
4598                 // debug statements here
4599         }
4600         // uint64_t CResult_ChannelTransactionParametersDecodeErrorZ_clone_ptr(LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR arg);
4601         export function CResult_ChannelTransactionParametersDecodeErrorZ_clone_ptr(arg: number): number {
4602                 if(!isWasmInitialized) {
4603                         throw new Error("initializeWasm() must be awaited first!");
4604                 }
4605                 const nativeResponseValue = wasm.TS_CResult_ChannelTransactionParametersDecodeErrorZ_clone_ptr(arg);
4606                 return nativeResponseValue;
4607         }
4608         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
4609         export function CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
4610                 if(!isWasmInitialized) {
4611                         throw new Error("initializeWasm() must be awaited first!");
4612                 }
4613                 const nativeResponseValue = wasm.TS_CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig);
4614                 return nativeResponseValue;
4615         }
4616         // void CVec_SignatureZ_free(struct LDKCVec_SignatureZ _res);
4617         export function CVec_SignatureZ_free(_res: Uint8Array[]): void {
4618                 if(!isWasmInitialized) {
4619                         throw new Error("initializeWasm() must be awaited first!");
4620                 }
4621                 const nativeResponseValue = wasm.TS_CVec_SignatureZ_free(_res);
4622                 // debug statements here
4623         }
4624         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_ok(struct LDKHolderCommitmentTransaction o);
4625         export function CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o: number): number {
4626                 if(!isWasmInitialized) {
4627                         throw new Error("initializeWasm() must be awaited first!");
4628                 }
4629                 const nativeResponseValue = wasm.TS_CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o);
4630                 return nativeResponseValue;
4631         }
4632         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
4633         export function CResult_HolderCommitmentTransactionDecodeErrorZ_err(e: number): number {
4634                 if(!isWasmInitialized) {
4635                         throw new Error("initializeWasm() must be awaited first!");
4636                 }
4637                 const nativeResponseValue = wasm.TS_CResult_HolderCommitmentTransactionDecodeErrorZ_err(e);
4638                 return nativeResponseValue;
4639         }
4640         // bool CResult_HolderCommitmentTransactionDecodeErrorZ_is_ok(const struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR o);
4641         export function CResult_HolderCommitmentTransactionDecodeErrorZ_is_ok(o: number): boolean {
4642                 if(!isWasmInitialized) {
4643                         throw new Error("initializeWasm() must be awaited first!");
4644                 }
4645                 const nativeResponseValue = wasm.TS_CResult_HolderCommitmentTransactionDecodeErrorZ_is_ok(o);
4646                 return nativeResponseValue;
4647         }
4648         // void CResult_HolderCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ _res);
4649         export function CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res: number): void {
4650                 if(!isWasmInitialized) {
4651                         throw new Error("initializeWasm() must be awaited first!");
4652                 }
4653                 const nativeResponseValue = wasm.TS_CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res);
4654                 // debug statements here
4655         }
4656         // uint64_t CResult_HolderCommitmentTransactionDecodeErrorZ_clone_ptr(LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR arg);
4657         export function CResult_HolderCommitmentTransactionDecodeErrorZ_clone_ptr(arg: number): number {
4658                 if(!isWasmInitialized) {
4659                         throw new Error("initializeWasm() must be awaited first!");
4660                 }
4661                 const nativeResponseValue = wasm.TS_CResult_HolderCommitmentTransactionDecodeErrorZ_clone_ptr(arg);
4662                 return nativeResponseValue;
4663         }
4664         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
4665         export function CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
4666                 if(!isWasmInitialized) {
4667                         throw new Error("initializeWasm() must be awaited first!");
4668                 }
4669                 const nativeResponseValue = wasm.TS_CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig);
4670                 return nativeResponseValue;
4671         }
4672         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(struct LDKBuiltCommitmentTransaction o);
4673         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o: number): number {
4674                 if(!isWasmInitialized) {
4675                         throw new Error("initializeWasm() must be awaited first!");
4676                 }
4677                 const nativeResponseValue = wasm.TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o);
4678                 return nativeResponseValue;
4679         }
4680         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
4681         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e: number): number {
4682                 if(!isWasmInitialized) {
4683                         throw new Error("initializeWasm() must be awaited first!");
4684                 }
4685                 const nativeResponseValue = wasm.TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e);
4686                 return nativeResponseValue;
4687         }
4688         // bool CResult_BuiltCommitmentTransactionDecodeErrorZ_is_ok(const struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR o);
4689         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_is_ok(o: number): boolean {
4690                 if(!isWasmInitialized) {
4691                         throw new Error("initializeWasm() must be awaited first!");
4692                 }
4693                 const nativeResponseValue = wasm.TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_is_ok(o);
4694                 return nativeResponseValue;
4695         }
4696         // void CResult_BuiltCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ _res);
4697         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res: number): void {
4698                 if(!isWasmInitialized) {
4699                         throw new Error("initializeWasm() must be awaited first!");
4700                 }
4701                 const nativeResponseValue = wasm.TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res);
4702                 // debug statements here
4703         }
4704         // uint64_t CResult_BuiltCommitmentTransactionDecodeErrorZ_clone_ptr(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR arg);
4705         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_clone_ptr(arg: number): number {
4706                 if(!isWasmInitialized) {
4707                         throw new Error("initializeWasm() must be awaited first!");
4708                 }
4709                 const nativeResponseValue = wasm.TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_clone_ptr(arg);
4710                 return nativeResponseValue;
4711         }
4712         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
4713         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
4714                 if(!isWasmInitialized) {
4715                         throw new Error("initializeWasm() must be awaited first!");
4716                 }
4717                 const nativeResponseValue = wasm.TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig);
4718                 return nativeResponseValue;
4719         }
4720         // struct LDKCResult_TrustedClosingTransactionNoneZ CResult_TrustedClosingTransactionNoneZ_ok(struct LDKTrustedClosingTransaction o);
4721         export function CResult_TrustedClosingTransactionNoneZ_ok(o: number): number {
4722                 if(!isWasmInitialized) {
4723                         throw new Error("initializeWasm() must be awaited first!");
4724                 }
4725                 const nativeResponseValue = wasm.TS_CResult_TrustedClosingTransactionNoneZ_ok(o);
4726                 return nativeResponseValue;
4727         }
4728         // struct LDKCResult_TrustedClosingTransactionNoneZ CResult_TrustedClosingTransactionNoneZ_err(void);
4729         export function CResult_TrustedClosingTransactionNoneZ_err(): number {
4730                 if(!isWasmInitialized) {
4731                         throw new Error("initializeWasm() must be awaited first!");
4732                 }
4733                 const nativeResponseValue = wasm.TS_CResult_TrustedClosingTransactionNoneZ_err();
4734                 return nativeResponseValue;
4735         }
4736         // bool CResult_TrustedClosingTransactionNoneZ_is_ok(const struct LDKCResult_TrustedClosingTransactionNoneZ *NONNULL_PTR o);
4737         export function CResult_TrustedClosingTransactionNoneZ_is_ok(o: number): boolean {
4738                 if(!isWasmInitialized) {
4739                         throw new Error("initializeWasm() must be awaited first!");
4740                 }
4741                 const nativeResponseValue = wasm.TS_CResult_TrustedClosingTransactionNoneZ_is_ok(o);
4742                 return nativeResponseValue;
4743         }
4744         // void CResult_TrustedClosingTransactionNoneZ_free(struct LDKCResult_TrustedClosingTransactionNoneZ _res);
4745         export function CResult_TrustedClosingTransactionNoneZ_free(_res: number): void {
4746                 if(!isWasmInitialized) {
4747                         throw new Error("initializeWasm() must be awaited first!");
4748                 }
4749                 const nativeResponseValue = wasm.TS_CResult_TrustedClosingTransactionNoneZ_free(_res);
4750                 // debug statements here
4751         }
4752         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_ok(struct LDKCommitmentTransaction o);
4753         export function CResult_CommitmentTransactionDecodeErrorZ_ok(o: number): number {
4754                 if(!isWasmInitialized) {
4755                         throw new Error("initializeWasm() must be awaited first!");
4756                 }
4757                 const nativeResponseValue = wasm.TS_CResult_CommitmentTransactionDecodeErrorZ_ok(o);
4758                 return nativeResponseValue;
4759         }
4760         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
4761         export function CResult_CommitmentTransactionDecodeErrorZ_err(e: number): number {
4762                 if(!isWasmInitialized) {
4763                         throw new Error("initializeWasm() must be awaited first!");
4764                 }
4765                 const nativeResponseValue = wasm.TS_CResult_CommitmentTransactionDecodeErrorZ_err(e);
4766                 return nativeResponseValue;
4767         }
4768         // bool CResult_CommitmentTransactionDecodeErrorZ_is_ok(const struct LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR o);
4769         export function CResult_CommitmentTransactionDecodeErrorZ_is_ok(o: number): boolean {
4770                 if(!isWasmInitialized) {
4771                         throw new Error("initializeWasm() must be awaited first!");
4772                 }
4773                 const nativeResponseValue = wasm.TS_CResult_CommitmentTransactionDecodeErrorZ_is_ok(o);
4774                 return nativeResponseValue;
4775         }
4776         // void CResult_CommitmentTransactionDecodeErrorZ_free(struct LDKCResult_CommitmentTransactionDecodeErrorZ _res);
4777         export function CResult_CommitmentTransactionDecodeErrorZ_free(_res: number): void {
4778                 if(!isWasmInitialized) {
4779                         throw new Error("initializeWasm() must be awaited first!");
4780                 }
4781                 const nativeResponseValue = wasm.TS_CResult_CommitmentTransactionDecodeErrorZ_free(_res);
4782                 // debug statements here
4783         }
4784         // uint64_t CResult_CommitmentTransactionDecodeErrorZ_clone_ptr(LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR arg);
4785         export function CResult_CommitmentTransactionDecodeErrorZ_clone_ptr(arg: number): number {
4786                 if(!isWasmInitialized) {
4787                         throw new Error("initializeWasm() must be awaited first!");
4788                 }
4789                 const nativeResponseValue = wasm.TS_CResult_CommitmentTransactionDecodeErrorZ_clone_ptr(arg);
4790                 return nativeResponseValue;
4791         }
4792         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
4793         export function CResult_CommitmentTransactionDecodeErrorZ_clone(orig: number): number {
4794                 if(!isWasmInitialized) {
4795                         throw new Error("initializeWasm() must be awaited first!");
4796                 }
4797                 const nativeResponseValue = wasm.TS_CResult_CommitmentTransactionDecodeErrorZ_clone(orig);
4798                 return nativeResponseValue;
4799         }
4800         // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_ok(struct LDKTrustedCommitmentTransaction o);
4801         export function CResult_TrustedCommitmentTransactionNoneZ_ok(o: number): number {
4802                 if(!isWasmInitialized) {
4803                         throw new Error("initializeWasm() must be awaited first!");
4804                 }
4805                 const nativeResponseValue = wasm.TS_CResult_TrustedCommitmentTransactionNoneZ_ok(o);
4806                 return nativeResponseValue;
4807         }
4808         // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_err(void);
4809         export function CResult_TrustedCommitmentTransactionNoneZ_err(): number {
4810                 if(!isWasmInitialized) {
4811                         throw new Error("initializeWasm() must be awaited first!");
4812                 }
4813                 const nativeResponseValue = wasm.TS_CResult_TrustedCommitmentTransactionNoneZ_err();
4814                 return nativeResponseValue;
4815         }
4816         // bool CResult_TrustedCommitmentTransactionNoneZ_is_ok(const struct LDKCResult_TrustedCommitmentTransactionNoneZ *NONNULL_PTR o);
4817         export function CResult_TrustedCommitmentTransactionNoneZ_is_ok(o: number): boolean {
4818                 if(!isWasmInitialized) {
4819                         throw new Error("initializeWasm() must be awaited first!");
4820                 }
4821                 const nativeResponseValue = wasm.TS_CResult_TrustedCommitmentTransactionNoneZ_is_ok(o);
4822                 return nativeResponseValue;
4823         }
4824         // void CResult_TrustedCommitmentTransactionNoneZ_free(struct LDKCResult_TrustedCommitmentTransactionNoneZ _res);
4825         export function CResult_TrustedCommitmentTransactionNoneZ_free(_res: number): void {
4826                 if(!isWasmInitialized) {
4827                         throw new Error("initializeWasm() must be awaited first!");
4828                 }
4829                 const nativeResponseValue = wasm.TS_CResult_TrustedCommitmentTransactionNoneZ_free(_res);
4830                 // debug statements here
4831         }
4832         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_ok(struct LDKCVec_SignatureZ o);
4833         export function CResult_CVec_SignatureZNoneZ_ok(o: Uint8Array[]): number {
4834                 if(!isWasmInitialized) {
4835                         throw new Error("initializeWasm() must be awaited first!");
4836                 }
4837                 const nativeResponseValue = wasm.TS_CResult_CVec_SignatureZNoneZ_ok(o);
4838                 return nativeResponseValue;
4839         }
4840         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_err(void);
4841         export function CResult_CVec_SignatureZNoneZ_err(): number {
4842                 if(!isWasmInitialized) {
4843                         throw new Error("initializeWasm() must be awaited first!");
4844                 }
4845                 const nativeResponseValue = wasm.TS_CResult_CVec_SignatureZNoneZ_err();
4846                 return nativeResponseValue;
4847         }
4848         // bool CResult_CVec_SignatureZNoneZ_is_ok(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR o);
4849         export function CResult_CVec_SignatureZNoneZ_is_ok(o: number): boolean {
4850                 if(!isWasmInitialized) {
4851                         throw new Error("initializeWasm() must be awaited first!");
4852                 }
4853                 const nativeResponseValue = wasm.TS_CResult_CVec_SignatureZNoneZ_is_ok(o);
4854                 return nativeResponseValue;
4855         }
4856         // void CResult_CVec_SignatureZNoneZ_free(struct LDKCResult_CVec_SignatureZNoneZ _res);
4857         export function CResult_CVec_SignatureZNoneZ_free(_res: number): void {
4858                 if(!isWasmInitialized) {
4859                         throw new Error("initializeWasm() must be awaited first!");
4860                 }
4861                 const nativeResponseValue = wasm.TS_CResult_CVec_SignatureZNoneZ_free(_res);
4862                 // debug statements here
4863         }
4864         // uint64_t CResult_CVec_SignatureZNoneZ_clone_ptr(LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR arg);
4865         export function CResult_CVec_SignatureZNoneZ_clone_ptr(arg: number): number {
4866                 if(!isWasmInitialized) {
4867                         throw new Error("initializeWasm() must be awaited first!");
4868                 }
4869                 const nativeResponseValue = wasm.TS_CResult_CVec_SignatureZNoneZ_clone_ptr(arg);
4870                 return nativeResponseValue;
4871         }
4872         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_clone(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR orig);
4873         export function CResult_CVec_SignatureZNoneZ_clone(orig: number): number {
4874                 if(!isWasmInitialized) {
4875                         throw new Error("initializeWasm() must be awaited first!");
4876                 }
4877                 const nativeResponseValue = wasm.TS_CResult_CVec_SignatureZNoneZ_clone(orig);
4878                 return nativeResponseValue;
4879         }
4880         // struct LDKCResult_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_ok(struct LDKShutdownScript o);
4881         export function CResult_ShutdownScriptDecodeErrorZ_ok(o: number): number {
4882                 if(!isWasmInitialized) {
4883                         throw new Error("initializeWasm() must be awaited first!");
4884                 }
4885                 const nativeResponseValue = wasm.TS_CResult_ShutdownScriptDecodeErrorZ_ok(o);
4886                 return nativeResponseValue;
4887         }
4888         // struct LDKCResult_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_err(struct LDKDecodeError e);
4889         export function CResult_ShutdownScriptDecodeErrorZ_err(e: number): number {
4890                 if(!isWasmInitialized) {
4891                         throw new Error("initializeWasm() must be awaited first!");
4892                 }
4893                 const nativeResponseValue = wasm.TS_CResult_ShutdownScriptDecodeErrorZ_err(e);
4894                 return nativeResponseValue;
4895         }
4896         // bool CResult_ShutdownScriptDecodeErrorZ_is_ok(const struct LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR o);
4897         export function CResult_ShutdownScriptDecodeErrorZ_is_ok(o: number): boolean {
4898                 if(!isWasmInitialized) {
4899                         throw new Error("initializeWasm() must be awaited first!");
4900                 }
4901                 const nativeResponseValue = wasm.TS_CResult_ShutdownScriptDecodeErrorZ_is_ok(o);
4902                 return nativeResponseValue;
4903         }
4904         // void CResult_ShutdownScriptDecodeErrorZ_free(struct LDKCResult_ShutdownScriptDecodeErrorZ _res);
4905         export function CResult_ShutdownScriptDecodeErrorZ_free(_res: number): void {
4906                 if(!isWasmInitialized) {
4907                         throw new Error("initializeWasm() must be awaited first!");
4908                 }
4909                 const nativeResponseValue = wasm.TS_CResult_ShutdownScriptDecodeErrorZ_free(_res);
4910                 // debug statements here
4911         }
4912         // uint64_t CResult_ShutdownScriptDecodeErrorZ_clone_ptr(LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR arg);
4913         export function CResult_ShutdownScriptDecodeErrorZ_clone_ptr(arg: number): number {
4914                 if(!isWasmInitialized) {
4915                         throw new Error("initializeWasm() must be awaited first!");
4916                 }
4917                 const nativeResponseValue = wasm.TS_CResult_ShutdownScriptDecodeErrorZ_clone_ptr(arg);
4918                 return nativeResponseValue;
4919         }
4920         // struct LDKCResult_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_clone(const struct LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR orig);
4921         export function CResult_ShutdownScriptDecodeErrorZ_clone(orig: number): number {
4922                 if(!isWasmInitialized) {
4923                         throw new Error("initializeWasm() must be awaited first!");
4924                 }
4925                 const nativeResponseValue = wasm.TS_CResult_ShutdownScriptDecodeErrorZ_clone(orig);
4926                 return nativeResponseValue;
4927         }
4928         // struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_ok(struct LDKShutdownScript o);
4929         export function CResult_ShutdownScriptInvalidShutdownScriptZ_ok(o: number): number {
4930                 if(!isWasmInitialized) {
4931                         throw new Error("initializeWasm() must be awaited first!");
4932                 }
4933                 const nativeResponseValue = wasm.TS_CResult_ShutdownScriptInvalidShutdownScriptZ_ok(o);
4934                 return nativeResponseValue;
4935         }
4936         // struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_err(struct LDKInvalidShutdownScript e);
4937         export function CResult_ShutdownScriptInvalidShutdownScriptZ_err(e: number): number {
4938                 if(!isWasmInitialized) {
4939                         throw new Error("initializeWasm() must be awaited first!");
4940                 }
4941                 const nativeResponseValue = wasm.TS_CResult_ShutdownScriptInvalidShutdownScriptZ_err(e);
4942                 return nativeResponseValue;
4943         }
4944         // bool CResult_ShutdownScriptInvalidShutdownScriptZ_is_ok(const struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ *NONNULL_PTR o);
4945         export function CResult_ShutdownScriptInvalidShutdownScriptZ_is_ok(o: number): boolean {
4946                 if(!isWasmInitialized) {
4947                         throw new Error("initializeWasm() must be awaited first!");
4948                 }
4949                 const nativeResponseValue = wasm.TS_CResult_ShutdownScriptInvalidShutdownScriptZ_is_ok(o);
4950                 return nativeResponseValue;
4951         }
4952         // void CResult_ShutdownScriptInvalidShutdownScriptZ_free(struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ _res);
4953         export function CResult_ShutdownScriptInvalidShutdownScriptZ_free(_res: number): void {
4954                 if(!isWasmInitialized) {
4955                         throw new Error("initializeWasm() must be awaited first!");
4956                 }
4957                 const nativeResponseValue = wasm.TS_CResult_ShutdownScriptInvalidShutdownScriptZ_free(_res);
4958                 // debug statements here
4959         }
4960         // uint64_t CResult_ShutdownScriptInvalidShutdownScriptZ_clone_ptr(LDKCResult_ShutdownScriptInvalidShutdownScriptZ *NONNULL_PTR arg);
4961         export function CResult_ShutdownScriptInvalidShutdownScriptZ_clone_ptr(arg: number): number {
4962                 if(!isWasmInitialized) {
4963                         throw new Error("initializeWasm() must be awaited first!");
4964                 }
4965                 const nativeResponseValue = wasm.TS_CResult_ShutdownScriptInvalidShutdownScriptZ_clone_ptr(arg);
4966                 return nativeResponseValue;
4967         }
4968         // struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_clone(const struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ *NONNULL_PTR orig);
4969         export function CResult_ShutdownScriptInvalidShutdownScriptZ_clone(orig: number): number {
4970                 if(!isWasmInitialized) {
4971                         throw new Error("initializeWasm() must be awaited first!");
4972                 }
4973                 const nativeResponseValue = wasm.TS_CResult_ShutdownScriptInvalidShutdownScriptZ_clone(orig);
4974                 return nativeResponseValue;
4975         }
4976         // struct LDKCOption_TypeZ COption_TypeZ_some(struct LDKType o);
4977         export function COption_TypeZ_some(o: number): number {
4978                 if(!isWasmInitialized) {
4979                         throw new Error("initializeWasm() must be awaited first!");
4980                 }
4981                 const nativeResponseValue = wasm.TS_COption_TypeZ_some(o);
4982                 return nativeResponseValue;
4983         }
4984         // struct LDKCOption_TypeZ COption_TypeZ_none(void);
4985         export function COption_TypeZ_none(): number {
4986                 if(!isWasmInitialized) {
4987                         throw new Error("initializeWasm() must be awaited first!");
4988                 }
4989                 const nativeResponseValue = wasm.TS_COption_TypeZ_none();
4990                 return nativeResponseValue;
4991         }
4992         // void COption_TypeZ_free(struct LDKCOption_TypeZ _res);
4993         export function COption_TypeZ_free(_res: number): void {
4994                 if(!isWasmInitialized) {
4995                         throw new Error("initializeWasm() must be awaited first!");
4996                 }
4997                 const nativeResponseValue = wasm.TS_COption_TypeZ_free(_res);
4998                 // debug statements here
4999         }
5000         // uint64_t COption_TypeZ_clone_ptr(LDKCOption_TypeZ *NONNULL_PTR arg);
5001         export function COption_TypeZ_clone_ptr(arg: number): number {
5002                 if(!isWasmInitialized) {
5003                         throw new Error("initializeWasm() must be awaited first!");
5004                 }
5005                 const nativeResponseValue = wasm.TS_COption_TypeZ_clone_ptr(arg);
5006                 return nativeResponseValue;
5007         }
5008         // struct LDKCOption_TypeZ COption_TypeZ_clone(const struct LDKCOption_TypeZ *NONNULL_PTR orig);
5009         export function COption_TypeZ_clone(orig: number): number {
5010                 if(!isWasmInitialized) {
5011                         throw new Error("initializeWasm() must be awaited first!");
5012                 }
5013                 const nativeResponseValue = wasm.TS_COption_TypeZ_clone(orig);
5014                 return nativeResponseValue;
5015         }
5016         // struct LDKCResult_COption_TypeZDecodeErrorZ CResult_COption_TypeZDecodeErrorZ_ok(struct LDKCOption_TypeZ o);
5017         export function CResult_COption_TypeZDecodeErrorZ_ok(o: number): number {
5018                 if(!isWasmInitialized) {
5019                         throw new Error("initializeWasm() must be awaited first!");
5020                 }
5021                 const nativeResponseValue = wasm.TS_CResult_COption_TypeZDecodeErrorZ_ok(o);
5022                 return nativeResponseValue;
5023         }
5024         // struct LDKCResult_COption_TypeZDecodeErrorZ CResult_COption_TypeZDecodeErrorZ_err(struct LDKDecodeError e);
5025         export function CResult_COption_TypeZDecodeErrorZ_err(e: number): number {
5026                 if(!isWasmInitialized) {
5027                         throw new Error("initializeWasm() must be awaited first!");
5028                 }
5029                 const nativeResponseValue = wasm.TS_CResult_COption_TypeZDecodeErrorZ_err(e);
5030                 return nativeResponseValue;
5031         }
5032         // bool CResult_COption_TypeZDecodeErrorZ_is_ok(const struct LDKCResult_COption_TypeZDecodeErrorZ *NONNULL_PTR o);
5033         export function CResult_COption_TypeZDecodeErrorZ_is_ok(o: number): boolean {
5034                 if(!isWasmInitialized) {
5035                         throw new Error("initializeWasm() must be awaited first!");
5036                 }
5037                 const nativeResponseValue = wasm.TS_CResult_COption_TypeZDecodeErrorZ_is_ok(o);
5038                 return nativeResponseValue;
5039         }
5040         // void CResult_COption_TypeZDecodeErrorZ_free(struct LDKCResult_COption_TypeZDecodeErrorZ _res);
5041         export function CResult_COption_TypeZDecodeErrorZ_free(_res: number): void {
5042                 if(!isWasmInitialized) {
5043                         throw new Error("initializeWasm() must be awaited first!");
5044                 }
5045                 const nativeResponseValue = wasm.TS_CResult_COption_TypeZDecodeErrorZ_free(_res);
5046                 // debug statements here
5047         }
5048         // uint64_t CResult_COption_TypeZDecodeErrorZ_clone_ptr(LDKCResult_COption_TypeZDecodeErrorZ *NONNULL_PTR arg);
5049         export function CResult_COption_TypeZDecodeErrorZ_clone_ptr(arg: number): number {
5050                 if(!isWasmInitialized) {
5051                         throw new Error("initializeWasm() must be awaited first!");
5052                 }
5053                 const nativeResponseValue = wasm.TS_CResult_COption_TypeZDecodeErrorZ_clone_ptr(arg);
5054                 return nativeResponseValue;
5055         }
5056         // struct LDKCResult_COption_TypeZDecodeErrorZ CResult_COption_TypeZDecodeErrorZ_clone(const struct LDKCResult_COption_TypeZDecodeErrorZ *NONNULL_PTR orig);
5057         export function CResult_COption_TypeZDecodeErrorZ_clone(orig: number): number {
5058                 if(!isWasmInitialized) {
5059                         throw new Error("initializeWasm() must be awaited first!");
5060                 }
5061                 const nativeResponseValue = wasm.TS_CResult_COption_TypeZDecodeErrorZ_clone(orig);
5062                 return nativeResponseValue;
5063         }
5064         // struct LDKCResult_StringErrorZ CResult_StringErrorZ_ok(struct LDKStr o);
5065         export function CResult_StringErrorZ_ok(o: String): number {
5066                 if(!isWasmInitialized) {
5067                         throw new Error("initializeWasm() must be awaited first!");
5068                 }
5069                 const nativeResponseValue = wasm.TS_CResult_StringErrorZ_ok(o);
5070                 return nativeResponseValue;
5071         }
5072         // struct LDKCResult_StringErrorZ CResult_StringErrorZ_err(enum LDKSecp256k1Error e);
5073         export function CResult_StringErrorZ_err(e: Secp256k1Error): number {
5074                 if(!isWasmInitialized) {
5075                         throw new Error("initializeWasm() must be awaited first!");
5076                 }
5077                 const nativeResponseValue = wasm.TS_CResult_StringErrorZ_err(e);
5078                 return nativeResponseValue;
5079         }
5080         // bool CResult_StringErrorZ_is_ok(const struct LDKCResult_StringErrorZ *NONNULL_PTR o);
5081         export function CResult_StringErrorZ_is_ok(o: number): boolean {
5082                 if(!isWasmInitialized) {
5083                         throw new Error("initializeWasm() must be awaited first!");
5084                 }
5085                 const nativeResponseValue = wasm.TS_CResult_StringErrorZ_is_ok(o);
5086                 return nativeResponseValue;
5087         }
5088         // void CResult_StringErrorZ_free(struct LDKCResult_StringErrorZ _res);
5089         export function CResult_StringErrorZ_free(_res: number): void {
5090                 if(!isWasmInitialized) {
5091                         throw new Error("initializeWasm() must be awaited first!");
5092                 }
5093                 const nativeResponseValue = wasm.TS_CResult_StringErrorZ_free(_res);
5094                 // debug statements here
5095         }
5096         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_ok(struct LDKChannelMonitorUpdate o);
5097         export function CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o: number): number {
5098                 if(!isWasmInitialized) {
5099                         throw new Error("initializeWasm() must be awaited first!");
5100                 }
5101                 const nativeResponseValue = wasm.TS_CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o);
5102                 return nativeResponseValue;
5103         }
5104         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_err(struct LDKDecodeError e);
5105         export function CResult_ChannelMonitorUpdateDecodeErrorZ_err(e: number): number {
5106                 if(!isWasmInitialized) {
5107                         throw new Error("initializeWasm() must be awaited first!");
5108                 }
5109                 const nativeResponseValue = wasm.TS_CResult_ChannelMonitorUpdateDecodeErrorZ_err(e);
5110                 return nativeResponseValue;
5111         }
5112         // bool CResult_ChannelMonitorUpdateDecodeErrorZ_is_ok(const struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR o);
5113         export function CResult_ChannelMonitorUpdateDecodeErrorZ_is_ok(o: number): boolean {
5114                 if(!isWasmInitialized) {
5115                         throw new Error("initializeWasm() must be awaited first!");
5116                 }
5117                 const nativeResponseValue = wasm.TS_CResult_ChannelMonitorUpdateDecodeErrorZ_is_ok(o);
5118                 return nativeResponseValue;
5119         }
5120         // void CResult_ChannelMonitorUpdateDecodeErrorZ_free(struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ _res);
5121         export function CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res: number): void {
5122                 if(!isWasmInitialized) {
5123                         throw new Error("initializeWasm() must be awaited first!");
5124                 }
5125                 const nativeResponseValue = wasm.TS_CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res);
5126                 // debug statements here
5127         }
5128         // uint64_t CResult_ChannelMonitorUpdateDecodeErrorZ_clone_ptr(LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR arg);
5129         export function CResult_ChannelMonitorUpdateDecodeErrorZ_clone_ptr(arg: number): number {
5130                 if(!isWasmInitialized) {
5131                         throw new Error("initializeWasm() must be awaited first!");
5132                 }
5133                 const nativeResponseValue = wasm.TS_CResult_ChannelMonitorUpdateDecodeErrorZ_clone_ptr(arg);
5134                 return nativeResponseValue;
5135         }
5136         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR orig);
5137         export function CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig: number): number {
5138                 if(!isWasmInitialized) {
5139                         throw new Error("initializeWasm() must be awaited first!");
5140                 }
5141                 const nativeResponseValue = wasm.TS_CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig);
5142                 return nativeResponseValue;
5143         }
5144         // struct LDKCOption_MonitorEventZ COption_MonitorEventZ_some(struct LDKMonitorEvent o);
5145         export function COption_MonitorEventZ_some(o: number): number {
5146                 if(!isWasmInitialized) {
5147                         throw new Error("initializeWasm() must be awaited first!");
5148                 }
5149                 const nativeResponseValue = wasm.TS_COption_MonitorEventZ_some(o);
5150                 return nativeResponseValue;
5151         }
5152         // struct LDKCOption_MonitorEventZ COption_MonitorEventZ_none(void);
5153         export function COption_MonitorEventZ_none(): number {
5154                 if(!isWasmInitialized) {
5155                         throw new Error("initializeWasm() must be awaited first!");
5156                 }
5157                 const nativeResponseValue = wasm.TS_COption_MonitorEventZ_none();
5158                 return nativeResponseValue;
5159         }
5160         // void COption_MonitorEventZ_free(struct LDKCOption_MonitorEventZ _res);
5161         export function COption_MonitorEventZ_free(_res: number): void {
5162                 if(!isWasmInitialized) {
5163                         throw new Error("initializeWasm() must be awaited first!");
5164                 }
5165                 const nativeResponseValue = wasm.TS_COption_MonitorEventZ_free(_res);
5166                 // debug statements here
5167         }
5168         // uint64_t COption_MonitorEventZ_clone_ptr(LDKCOption_MonitorEventZ *NONNULL_PTR arg);
5169         export function COption_MonitorEventZ_clone_ptr(arg: number): number {
5170                 if(!isWasmInitialized) {
5171                         throw new Error("initializeWasm() must be awaited first!");
5172                 }
5173                 const nativeResponseValue = wasm.TS_COption_MonitorEventZ_clone_ptr(arg);
5174                 return nativeResponseValue;
5175         }
5176         // struct LDKCOption_MonitorEventZ COption_MonitorEventZ_clone(const struct LDKCOption_MonitorEventZ *NONNULL_PTR orig);
5177         export function COption_MonitorEventZ_clone(orig: number): number {
5178                 if(!isWasmInitialized) {
5179                         throw new Error("initializeWasm() must be awaited first!");
5180                 }
5181                 const nativeResponseValue = wasm.TS_COption_MonitorEventZ_clone(orig);
5182                 return nativeResponseValue;
5183         }
5184         // struct LDKCResult_COption_MonitorEventZDecodeErrorZ CResult_COption_MonitorEventZDecodeErrorZ_ok(struct LDKCOption_MonitorEventZ o);
5185         export function CResult_COption_MonitorEventZDecodeErrorZ_ok(o: number): number {
5186                 if(!isWasmInitialized) {
5187                         throw new Error("initializeWasm() must be awaited first!");
5188                 }
5189                 const nativeResponseValue = wasm.TS_CResult_COption_MonitorEventZDecodeErrorZ_ok(o);
5190                 return nativeResponseValue;
5191         }
5192         // struct LDKCResult_COption_MonitorEventZDecodeErrorZ CResult_COption_MonitorEventZDecodeErrorZ_err(struct LDKDecodeError e);
5193         export function CResult_COption_MonitorEventZDecodeErrorZ_err(e: number): number {
5194                 if(!isWasmInitialized) {
5195                         throw new Error("initializeWasm() must be awaited first!");
5196                 }
5197                 const nativeResponseValue = wasm.TS_CResult_COption_MonitorEventZDecodeErrorZ_err(e);
5198                 return nativeResponseValue;
5199         }
5200         // bool CResult_COption_MonitorEventZDecodeErrorZ_is_ok(const struct LDKCResult_COption_MonitorEventZDecodeErrorZ *NONNULL_PTR o);
5201         export function CResult_COption_MonitorEventZDecodeErrorZ_is_ok(o: number): boolean {
5202                 if(!isWasmInitialized) {
5203                         throw new Error("initializeWasm() must be awaited first!");
5204                 }
5205                 const nativeResponseValue = wasm.TS_CResult_COption_MonitorEventZDecodeErrorZ_is_ok(o);
5206                 return nativeResponseValue;
5207         }
5208         // void CResult_COption_MonitorEventZDecodeErrorZ_free(struct LDKCResult_COption_MonitorEventZDecodeErrorZ _res);
5209         export function CResult_COption_MonitorEventZDecodeErrorZ_free(_res: number): void {
5210                 if(!isWasmInitialized) {
5211                         throw new Error("initializeWasm() must be awaited first!");
5212                 }
5213                 const nativeResponseValue = wasm.TS_CResult_COption_MonitorEventZDecodeErrorZ_free(_res);
5214                 // debug statements here
5215         }
5216         // uint64_t CResult_COption_MonitorEventZDecodeErrorZ_clone_ptr(LDKCResult_COption_MonitorEventZDecodeErrorZ *NONNULL_PTR arg);
5217         export function CResult_COption_MonitorEventZDecodeErrorZ_clone_ptr(arg: number): number {
5218                 if(!isWasmInitialized) {
5219                         throw new Error("initializeWasm() must be awaited first!");
5220                 }
5221                 const nativeResponseValue = wasm.TS_CResult_COption_MonitorEventZDecodeErrorZ_clone_ptr(arg);
5222                 return nativeResponseValue;
5223         }
5224         // struct LDKCResult_COption_MonitorEventZDecodeErrorZ CResult_COption_MonitorEventZDecodeErrorZ_clone(const struct LDKCResult_COption_MonitorEventZDecodeErrorZ *NONNULL_PTR orig);
5225         export function CResult_COption_MonitorEventZDecodeErrorZ_clone(orig: number): number {
5226                 if(!isWasmInitialized) {
5227                         throw new Error("initializeWasm() must be awaited first!");
5228                 }
5229                 const nativeResponseValue = wasm.TS_CResult_COption_MonitorEventZDecodeErrorZ_clone(orig);
5230                 return nativeResponseValue;
5231         }
5232         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_ok(struct LDKHTLCUpdate o);
5233         export function CResult_HTLCUpdateDecodeErrorZ_ok(o: number): number {
5234                 if(!isWasmInitialized) {
5235                         throw new Error("initializeWasm() must be awaited first!");
5236                 }
5237                 const nativeResponseValue = wasm.TS_CResult_HTLCUpdateDecodeErrorZ_ok(o);
5238                 return nativeResponseValue;
5239         }
5240         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_err(struct LDKDecodeError e);
5241         export function CResult_HTLCUpdateDecodeErrorZ_err(e: number): number {
5242                 if(!isWasmInitialized) {
5243                         throw new Error("initializeWasm() must be awaited first!");
5244                 }
5245                 const nativeResponseValue = wasm.TS_CResult_HTLCUpdateDecodeErrorZ_err(e);
5246                 return nativeResponseValue;
5247         }
5248         // bool CResult_HTLCUpdateDecodeErrorZ_is_ok(const struct LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR o);
5249         export function CResult_HTLCUpdateDecodeErrorZ_is_ok(o: number): boolean {
5250                 if(!isWasmInitialized) {
5251                         throw new Error("initializeWasm() must be awaited first!");
5252                 }
5253                 const nativeResponseValue = wasm.TS_CResult_HTLCUpdateDecodeErrorZ_is_ok(o);
5254                 return nativeResponseValue;
5255         }
5256         // void CResult_HTLCUpdateDecodeErrorZ_free(struct LDKCResult_HTLCUpdateDecodeErrorZ _res);
5257         export function CResult_HTLCUpdateDecodeErrorZ_free(_res: number): void {
5258                 if(!isWasmInitialized) {
5259                         throw new Error("initializeWasm() must be awaited first!");
5260                 }
5261                 const nativeResponseValue = wasm.TS_CResult_HTLCUpdateDecodeErrorZ_free(_res);
5262                 // debug statements here
5263         }
5264         // uint64_t CResult_HTLCUpdateDecodeErrorZ_clone_ptr(LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR arg);
5265         export function CResult_HTLCUpdateDecodeErrorZ_clone_ptr(arg: number): number {
5266                 if(!isWasmInitialized) {
5267                         throw new Error("initializeWasm() must be awaited first!");
5268                 }
5269                 const nativeResponseValue = wasm.TS_CResult_HTLCUpdateDecodeErrorZ_clone_ptr(arg);
5270                 return nativeResponseValue;
5271         }
5272         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_clone(const struct LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR orig);
5273         export function CResult_HTLCUpdateDecodeErrorZ_clone(orig: number): number {
5274                 if(!isWasmInitialized) {
5275                         throw new Error("initializeWasm() must be awaited first!");
5276                 }
5277                 const nativeResponseValue = wasm.TS_CResult_HTLCUpdateDecodeErrorZ_clone(orig);
5278                 return nativeResponseValue;
5279         }
5280         // struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_ok(void);
5281         export function CResult_NoneNoneZ_ok(): number {
5282                 if(!isWasmInitialized) {
5283                         throw new Error("initializeWasm() must be awaited first!");
5284                 }
5285                 const nativeResponseValue = wasm.TS_CResult_NoneNoneZ_ok();
5286                 return nativeResponseValue;
5287         }
5288         // struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_err(void);
5289         export function CResult_NoneNoneZ_err(): number {
5290                 if(!isWasmInitialized) {
5291                         throw new Error("initializeWasm() must be awaited first!");
5292                 }
5293                 const nativeResponseValue = wasm.TS_CResult_NoneNoneZ_err();
5294                 return nativeResponseValue;
5295         }
5296         // bool CResult_NoneNoneZ_is_ok(const struct LDKCResult_NoneNoneZ *NONNULL_PTR o);
5297         export function CResult_NoneNoneZ_is_ok(o: number): boolean {
5298                 if(!isWasmInitialized) {
5299                         throw new Error("initializeWasm() must be awaited first!");
5300                 }
5301                 const nativeResponseValue = wasm.TS_CResult_NoneNoneZ_is_ok(o);
5302                 return nativeResponseValue;
5303         }
5304         // void CResult_NoneNoneZ_free(struct LDKCResult_NoneNoneZ _res);
5305         export function CResult_NoneNoneZ_free(_res: number): void {
5306                 if(!isWasmInitialized) {
5307                         throw new Error("initializeWasm() must be awaited first!");
5308                 }
5309                 const nativeResponseValue = wasm.TS_CResult_NoneNoneZ_free(_res);
5310                 // debug statements here
5311         }
5312         // uint64_t CResult_NoneNoneZ_clone_ptr(LDKCResult_NoneNoneZ *NONNULL_PTR arg);
5313         export function CResult_NoneNoneZ_clone_ptr(arg: number): number {
5314                 if(!isWasmInitialized) {
5315                         throw new Error("initializeWasm() must be awaited first!");
5316                 }
5317                 const nativeResponseValue = wasm.TS_CResult_NoneNoneZ_clone_ptr(arg);
5318                 return nativeResponseValue;
5319         }
5320         // struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_clone(const struct LDKCResult_NoneNoneZ *NONNULL_PTR orig);
5321         export function CResult_NoneNoneZ_clone(orig: number): number {
5322                 if(!isWasmInitialized) {
5323                         throw new Error("initializeWasm() must be awaited first!");
5324                 }
5325                 const nativeResponseValue = wasm.TS_CResult_NoneNoneZ_clone(orig);
5326                 return nativeResponseValue;
5327         }
5328         // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_new(struct LDKOutPoint a, struct LDKCVec_u8Z b);
5329         export function C2Tuple_OutPointScriptZ_new(a: number, b: Uint8Array): number {
5330                 if(!isWasmInitialized) {
5331                         throw new Error("initializeWasm() must be awaited first!");
5332                 }
5333                 const nativeResponseValue = wasm.TS_C2Tuple_OutPointScriptZ_new(a, encodeUint8Array(b));
5334                 return nativeResponseValue;
5335         }
5336         // void C2Tuple_OutPointScriptZ_free(struct LDKC2Tuple_OutPointScriptZ _res);
5337         export function C2Tuple_OutPointScriptZ_free(_res: number): void {
5338                 if(!isWasmInitialized) {
5339                         throw new Error("initializeWasm() must be awaited first!");
5340                 }
5341                 const nativeResponseValue = wasm.TS_C2Tuple_OutPointScriptZ_free(_res);
5342                 // debug statements here
5343         }
5344         // struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_new(uint32_t a, struct LDKCVec_u8Z b);
5345         export function C2Tuple_u32ScriptZ_new(a: number, b: Uint8Array): number {
5346                 if(!isWasmInitialized) {
5347                         throw new Error("initializeWasm() must be awaited first!");
5348                 }
5349                 const nativeResponseValue = wasm.TS_C2Tuple_u32ScriptZ_new(a, encodeUint8Array(b));
5350                 return nativeResponseValue;
5351         }
5352         // void C2Tuple_u32ScriptZ_free(struct LDKC2Tuple_u32ScriptZ _res);
5353         export function C2Tuple_u32ScriptZ_free(_res: number): void {
5354                 if(!isWasmInitialized) {
5355                         throw new Error("initializeWasm() must be awaited first!");
5356                 }
5357                 const nativeResponseValue = wasm.TS_C2Tuple_u32ScriptZ_free(_res);
5358                 // debug statements here
5359         }
5360         // void CVec_C2Tuple_u32ScriptZZ_free(struct LDKCVec_C2Tuple_u32ScriptZZ _res);
5361         export function CVec_C2Tuple_u32ScriptZZ_free(_res: number[]): void {
5362                 if(!isWasmInitialized) {
5363                         throw new Error("initializeWasm() must be awaited first!");
5364                 }
5365                 const nativeResponseValue = wasm.TS_CVec_C2Tuple_u32ScriptZZ_free(_res);
5366                 // debug statements here
5367         }
5368         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32ScriptZZ b);
5369         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(a: Uint8Array, b: number[]): number {
5370                 if(!isWasmInitialized) {
5371                         throw new Error("initializeWasm() must be awaited first!");
5372                 }
5373                 const nativeResponseValue = wasm.TS_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(encodeUint8Array(a), b);
5374                 return nativeResponseValue;
5375         }
5376         // void C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ _res);
5377         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(_res: number): void {
5378                 if(!isWasmInitialized) {
5379                         throw new Error("initializeWasm() must be awaited first!");
5380                 }
5381                 const nativeResponseValue = wasm.TS_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(_res);
5382                 // debug statements here
5383         }
5384         // void CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ _res);
5385         export function CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res: number[]): void {
5386                 if(!isWasmInitialized) {
5387                         throw new Error("initializeWasm() must be awaited first!");
5388                 }
5389                 const nativeResponseValue = wasm.TS_CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res);
5390                 // debug statements here
5391         }
5392         // void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res);
5393         export function CVec_MonitorEventZ_free(_res: number[]): void {
5394                 if(!isWasmInitialized) {
5395                         throw new Error("initializeWasm() must be awaited first!");
5396                 }
5397                 const nativeResponseValue = wasm.TS_CVec_MonitorEventZ_free(_res);
5398                 // debug statements here
5399         }
5400         // void CVec_EventZ_free(struct LDKCVec_EventZ _res);
5401         export function CVec_EventZ_free(_res: number[]): void {
5402                 if(!isWasmInitialized) {
5403                         throw new Error("initializeWasm() must be awaited first!");
5404                 }
5405                 const nativeResponseValue = wasm.TS_CVec_EventZ_free(_res);
5406                 // debug statements here
5407         }
5408         // void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res);
5409         export function CVec_TransactionZ_free(_res: Uint8Array[]): void {
5410                 if(!isWasmInitialized) {
5411                         throw new Error("initializeWasm() must be awaited first!");
5412                 }
5413                 const nativeResponseValue = wasm.TS_CVec_TransactionZ_free(_res);
5414                 // debug statements here
5415         }
5416         // uint64_t C2Tuple_usizeTransactionZ_clone_ptr(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR arg);
5417         export function C2Tuple_usizeTransactionZ_clone_ptr(arg: number): number {
5418                 if(!isWasmInitialized) {
5419                         throw new Error("initializeWasm() must be awaited first!");
5420                 }
5421                 const nativeResponseValue = wasm.TS_C2Tuple_usizeTransactionZ_clone_ptr(arg);
5422                 return nativeResponseValue;
5423         }
5424         // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_clone(const struct LDKC2Tuple_usizeTransactionZ *NONNULL_PTR orig);
5425         export function C2Tuple_usizeTransactionZ_clone(orig: number): number {
5426                 if(!isWasmInitialized) {
5427                         throw new Error("initializeWasm() must be awaited first!");
5428                 }
5429                 const nativeResponseValue = wasm.TS_C2Tuple_usizeTransactionZ_clone(orig);
5430                 return nativeResponseValue;
5431         }
5432         // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, struct LDKTransaction b);
5433         export function C2Tuple_usizeTransactionZ_new(a: number, b: Uint8Array): number {
5434                 if(!isWasmInitialized) {
5435                         throw new Error("initializeWasm() must be awaited first!");
5436                 }
5437                 const nativeResponseValue = wasm.TS_C2Tuple_usizeTransactionZ_new(a, encodeUint8Array(b));
5438                 return nativeResponseValue;
5439         }
5440         // void C2Tuple_usizeTransactionZ_free(struct LDKC2Tuple_usizeTransactionZ _res);
5441         export function C2Tuple_usizeTransactionZ_free(_res: number): void {
5442                 if(!isWasmInitialized) {
5443                         throw new Error("initializeWasm() must be awaited first!");
5444                 }
5445                 const nativeResponseValue = wasm.TS_C2Tuple_usizeTransactionZ_free(_res);
5446                 // debug statements here
5447         }
5448         // void CVec_C2Tuple_usizeTransactionZZ_free(struct LDKCVec_C2Tuple_usizeTransactionZZ _res);
5449         export function CVec_C2Tuple_usizeTransactionZZ_free(_res: number[]): void {
5450                 if(!isWasmInitialized) {
5451                         throw new Error("initializeWasm() must be awaited first!");
5452                 }
5453                 const nativeResponseValue = wasm.TS_CVec_C2Tuple_usizeTransactionZZ_free(_res);
5454                 // debug statements here
5455         }
5456         // uint64_t C2Tuple_u32TxOutZ_clone_ptr(LDKC2Tuple_u32TxOutZ *NONNULL_PTR arg);
5457         export function C2Tuple_u32TxOutZ_clone_ptr(arg: number): number {
5458                 if(!isWasmInitialized) {
5459                         throw new Error("initializeWasm() must be awaited first!");
5460                 }
5461                 const nativeResponseValue = wasm.TS_C2Tuple_u32TxOutZ_clone_ptr(arg);
5462                 return nativeResponseValue;
5463         }
5464         // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_clone(const struct LDKC2Tuple_u32TxOutZ *NONNULL_PTR orig);
5465         export function C2Tuple_u32TxOutZ_clone(orig: number): number {
5466                 if(!isWasmInitialized) {
5467                         throw new Error("initializeWasm() must be awaited first!");
5468                 }
5469                 const nativeResponseValue = wasm.TS_C2Tuple_u32TxOutZ_clone(orig);
5470                 return nativeResponseValue;
5471         }
5472         // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_new(uint32_t a, struct LDKTxOut b);
5473         export function C2Tuple_u32TxOutZ_new(a: number, b: number): number {
5474                 if(!isWasmInitialized) {
5475                         throw new Error("initializeWasm() must be awaited first!");
5476                 }
5477                 const nativeResponseValue = wasm.TS_C2Tuple_u32TxOutZ_new(a, b);
5478                 return nativeResponseValue;
5479         }
5480         // void C2Tuple_u32TxOutZ_free(struct LDKC2Tuple_u32TxOutZ _res);
5481         export function C2Tuple_u32TxOutZ_free(_res: number): void {
5482                 if(!isWasmInitialized) {
5483                         throw new Error("initializeWasm() must be awaited first!");
5484                 }
5485                 const nativeResponseValue = wasm.TS_C2Tuple_u32TxOutZ_free(_res);
5486                 // debug statements here
5487         }
5488         // void CVec_C2Tuple_u32TxOutZZ_free(struct LDKCVec_C2Tuple_u32TxOutZZ _res);
5489         export function CVec_C2Tuple_u32TxOutZZ_free(_res: number[]): void {
5490                 if(!isWasmInitialized) {
5491                         throw new Error("initializeWasm() must be awaited first!");
5492                 }
5493                 const nativeResponseValue = wasm.TS_CVec_C2Tuple_u32TxOutZZ_free(_res);
5494                 // debug statements here
5495         }
5496         // uint64_t C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone_ptr(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR arg);
5497         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone_ptr(arg: number): number {
5498                 if(!isWasmInitialized) {
5499                         throw new Error("initializeWasm() must be awaited first!");
5500                 }
5501                 const nativeResponseValue = wasm.TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone_ptr(arg);
5502                 return nativeResponseValue;
5503         }
5504         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(const struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR orig);
5505         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig: number): number {
5506                 if(!isWasmInitialized) {
5507                         throw new Error("initializeWasm() must be awaited first!");
5508                 }
5509                 const nativeResponseValue = wasm.TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig);
5510                 return nativeResponseValue;
5511         }
5512         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32TxOutZZ b);
5513         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a: Uint8Array, b: number[]): number {
5514                 if(!isWasmInitialized) {
5515                         throw new Error("initializeWasm() must be awaited first!");
5516                 }
5517                 const nativeResponseValue = wasm.TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(encodeUint8Array(a), b);
5518                 return nativeResponseValue;
5519         }
5520         // void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res);
5521         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res: number): void {
5522                 if(!isWasmInitialized) {
5523                         throw new Error("initializeWasm() must be awaited first!");
5524                 }
5525                 const nativeResponseValue = wasm.TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res);
5526                 // debug statements here
5527         }
5528         // void CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ _res);
5529         export function CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res: number[]): void {
5530                 if(!isWasmInitialized) {
5531                         throw new Error("initializeWasm() must be awaited first!");
5532                 }
5533                 const nativeResponseValue = wasm.TS_CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res);
5534                 // debug statements here
5535         }
5536         // void CVec_TxidZ_free(struct LDKCVec_TxidZ _res);
5537         export function CVec_TxidZ_free(_res: Uint8Array[]): void {
5538                 if(!isWasmInitialized) {
5539                         throw new Error("initializeWasm() must be awaited first!");
5540                 }
5541                 const nativeResponseValue = wasm.TS_CVec_TxidZ_free(_res);
5542                 // debug statements here
5543         }
5544         // void CVec_BalanceZ_free(struct LDKCVec_BalanceZ _res);
5545         export function CVec_BalanceZ_free(_res: number[]): void {
5546                 if(!isWasmInitialized) {
5547                         throw new Error("initializeWasm() must be awaited first!");
5548                 }
5549                 const nativeResponseValue = wasm.TS_CVec_BalanceZ_free(_res);
5550                 // debug statements here
5551         }
5552         // uint64_t C2Tuple_BlockHashChannelMonitorZ_clone_ptr(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR arg);
5553         export function C2Tuple_BlockHashChannelMonitorZ_clone_ptr(arg: number): number {
5554                 if(!isWasmInitialized) {
5555                         throw new Error("initializeWasm() must be awaited first!");
5556                 }
5557                 const nativeResponseValue = wasm.TS_C2Tuple_BlockHashChannelMonitorZ_clone_ptr(arg);
5558                 return nativeResponseValue;
5559         }
5560         // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_clone(const struct LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR orig);
5561         export function C2Tuple_BlockHashChannelMonitorZ_clone(orig: number): number {
5562                 if(!isWasmInitialized) {
5563                         throw new Error("initializeWasm() must be awaited first!");
5564                 }
5565                 const nativeResponseValue = wasm.TS_C2Tuple_BlockHashChannelMonitorZ_clone(orig);
5566                 return nativeResponseValue;
5567         }
5568         // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b);
5569         export function C2Tuple_BlockHashChannelMonitorZ_new(a: Uint8Array, b: number): number {
5570                 if(!isWasmInitialized) {
5571                         throw new Error("initializeWasm() must be awaited first!");
5572                 }
5573                 const nativeResponseValue = wasm.TS_C2Tuple_BlockHashChannelMonitorZ_new(encodeUint8Array(a), b);
5574                 return nativeResponseValue;
5575         }
5576         // void C2Tuple_BlockHashChannelMonitorZ_free(struct LDKC2Tuple_BlockHashChannelMonitorZ _res);
5577         export function C2Tuple_BlockHashChannelMonitorZ_free(_res: number): void {
5578                 if(!isWasmInitialized) {
5579                         throw new Error("initializeWasm() must be awaited first!");
5580                 }
5581                 const nativeResponseValue = wasm.TS_C2Tuple_BlockHashChannelMonitorZ_free(_res);
5582                 // debug statements here
5583         }
5584         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelMonitorZ o);
5585         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o: number): number {
5586                 if(!isWasmInitialized) {
5587                         throw new Error("initializeWasm() must be awaited first!");
5588                 }
5589                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o);
5590                 return nativeResponseValue;
5591         }
5592         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(struct LDKDecodeError e);
5593         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e: number): number {
5594                 if(!isWasmInitialized) {
5595                         throw new Error("initializeWasm() must be awaited first!");
5596                 }
5597                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e);
5598                 return nativeResponseValue;
5599         }
5600         // bool CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_is_ok(const struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR o);
5601         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_is_ok(o: number): boolean {
5602                 if(!isWasmInitialized) {
5603                         throw new Error("initializeWasm() must be awaited first!");
5604                 }
5605                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_is_ok(o);
5606                 return nativeResponseValue;
5607         }
5608         // void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res);
5609         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res: number): void {
5610                 if(!isWasmInitialized) {
5611                         throw new Error("initializeWasm() must be awaited first!");
5612                 }
5613                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res);
5614                 // debug statements here
5615         }
5616         // uint64_t CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone_ptr(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR arg);
5617         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone_ptr(arg: number): number {
5618                 if(!isWasmInitialized) {
5619                         throw new Error("initializeWasm() must be awaited first!");
5620                 }
5621                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone_ptr(arg);
5622                 return nativeResponseValue;
5623         }
5624         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(const struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR orig);
5625         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(orig: number): number {
5626                 if(!isWasmInitialized) {
5627                         throw new Error("initializeWasm() must be awaited first!");
5628                 }
5629                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(orig);
5630                 return nativeResponseValue;
5631         }
5632         // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_ok(struct LDKRouteHop o);
5633         export function CResult_RouteHopDecodeErrorZ_ok(o: number): number {
5634                 if(!isWasmInitialized) {
5635                         throw new Error("initializeWasm() must be awaited first!");
5636                 }
5637                 const nativeResponseValue = wasm.TS_CResult_RouteHopDecodeErrorZ_ok(o);
5638                 return nativeResponseValue;
5639         }
5640         // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_err(struct LDKDecodeError e);
5641         export function CResult_RouteHopDecodeErrorZ_err(e: number): number {
5642                 if(!isWasmInitialized) {
5643                         throw new Error("initializeWasm() must be awaited first!");
5644                 }
5645                 const nativeResponseValue = wasm.TS_CResult_RouteHopDecodeErrorZ_err(e);
5646                 return nativeResponseValue;
5647         }
5648         // bool CResult_RouteHopDecodeErrorZ_is_ok(const struct LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR o);
5649         export function CResult_RouteHopDecodeErrorZ_is_ok(o: number): boolean {
5650                 if(!isWasmInitialized) {
5651                         throw new Error("initializeWasm() must be awaited first!");
5652                 }
5653                 const nativeResponseValue = wasm.TS_CResult_RouteHopDecodeErrorZ_is_ok(o);
5654                 return nativeResponseValue;
5655         }
5656         // void CResult_RouteHopDecodeErrorZ_free(struct LDKCResult_RouteHopDecodeErrorZ _res);
5657         export function CResult_RouteHopDecodeErrorZ_free(_res: number): void {
5658                 if(!isWasmInitialized) {
5659                         throw new Error("initializeWasm() must be awaited first!");
5660                 }
5661                 const nativeResponseValue = wasm.TS_CResult_RouteHopDecodeErrorZ_free(_res);
5662                 // debug statements here
5663         }
5664         // uint64_t CResult_RouteHopDecodeErrorZ_clone_ptr(LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR arg);
5665         export function CResult_RouteHopDecodeErrorZ_clone_ptr(arg: number): number {
5666                 if(!isWasmInitialized) {
5667                         throw new Error("initializeWasm() must be awaited first!");
5668                 }
5669                 const nativeResponseValue = wasm.TS_CResult_RouteHopDecodeErrorZ_clone_ptr(arg);
5670                 return nativeResponseValue;
5671         }
5672         // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_clone(const struct LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR orig);
5673         export function CResult_RouteHopDecodeErrorZ_clone(orig: number): number {
5674                 if(!isWasmInitialized) {
5675                         throw new Error("initializeWasm() must be awaited first!");
5676                 }
5677                 const nativeResponseValue = wasm.TS_CResult_RouteHopDecodeErrorZ_clone(orig);
5678                 return nativeResponseValue;
5679         }
5680         // void CVec_RouteHopZ_free(struct LDKCVec_RouteHopZ _res);
5681         export function CVec_RouteHopZ_free(_res: number[]): void {
5682                 if(!isWasmInitialized) {
5683                         throw new Error("initializeWasm() must be awaited first!");
5684                 }
5685                 const nativeResponseValue = wasm.TS_CVec_RouteHopZ_free(_res);
5686                 // debug statements here
5687         }
5688         // void CVec_CVec_RouteHopZZ_free(struct LDKCVec_CVec_RouteHopZZ _res);
5689         export function CVec_CVec_RouteHopZZ_free(_res: number[][]): void {
5690                 if(!isWasmInitialized) {
5691                         throw new Error("initializeWasm() must be awaited first!");
5692                 }
5693                 const nativeResponseValue = wasm.TS_CVec_CVec_RouteHopZZ_free(_res);
5694                 // debug statements here
5695         }
5696         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_ok(struct LDKRoute o);
5697         export function CResult_RouteDecodeErrorZ_ok(o: number): number {
5698                 if(!isWasmInitialized) {
5699                         throw new Error("initializeWasm() must be awaited first!");
5700                 }
5701                 const nativeResponseValue = wasm.TS_CResult_RouteDecodeErrorZ_ok(o);
5702                 return nativeResponseValue;
5703         }
5704         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_err(struct LDKDecodeError e);
5705         export function CResult_RouteDecodeErrorZ_err(e: number): number {
5706                 if(!isWasmInitialized) {
5707                         throw new Error("initializeWasm() must be awaited first!");
5708                 }
5709                 const nativeResponseValue = wasm.TS_CResult_RouteDecodeErrorZ_err(e);
5710                 return nativeResponseValue;
5711         }
5712         // bool CResult_RouteDecodeErrorZ_is_ok(const struct LDKCResult_RouteDecodeErrorZ *NONNULL_PTR o);
5713         export function CResult_RouteDecodeErrorZ_is_ok(o: number): boolean {
5714                 if(!isWasmInitialized) {
5715                         throw new Error("initializeWasm() must be awaited first!");
5716                 }
5717                 const nativeResponseValue = wasm.TS_CResult_RouteDecodeErrorZ_is_ok(o);
5718                 return nativeResponseValue;
5719         }
5720         // void CResult_RouteDecodeErrorZ_free(struct LDKCResult_RouteDecodeErrorZ _res);
5721         export function CResult_RouteDecodeErrorZ_free(_res: number): void {
5722                 if(!isWasmInitialized) {
5723                         throw new Error("initializeWasm() must be awaited first!");
5724                 }
5725                 const nativeResponseValue = wasm.TS_CResult_RouteDecodeErrorZ_free(_res);
5726                 // debug statements here
5727         }
5728         // uint64_t CResult_RouteDecodeErrorZ_clone_ptr(LDKCResult_RouteDecodeErrorZ *NONNULL_PTR arg);
5729         export function CResult_RouteDecodeErrorZ_clone_ptr(arg: number): number {
5730                 if(!isWasmInitialized) {
5731                         throw new Error("initializeWasm() must be awaited first!");
5732                 }
5733                 const nativeResponseValue = wasm.TS_CResult_RouteDecodeErrorZ_clone_ptr(arg);
5734                 return nativeResponseValue;
5735         }
5736         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_clone(const struct LDKCResult_RouteDecodeErrorZ *NONNULL_PTR orig);
5737         export function CResult_RouteDecodeErrorZ_clone(orig: number): number {
5738                 if(!isWasmInitialized) {
5739                         throw new Error("initializeWasm() must be awaited first!");
5740                 }
5741                 const nativeResponseValue = wasm.TS_CResult_RouteDecodeErrorZ_clone(orig);
5742                 return nativeResponseValue;
5743         }
5744         // struct LDKCResult_RouteParametersDecodeErrorZ CResult_RouteParametersDecodeErrorZ_ok(struct LDKRouteParameters o);
5745         export function CResult_RouteParametersDecodeErrorZ_ok(o: number): number {
5746                 if(!isWasmInitialized) {
5747                         throw new Error("initializeWasm() must be awaited first!");
5748                 }
5749                 const nativeResponseValue = wasm.TS_CResult_RouteParametersDecodeErrorZ_ok(o);
5750                 return nativeResponseValue;
5751         }
5752         // struct LDKCResult_RouteParametersDecodeErrorZ CResult_RouteParametersDecodeErrorZ_err(struct LDKDecodeError e);
5753         export function CResult_RouteParametersDecodeErrorZ_err(e: number): number {
5754                 if(!isWasmInitialized) {
5755                         throw new Error("initializeWasm() must be awaited first!");
5756                 }
5757                 const nativeResponseValue = wasm.TS_CResult_RouteParametersDecodeErrorZ_err(e);
5758                 return nativeResponseValue;
5759         }
5760         // bool CResult_RouteParametersDecodeErrorZ_is_ok(const struct LDKCResult_RouteParametersDecodeErrorZ *NONNULL_PTR o);
5761         export function CResult_RouteParametersDecodeErrorZ_is_ok(o: number): boolean {
5762                 if(!isWasmInitialized) {
5763                         throw new Error("initializeWasm() must be awaited first!");
5764                 }
5765                 const nativeResponseValue = wasm.TS_CResult_RouteParametersDecodeErrorZ_is_ok(o);
5766                 return nativeResponseValue;
5767         }
5768         // void CResult_RouteParametersDecodeErrorZ_free(struct LDKCResult_RouteParametersDecodeErrorZ _res);
5769         export function CResult_RouteParametersDecodeErrorZ_free(_res: number): void {
5770                 if(!isWasmInitialized) {
5771                         throw new Error("initializeWasm() must be awaited first!");
5772                 }
5773                 const nativeResponseValue = wasm.TS_CResult_RouteParametersDecodeErrorZ_free(_res);
5774                 // debug statements here
5775         }
5776         // uint64_t CResult_RouteParametersDecodeErrorZ_clone_ptr(LDKCResult_RouteParametersDecodeErrorZ *NONNULL_PTR arg);
5777         export function CResult_RouteParametersDecodeErrorZ_clone_ptr(arg: number): number {
5778                 if(!isWasmInitialized) {
5779                         throw new Error("initializeWasm() must be awaited first!");
5780                 }
5781                 const nativeResponseValue = wasm.TS_CResult_RouteParametersDecodeErrorZ_clone_ptr(arg);
5782                 return nativeResponseValue;
5783         }
5784         // struct LDKCResult_RouteParametersDecodeErrorZ CResult_RouteParametersDecodeErrorZ_clone(const struct LDKCResult_RouteParametersDecodeErrorZ *NONNULL_PTR orig);
5785         export function CResult_RouteParametersDecodeErrorZ_clone(orig: number): number {
5786                 if(!isWasmInitialized) {
5787                         throw new Error("initializeWasm() must be awaited first!");
5788                 }
5789                 const nativeResponseValue = wasm.TS_CResult_RouteParametersDecodeErrorZ_clone(orig);
5790                 return nativeResponseValue;
5791         }
5792         // void CVec_RouteHintZ_free(struct LDKCVec_RouteHintZ _res);
5793         export function CVec_RouteHintZ_free(_res: number[]): void {
5794                 if(!isWasmInitialized) {
5795                         throw new Error("initializeWasm() must be awaited first!");
5796                 }
5797                 const nativeResponseValue = wasm.TS_CVec_RouteHintZ_free(_res);
5798                 // debug statements here
5799         }
5800         // struct LDKCOption_u64Z COption_u64Z_some(uint64_t o);
5801         export function COption_u64Z_some(o: number): number {
5802                 if(!isWasmInitialized) {
5803                         throw new Error("initializeWasm() must be awaited first!");
5804                 }
5805                 const nativeResponseValue = wasm.TS_COption_u64Z_some(o);
5806                 return nativeResponseValue;
5807         }
5808         // struct LDKCOption_u64Z COption_u64Z_none(void);
5809         export function COption_u64Z_none(): number {
5810                 if(!isWasmInitialized) {
5811                         throw new Error("initializeWasm() must be awaited first!");
5812                 }
5813                 const nativeResponseValue = wasm.TS_COption_u64Z_none();
5814                 return nativeResponseValue;
5815         }
5816         // void COption_u64Z_free(struct LDKCOption_u64Z _res);
5817         export function COption_u64Z_free(_res: number): void {
5818                 if(!isWasmInitialized) {
5819                         throw new Error("initializeWasm() must be awaited first!");
5820                 }
5821                 const nativeResponseValue = wasm.TS_COption_u64Z_free(_res);
5822                 // debug statements here
5823         }
5824         // uint64_t COption_u64Z_clone_ptr(LDKCOption_u64Z *NONNULL_PTR arg);
5825         export function COption_u64Z_clone_ptr(arg: number): number {
5826                 if(!isWasmInitialized) {
5827                         throw new Error("initializeWasm() must be awaited first!");
5828                 }
5829                 const nativeResponseValue = wasm.TS_COption_u64Z_clone_ptr(arg);
5830                 return nativeResponseValue;
5831         }
5832         // struct LDKCOption_u64Z COption_u64Z_clone(const struct LDKCOption_u64Z *NONNULL_PTR orig);
5833         export function COption_u64Z_clone(orig: number): number {
5834                 if(!isWasmInitialized) {
5835                         throw new Error("initializeWasm() must be awaited first!");
5836                 }
5837                 const nativeResponseValue = wasm.TS_COption_u64Z_clone(orig);
5838                 return nativeResponseValue;
5839         }
5840         // struct LDKCResult_PayeeDecodeErrorZ CResult_PayeeDecodeErrorZ_ok(struct LDKPayee o);
5841         export function CResult_PayeeDecodeErrorZ_ok(o: number): number {
5842                 if(!isWasmInitialized) {
5843                         throw new Error("initializeWasm() must be awaited first!");
5844                 }
5845                 const nativeResponseValue = wasm.TS_CResult_PayeeDecodeErrorZ_ok(o);
5846                 return nativeResponseValue;
5847         }
5848         // struct LDKCResult_PayeeDecodeErrorZ CResult_PayeeDecodeErrorZ_err(struct LDKDecodeError e);
5849         export function CResult_PayeeDecodeErrorZ_err(e: number): number {
5850                 if(!isWasmInitialized) {
5851                         throw new Error("initializeWasm() must be awaited first!");
5852                 }
5853                 const nativeResponseValue = wasm.TS_CResult_PayeeDecodeErrorZ_err(e);
5854                 return nativeResponseValue;
5855         }
5856         // bool CResult_PayeeDecodeErrorZ_is_ok(const struct LDKCResult_PayeeDecodeErrorZ *NONNULL_PTR o);
5857         export function CResult_PayeeDecodeErrorZ_is_ok(o: number): boolean {
5858                 if(!isWasmInitialized) {
5859                         throw new Error("initializeWasm() must be awaited first!");
5860                 }
5861                 const nativeResponseValue = wasm.TS_CResult_PayeeDecodeErrorZ_is_ok(o);
5862                 return nativeResponseValue;
5863         }
5864         // void CResult_PayeeDecodeErrorZ_free(struct LDKCResult_PayeeDecodeErrorZ _res);
5865         export function CResult_PayeeDecodeErrorZ_free(_res: number): void {
5866                 if(!isWasmInitialized) {
5867                         throw new Error("initializeWasm() must be awaited first!");
5868                 }
5869                 const nativeResponseValue = wasm.TS_CResult_PayeeDecodeErrorZ_free(_res);
5870                 // debug statements here
5871         }
5872         // uint64_t CResult_PayeeDecodeErrorZ_clone_ptr(LDKCResult_PayeeDecodeErrorZ *NONNULL_PTR arg);
5873         export function CResult_PayeeDecodeErrorZ_clone_ptr(arg: number): number {
5874                 if(!isWasmInitialized) {
5875                         throw new Error("initializeWasm() must be awaited first!");
5876                 }
5877                 const nativeResponseValue = wasm.TS_CResult_PayeeDecodeErrorZ_clone_ptr(arg);
5878                 return nativeResponseValue;
5879         }
5880         // struct LDKCResult_PayeeDecodeErrorZ CResult_PayeeDecodeErrorZ_clone(const struct LDKCResult_PayeeDecodeErrorZ *NONNULL_PTR orig);
5881         export function CResult_PayeeDecodeErrorZ_clone(orig: number): number {
5882                 if(!isWasmInitialized) {
5883                         throw new Error("initializeWasm() must be awaited first!");
5884                 }
5885                 const nativeResponseValue = wasm.TS_CResult_PayeeDecodeErrorZ_clone(orig);
5886                 return nativeResponseValue;
5887         }
5888         // void CVec_RouteHintHopZ_free(struct LDKCVec_RouteHintHopZ _res);
5889         export function CVec_RouteHintHopZ_free(_res: number[]): void {
5890                 if(!isWasmInitialized) {
5891                         throw new Error("initializeWasm() must be awaited first!");
5892                 }
5893                 const nativeResponseValue = wasm.TS_CVec_RouteHintHopZ_free(_res);
5894                 // debug statements here
5895         }
5896         // struct LDKCResult_RouteHintDecodeErrorZ CResult_RouteHintDecodeErrorZ_ok(struct LDKRouteHint o);
5897         export function CResult_RouteHintDecodeErrorZ_ok(o: number): number {
5898                 if(!isWasmInitialized) {
5899                         throw new Error("initializeWasm() must be awaited first!");
5900                 }
5901                 const nativeResponseValue = wasm.TS_CResult_RouteHintDecodeErrorZ_ok(o);
5902                 return nativeResponseValue;
5903         }
5904         // struct LDKCResult_RouteHintDecodeErrorZ CResult_RouteHintDecodeErrorZ_err(struct LDKDecodeError e);
5905         export function CResult_RouteHintDecodeErrorZ_err(e: number): number {
5906                 if(!isWasmInitialized) {
5907                         throw new Error("initializeWasm() must be awaited first!");
5908                 }
5909                 const nativeResponseValue = wasm.TS_CResult_RouteHintDecodeErrorZ_err(e);
5910                 return nativeResponseValue;
5911         }
5912         // bool CResult_RouteHintDecodeErrorZ_is_ok(const struct LDKCResult_RouteHintDecodeErrorZ *NONNULL_PTR o);
5913         export function CResult_RouteHintDecodeErrorZ_is_ok(o: number): boolean {
5914                 if(!isWasmInitialized) {
5915                         throw new Error("initializeWasm() must be awaited first!");
5916                 }
5917                 const nativeResponseValue = wasm.TS_CResult_RouteHintDecodeErrorZ_is_ok(o);
5918                 return nativeResponseValue;
5919         }
5920         // void CResult_RouteHintDecodeErrorZ_free(struct LDKCResult_RouteHintDecodeErrorZ _res);
5921         export function CResult_RouteHintDecodeErrorZ_free(_res: number): void {
5922                 if(!isWasmInitialized) {
5923                         throw new Error("initializeWasm() must be awaited first!");
5924                 }
5925                 const nativeResponseValue = wasm.TS_CResult_RouteHintDecodeErrorZ_free(_res);
5926                 // debug statements here
5927         }
5928         // uint64_t CResult_RouteHintDecodeErrorZ_clone_ptr(LDKCResult_RouteHintDecodeErrorZ *NONNULL_PTR arg);
5929         export function CResult_RouteHintDecodeErrorZ_clone_ptr(arg: number): number {
5930                 if(!isWasmInitialized) {
5931                         throw new Error("initializeWasm() must be awaited first!");
5932                 }
5933                 const nativeResponseValue = wasm.TS_CResult_RouteHintDecodeErrorZ_clone_ptr(arg);
5934                 return nativeResponseValue;
5935         }
5936         // struct LDKCResult_RouteHintDecodeErrorZ CResult_RouteHintDecodeErrorZ_clone(const struct LDKCResult_RouteHintDecodeErrorZ *NONNULL_PTR orig);
5937         export function CResult_RouteHintDecodeErrorZ_clone(orig: number): number {
5938                 if(!isWasmInitialized) {
5939                         throw new Error("initializeWasm() must be awaited first!");
5940                 }
5941                 const nativeResponseValue = wasm.TS_CResult_RouteHintDecodeErrorZ_clone(orig);
5942                 return nativeResponseValue;
5943         }
5944         // struct LDKCResult_RouteHintHopDecodeErrorZ CResult_RouteHintHopDecodeErrorZ_ok(struct LDKRouteHintHop o);
5945         export function CResult_RouteHintHopDecodeErrorZ_ok(o: number): number {
5946                 if(!isWasmInitialized) {
5947                         throw new Error("initializeWasm() must be awaited first!");
5948                 }
5949                 const nativeResponseValue = wasm.TS_CResult_RouteHintHopDecodeErrorZ_ok(o);
5950                 return nativeResponseValue;
5951         }
5952         // struct LDKCResult_RouteHintHopDecodeErrorZ CResult_RouteHintHopDecodeErrorZ_err(struct LDKDecodeError e);
5953         export function CResult_RouteHintHopDecodeErrorZ_err(e: number): number {
5954                 if(!isWasmInitialized) {
5955                         throw new Error("initializeWasm() must be awaited first!");
5956                 }
5957                 const nativeResponseValue = wasm.TS_CResult_RouteHintHopDecodeErrorZ_err(e);
5958                 return nativeResponseValue;
5959         }
5960         // bool CResult_RouteHintHopDecodeErrorZ_is_ok(const struct LDKCResult_RouteHintHopDecodeErrorZ *NONNULL_PTR o);
5961         export function CResult_RouteHintHopDecodeErrorZ_is_ok(o: number): boolean {
5962                 if(!isWasmInitialized) {
5963                         throw new Error("initializeWasm() must be awaited first!");
5964                 }
5965                 const nativeResponseValue = wasm.TS_CResult_RouteHintHopDecodeErrorZ_is_ok(o);
5966                 return nativeResponseValue;
5967         }
5968         // void CResult_RouteHintHopDecodeErrorZ_free(struct LDKCResult_RouteHintHopDecodeErrorZ _res);
5969         export function CResult_RouteHintHopDecodeErrorZ_free(_res: number): void {
5970                 if(!isWasmInitialized) {
5971                         throw new Error("initializeWasm() must be awaited first!");
5972                 }
5973                 const nativeResponseValue = wasm.TS_CResult_RouteHintHopDecodeErrorZ_free(_res);
5974                 // debug statements here
5975         }
5976         // uint64_t CResult_RouteHintHopDecodeErrorZ_clone_ptr(LDKCResult_RouteHintHopDecodeErrorZ *NONNULL_PTR arg);
5977         export function CResult_RouteHintHopDecodeErrorZ_clone_ptr(arg: number): number {
5978                 if(!isWasmInitialized) {
5979                         throw new Error("initializeWasm() must be awaited first!");
5980                 }
5981                 const nativeResponseValue = wasm.TS_CResult_RouteHintHopDecodeErrorZ_clone_ptr(arg);
5982                 return nativeResponseValue;
5983         }
5984         // struct LDKCResult_RouteHintHopDecodeErrorZ CResult_RouteHintHopDecodeErrorZ_clone(const struct LDKCResult_RouteHintHopDecodeErrorZ *NONNULL_PTR orig);
5985         export function CResult_RouteHintHopDecodeErrorZ_clone(orig: number): number {
5986                 if(!isWasmInitialized) {
5987                         throw new Error("initializeWasm() must be awaited first!");
5988                 }
5989                 const nativeResponseValue = wasm.TS_CResult_RouteHintHopDecodeErrorZ_clone(orig);
5990                 return nativeResponseValue;
5991         }
5992         // void CVec_ChannelDetailsZ_free(struct LDKCVec_ChannelDetailsZ _res);
5993         export function CVec_ChannelDetailsZ_free(_res: number[]): void {
5994                 if(!isWasmInitialized) {
5995                         throw new Error("initializeWasm() must be awaited first!");
5996                 }
5997                 const nativeResponseValue = wasm.TS_CVec_ChannelDetailsZ_free(_res);
5998                 // debug statements here
5999         }
6000         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_ok(struct LDKRoute o);
6001         export function CResult_RouteLightningErrorZ_ok(o: number): number {
6002                 if(!isWasmInitialized) {
6003                         throw new Error("initializeWasm() must be awaited first!");
6004                 }
6005                 const nativeResponseValue = wasm.TS_CResult_RouteLightningErrorZ_ok(o);
6006                 return nativeResponseValue;
6007         }
6008         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_err(struct LDKLightningError e);
6009         export function CResult_RouteLightningErrorZ_err(e: number): number {
6010                 if(!isWasmInitialized) {
6011                         throw new Error("initializeWasm() must be awaited first!");
6012                 }
6013                 const nativeResponseValue = wasm.TS_CResult_RouteLightningErrorZ_err(e);
6014                 return nativeResponseValue;
6015         }
6016         // bool CResult_RouteLightningErrorZ_is_ok(const struct LDKCResult_RouteLightningErrorZ *NONNULL_PTR o);
6017         export function CResult_RouteLightningErrorZ_is_ok(o: number): boolean {
6018                 if(!isWasmInitialized) {
6019                         throw new Error("initializeWasm() must be awaited first!");
6020                 }
6021                 const nativeResponseValue = wasm.TS_CResult_RouteLightningErrorZ_is_ok(o);
6022                 return nativeResponseValue;
6023         }
6024         // void CResult_RouteLightningErrorZ_free(struct LDKCResult_RouteLightningErrorZ _res);
6025         export function CResult_RouteLightningErrorZ_free(_res: number): void {
6026                 if(!isWasmInitialized) {
6027                         throw new Error("initializeWasm() must be awaited first!");
6028                 }
6029                 const nativeResponseValue = wasm.TS_CResult_RouteLightningErrorZ_free(_res);
6030                 // debug statements here
6031         }
6032         // uint64_t CResult_RouteLightningErrorZ_clone_ptr(LDKCResult_RouteLightningErrorZ *NONNULL_PTR arg);
6033         export function CResult_RouteLightningErrorZ_clone_ptr(arg: number): number {
6034                 if(!isWasmInitialized) {
6035                         throw new Error("initializeWasm() must be awaited first!");
6036                 }
6037                 const nativeResponseValue = wasm.TS_CResult_RouteLightningErrorZ_clone_ptr(arg);
6038                 return nativeResponseValue;
6039         }
6040         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_clone(const struct LDKCResult_RouteLightningErrorZ *NONNULL_PTR orig);
6041         export function CResult_RouteLightningErrorZ_clone(orig: number): number {
6042                 if(!isWasmInitialized) {
6043                         throw new Error("initializeWasm() must be awaited first!");
6044                 }
6045                 const nativeResponseValue = wasm.TS_CResult_RouteLightningErrorZ_clone(orig);
6046                 return nativeResponseValue;
6047         }
6048         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_ok(void);
6049         export function CResult_NoneLightningErrorZ_ok(): number {
6050                 if(!isWasmInitialized) {
6051                         throw new Error("initializeWasm() must be awaited first!");
6052                 }
6053                 const nativeResponseValue = wasm.TS_CResult_NoneLightningErrorZ_ok();
6054                 return nativeResponseValue;
6055         }
6056         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_err(struct LDKLightningError e);
6057         export function CResult_NoneLightningErrorZ_err(e: number): number {
6058                 if(!isWasmInitialized) {
6059                         throw new Error("initializeWasm() must be awaited first!");
6060                 }
6061                 const nativeResponseValue = wasm.TS_CResult_NoneLightningErrorZ_err(e);
6062                 return nativeResponseValue;
6063         }
6064         // bool CResult_NoneLightningErrorZ_is_ok(const struct LDKCResult_NoneLightningErrorZ *NONNULL_PTR o);
6065         export function CResult_NoneLightningErrorZ_is_ok(o: number): boolean {
6066                 if(!isWasmInitialized) {
6067                         throw new Error("initializeWasm() must be awaited first!");
6068                 }
6069                 const nativeResponseValue = wasm.TS_CResult_NoneLightningErrorZ_is_ok(o);
6070                 return nativeResponseValue;
6071         }
6072         // void CResult_NoneLightningErrorZ_free(struct LDKCResult_NoneLightningErrorZ _res);
6073         export function CResult_NoneLightningErrorZ_free(_res: number): void {
6074                 if(!isWasmInitialized) {
6075                         throw new Error("initializeWasm() must be awaited first!");
6076                 }
6077                 const nativeResponseValue = wasm.TS_CResult_NoneLightningErrorZ_free(_res);
6078                 // debug statements here
6079         }
6080         // uint64_t CResult_NoneLightningErrorZ_clone_ptr(LDKCResult_NoneLightningErrorZ *NONNULL_PTR arg);
6081         export function CResult_NoneLightningErrorZ_clone_ptr(arg: number): number {
6082                 if(!isWasmInitialized) {
6083                         throw new Error("initializeWasm() must be awaited first!");
6084                 }
6085                 const nativeResponseValue = wasm.TS_CResult_NoneLightningErrorZ_clone_ptr(arg);
6086                 return nativeResponseValue;
6087         }
6088         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_clone(const struct LDKCResult_NoneLightningErrorZ *NONNULL_PTR orig);
6089         export function CResult_NoneLightningErrorZ_clone(orig: number): number {
6090                 if(!isWasmInitialized) {
6091                         throw new Error("initializeWasm() must be awaited first!");
6092                 }
6093                 const nativeResponseValue = wasm.TS_CResult_NoneLightningErrorZ_clone(orig);
6094                 return nativeResponseValue;
6095         }
6096         // uint64_t C2Tuple_PublicKeyTypeZ_clone_ptr(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR arg);
6097         export function C2Tuple_PublicKeyTypeZ_clone_ptr(arg: number): number {
6098                 if(!isWasmInitialized) {
6099                         throw new Error("initializeWasm() must be awaited first!");
6100                 }
6101                 const nativeResponseValue = wasm.TS_C2Tuple_PublicKeyTypeZ_clone_ptr(arg);
6102                 return nativeResponseValue;
6103         }
6104         // struct LDKC2Tuple_PublicKeyTypeZ C2Tuple_PublicKeyTypeZ_clone(const struct LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR orig);
6105         export function C2Tuple_PublicKeyTypeZ_clone(orig: number): number {
6106                 if(!isWasmInitialized) {
6107                         throw new Error("initializeWasm() must be awaited first!");
6108                 }
6109                 const nativeResponseValue = wasm.TS_C2Tuple_PublicKeyTypeZ_clone(orig);
6110                 return nativeResponseValue;
6111         }
6112         // struct LDKC2Tuple_PublicKeyTypeZ C2Tuple_PublicKeyTypeZ_new(struct LDKPublicKey a, struct LDKType b);
6113         export function C2Tuple_PublicKeyTypeZ_new(a: Uint8Array, b: number): number {
6114                 if(!isWasmInitialized) {
6115                         throw new Error("initializeWasm() must be awaited first!");
6116                 }
6117                 const nativeResponseValue = wasm.TS_C2Tuple_PublicKeyTypeZ_new(encodeUint8Array(a), b);
6118                 return nativeResponseValue;
6119         }
6120         // void C2Tuple_PublicKeyTypeZ_free(struct LDKC2Tuple_PublicKeyTypeZ _res);
6121         export function C2Tuple_PublicKeyTypeZ_free(_res: number): void {
6122                 if(!isWasmInitialized) {
6123                         throw new Error("initializeWasm() must be awaited first!");
6124                 }
6125                 const nativeResponseValue = wasm.TS_C2Tuple_PublicKeyTypeZ_free(_res);
6126                 // debug statements here
6127         }
6128         // void CVec_C2Tuple_PublicKeyTypeZZ_free(struct LDKCVec_C2Tuple_PublicKeyTypeZZ _res);
6129         export function CVec_C2Tuple_PublicKeyTypeZZ_free(_res: number[]): void {
6130                 if(!isWasmInitialized) {
6131                         throw new Error("initializeWasm() must be awaited first!");
6132                 }
6133                 const nativeResponseValue = wasm.TS_CVec_C2Tuple_PublicKeyTypeZZ_free(_res);
6134                 // debug statements here
6135         }
6136         // void CVec_MessageSendEventZ_free(struct LDKCVec_MessageSendEventZ _res);
6137         export function CVec_MessageSendEventZ_free(_res: number[]): void {
6138                 if(!isWasmInitialized) {
6139                         throw new Error("initializeWasm() must be awaited first!");
6140                 }
6141                 const nativeResponseValue = wasm.TS_CVec_MessageSendEventZ_free(_res);
6142                 // debug statements here
6143         }
6144         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_ok(bool o);
6145         export function CResult_boolLightningErrorZ_ok(o: boolean): number {
6146                 if(!isWasmInitialized) {
6147                         throw new Error("initializeWasm() must be awaited first!");
6148                 }
6149                 const nativeResponseValue = wasm.TS_CResult_boolLightningErrorZ_ok(o);
6150                 return nativeResponseValue;
6151         }
6152         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_err(struct LDKLightningError e);
6153         export function CResult_boolLightningErrorZ_err(e: number): number {
6154                 if(!isWasmInitialized) {
6155                         throw new Error("initializeWasm() must be awaited first!");
6156                 }
6157                 const nativeResponseValue = wasm.TS_CResult_boolLightningErrorZ_err(e);
6158                 return nativeResponseValue;
6159         }
6160         // bool CResult_boolLightningErrorZ_is_ok(const struct LDKCResult_boolLightningErrorZ *NONNULL_PTR o);
6161         export function CResult_boolLightningErrorZ_is_ok(o: number): boolean {
6162                 if(!isWasmInitialized) {
6163                         throw new Error("initializeWasm() must be awaited first!");
6164                 }
6165                 const nativeResponseValue = wasm.TS_CResult_boolLightningErrorZ_is_ok(o);
6166                 return nativeResponseValue;
6167         }
6168         // void CResult_boolLightningErrorZ_free(struct LDKCResult_boolLightningErrorZ _res);
6169         export function CResult_boolLightningErrorZ_free(_res: number): void {
6170                 if(!isWasmInitialized) {
6171                         throw new Error("initializeWasm() must be awaited first!");
6172                 }
6173                 const nativeResponseValue = wasm.TS_CResult_boolLightningErrorZ_free(_res);
6174                 // debug statements here
6175         }
6176         // uint64_t CResult_boolLightningErrorZ_clone_ptr(LDKCResult_boolLightningErrorZ *NONNULL_PTR arg);
6177         export function CResult_boolLightningErrorZ_clone_ptr(arg: number): number {
6178                 if(!isWasmInitialized) {
6179                         throw new Error("initializeWasm() must be awaited first!");
6180                 }
6181                 const nativeResponseValue = wasm.TS_CResult_boolLightningErrorZ_clone_ptr(arg);
6182                 return nativeResponseValue;
6183         }
6184         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_clone(const struct LDKCResult_boolLightningErrorZ *NONNULL_PTR orig);
6185         export function CResult_boolLightningErrorZ_clone(orig: number): number {
6186                 if(!isWasmInitialized) {
6187                         throw new Error("initializeWasm() must be awaited first!");
6188                 }
6189                 const nativeResponseValue = wasm.TS_CResult_boolLightningErrorZ_clone(orig);
6190                 return nativeResponseValue;
6191         }
6192         // uint64_t C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone_ptr(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR arg);
6193         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone_ptr(arg: number): number {
6194                 if(!isWasmInitialized) {
6195                         throw new Error("initializeWasm() must be awaited first!");
6196                 }
6197                 const nativeResponseValue = wasm.TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone_ptr(arg);
6198                 return nativeResponseValue;
6199         }
6200         // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(const struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR orig);
6201         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig: number): number {
6202                 if(!isWasmInitialized) {
6203                         throw new Error("initializeWasm() must be awaited first!");
6204                 }
6205                 const nativeResponseValue = wasm.TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig);
6206                 return nativeResponseValue;
6207         }
6208         // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(struct LDKChannelAnnouncement a, struct LDKChannelUpdate b, struct LDKChannelUpdate c);
6209         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a: number, b: number, c: number): number {
6210                 if(!isWasmInitialized) {
6211                         throw new Error("initializeWasm() must be awaited first!");
6212                 }
6213                 const nativeResponseValue = wasm.TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a, b, c);
6214                 return nativeResponseValue;
6215         }
6216         // void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res);
6217         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res: number): void {
6218                 if(!isWasmInitialized) {
6219                         throw new Error("initializeWasm() must be awaited first!");
6220                 }
6221                 const nativeResponseValue = wasm.TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res);
6222                 // debug statements here
6223         }
6224         // void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res);
6225         export function CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res: number[]): void {
6226                 if(!isWasmInitialized) {
6227                         throw new Error("initializeWasm() must be awaited first!");
6228                 }
6229                 const nativeResponseValue = wasm.TS_CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res);
6230                 // debug statements here
6231         }
6232         // void CVec_NodeAnnouncementZ_free(struct LDKCVec_NodeAnnouncementZ _res);
6233         export function CVec_NodeAnnouncementZ_free(_res: number[]): void {
6234                 if(!isWasmInitialized) {
6235                         throw new Error("initializeWasm() must be awaited first!");
6236                 }
6237                 const nativeResponseValue = wasm.TS_CVec_NodeAnnouncementZ_free(_res);
6238                 // debug statements here
6239         }
6240         // void CVec_PublicKeyZ_free(struct LDKCVec_PublicKeyZ _res);
6241         export function CVec_PublicKeyZ_free(_res: Uint8Array[]): void {
6242                 if(!isWasmInitialized) {
6243                         throw new Error("initializeWasm() must be awaited first!");
6244                 }
6245                 const nativeResponseValue = wasm.TS_CVec_PublicKeyZ_free(_res);
6246                 // debug statements here
6247         }
6248         // void CVec_u8Z_free(struct LDKCVec_u8Z _res);
6249         export function CVec_u8Z_free(_res: Uint8Array): void {
6250                 if(!isWasmInitialized) {
6251                         throw new Error("initializeWasm() must be awaited first!");
6252                 }
6253                 const nativeResponseValue = wasm.TS_CVec_u8Z_free(encodeUint8Array(_res));
6254                 // debug statements here
6255         }
6256         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_ok(struct LDKCVec_u8Z o);
6257         export function CResult_CVec_u8ZPeerHandleErrorZ_ok(o: Uint8Array): number {
6258                 if(!isWasmInitialized) {
6259                         throw new Error("initializeWasm() must be awaited first!");
6260                 }
6261                 const nativeResponseValue = wasm.TS_CResult_CVec_u8ZPeerHandleErrorZ_ok(encodeUint8Array(o));
6262                 return nativeResponseValue;
6263         }
6264         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_err(struct LDKPeerHandleError e);
6265         export function CResult_CVec_u8ZPeerHandleErrorZ_err(e: number): number {
6266                 if(!isWasmInitialized) {
6267                         throw new Error("initializeWasm() must be awaited first!");
6268                 }
6269                 const nativeResponseValue = wasm.TS_CResult_CVec_u8ZPeerHandleErrorZ_err(e);
6270                 return nativeResponseValue;
6271         }
6272         // bool CResult_CVec_u8ZPeerHandleErrorZ_is_ok(const struct LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR o);
6273         export function CResult_CVec_u8ZPeerHandleErrorZ_is_ok(o: number): boolean {
6274                 if(!isWasmInitialized) {
6275                         throw new Error("initializeWasm() must be awaited first!");
6276                 }
6277                 const nativeResponseValue = wasm.TS_CResult_CVec_u8ZPeerHandleErrorZ_is_ok(o);
6278                 return nativeResponseValue;
6279         }
6280         // void CResult_CVec_u8ZPeerHandleErrorZ_free(struct LDKCResult_CVec_u8ZPeerHandleErrorZ _res);
6281         export function CResult_CVec_u8ZPeerHandleErrorZ_free(_res: number): void {
6282                 if(!isWasmInitialized) {
6283                         throw new Error("initializeWasm() must be awaited first!");
6284                 }
6285                 const nativeResponseValue = wasm.TS_CResult_CVec_u8ZPeerHandleErrorZ_free(_res);
6286                 // debug statements here
6287         }
6288         // uint64_t CResult_CVec_u8ZPeerHandleErrorZ_clone_ptr(LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR arg);
6289         export function CResult_CVec_u8ZPeerHandleErrorZ_clone_ptr(arg: number): number {
6290                 if(!isWasmInitialized) {
6291                         throw new Error("initializeWasm() must be awaited first!");
6292                 }
6293                 const nativeResponseValue = wasm.TS_CResult_CVec_u8ZPeerHandleErrorZ_clone_ptr(arg);
6294                 return nativeResponseValue;
6295         }
6296         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_clone(const struct LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR orig);
6297         export function CResult_CVec_u8ZPeerHandleErrorZ_clone(orig: number): number {
6298                 if(!isWasmInitialized) {
6299                         throw new Error("initializeWasm() must be awaited first!");
6300                 }
6301                 const nativeResponseValue = wasm.TS_CResult_CVec_u8ZPeerHandleErrorZ_clone(orig);
6302                 return nativeResponseValue;
6303         }
6304         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_ok(void);
6305         export function CResult_NonePeerHandleErrorZ_ok(): number {
6306                 if(!isWasmInitialized) {
6307                         throw new Error("initializeWasm() must be awaited first!");
6308                 }
6309                 const nativeResponseValue = wasm.TS_CResult_NonePeerHandleErrorZ_ok();
6310                 return nativeResponseValue;
6311         }
6312         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_err(struct LDKPeerHandleError e);
6313         export function CResult_NonePeerHandleErrorZ_err(e: number): number {
6314                 if(!isWasmInitialized) {
6315                         throw new Error("initializeWasm() must be awaited first!");
6316                 }
6317                 const nativeResponseValue = wasm.TS_CResult_NonePeerHandleErrorZ_err(e);
6318                 return nativeResponseValue;
6319         }
6320         // bool CResult_NonePeerHandleErrorZ_is_ok(const struct LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR o);
6321         export function CResult_NonePeerHandleErrorZ_is_ok(o: number): boolean {
6322                 if(!isWasmInitialized) {
6323                         throw new Error("initializeWasm() must be awaited first!");
6324                 }
6325                 const nativeResponseValue = wasm.TS_CResult_NonePeerHandleErrorZ_is_ok(o);
6326                 return nativeResponseValue;
6327         }
6328         // void CResult_NonePeerHandleErrorZ_free(struct LDKCResult_NonePeerHandleErrorZ _res);
6329         export function CResult_NonePeerHandleErrorZ_free(_res: number): void {
6330                 if(!isWasmInitialized) {
6331                         throw new Error("initializeWasm() must be awaited first!");
6332                 }
6333                 const nativeResponseValue = wasm.TS_CResult_NonePeerHandleErrorZ_free(_res);
6334                 // debug statements here
6335         }
6336         // uint64_t CResult_NonePeerHandleErrorZ_clone_ptr(LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR arg);
6337         export function CResult_NonePeerHandleErrorZ_clone_ptr(arg: number): number {
6338                 if(!isWasmInitialized) {
6339                         throw new Error("initializeWasm() must be awaited first!");
6340                 }
6341                 const nativeResponseValue = wasm.TS_CResult_NonePeerHandleErrorZ_clone_ptr(arg);
6342                 return nativeResponseValue;
6343         }
6344         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_clone(const struct LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR orig);
6345         export function CResult_NonePeerHandleErrorZ_clone(orig: number): number {
6346                 if(!isWasmInitialized) {
6347                         throw new Error("initializeWasm() must be awaited first!");
6348                 }
6349                 const nativeResponseValue = wasm.TS_CResult_NonePeerHandleErrorZ_clone(orig);
6350                 return nativeResponseValue;
6351         }
6352         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_ok(bool o);
6353         export function CResult_boolPeerHandleErrorZ_ok(o: boolean): number {
6354                 if(!isWasmInitialized) {
6355                         throw new Error("initializeWasm() must be awaited first!");
6356                 }
6357                 const nativeResponseValue = wasm.TS_CResult_boolPeerHandleErrorZ_ok(o);
6358                 return nativeResponseValue;
6359         }
6360         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_err(struct LDKPeerHandleError e);
6361         export function CResult_boolPeerHandleErrorZ_err(e: number): number {
6362                 if(!isWasmInitialized) {
6363                         throw new Error("initializeWasm() must be awaited first!");
6364                 }
6365                 const nativeResponseValue = wasm.TS_CResult_boolPeerHandleErrorZ_err(e);
6366                 return nativeResponseValue;
6367         }
6368         // bool CResult_boolPeerHandleErrorZ_is_ok(const struct LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR o);
6369         export function CResult_boolPeerHandleErrorZ_is_ok(o: number): boolean {
6370                 if(!isWasmInitialized) {
6371                         throw new Error("initializeWasm() must be awaited first!");
6372                 }
6373                 const nativeResponseValue = wasm.TS_CResult_boolPeerHandleErrorZ_is_ok(o);
6374                 return nativeResponseValue;
6375         }
6376         // void CResult_boolPeerHandleErrorZ_free(struct LDKCResult_boolPeerHandleErrorZ _res);
6377         export function CResult_boolPeerHandleErrorZ_free(_res: number): void {
6378                 if(!isWasmInitialized) {
6379                         throw new Error("initializeWasm() must be awaited first!");
6380                 }
6381                 const nativeResponseValue = wasm.TS_CResult_boolPeerHandleErrorZ_free(_res);
6382                 // debug statements here
6383         }
6384         // uint64_t CResult_boolPeerHandleErrorZ_clone_ptr(LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR arg);
6385         export function CResult_boolPeerHandleErrorZ_clone_ptr(arg: number): number {
6386                 if(!isWasmInitialized) {
6387                         throw new Error("initializeWasm() must be awaited first!");
6388                 }
6389                 const nativeResponseValue = wasm.TS_CResult_boolPeerHandleErrorZ_clone_ptr(arg);
6390                 return nativeResponseValue;
6391         }
6392         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_clone(const struct LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR orig);
6393         export function CResult_boolPeerHandleErrorZ_clone(orig: number): number {
6394                 if(!isWasmInitialized) {
6395                         throw new Error("initializeWasm() must be awaited first!");
6396                 }
6397                 const nativeResponseValue = wasm.TS_CResult_boolPeerHandleErrorZ_clone(orig);
6398                 return nativeResponseValue;
6399         }
6400         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_ok(struct LDKTxOut o);
6401         export function CResult_TxOutAccessErrorZ_ok(o: number): number {
6402                 if(!isWasmInitialized) {
6403                         throw new Error("initializeWasm() must be awaited first!");
6404                 }
6405                 const nativeResponseValue = wasm.TS_CResult_TxOutAccessErrorZ_ok(o);
6406                 return nativeResponseValue;
6407         }
6408         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_err(enum LDKAccessError e);
6409         export function CResult_TxOutAccessErrorZ_err(e: AccessError): number {
6410                 if(!isWasmInitialized) {
6411                         throw new Error("initializeWasm() must be awaited first!");
6412                 }
6413                 const nativeResponseValue = wasm.TS_CResult_TxOutAccessErrorZ_err(e);
6414                 return nativeResponseValue;
6415         }
6416         // bool CResult_TxOutAccessErrorZ_is_ok(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR o);
6417         export function CResult_TxOutAccessErrorZ_is_ok(o: number): boolean {
6418                 if(!isWasmInitialized) {
6419                         throw new Error("initializeWasm() must be awaited first!");
6420                 }
6421                 const nativeResponseValue = wasm.TS_CResult_TxOutAccessErrorZ_is_ok(o);
6422                 return nativeResponseValue;
6423         }
6424         // void CResult_TxOutAccessErrorZ_free(struct LDKCResult_TxOutAccessErrorZ _res);
6425         export function CResult_TxOutAccessErrorZ_free(_res: number): void {
6426                 if(!isWasmInitialized) {
6427                         throw new Error("initializeWasm() must be awaited first!");
6428                 }
6429                 const nativeResponseValue = wasm.TS_CResult_TxOutAccessErrorZ_free(_res);
6430                 // debug statements here
6431         }
6432         // uint64_t CResult_TxOutAccessErrorZ_clone_ptr(LDKCResult_TxOutAccessErrorZ *NONNULL_PTR arg);
6433         export function CResult_TxOutAccessErrorZ_clone_ptr(arg: number): number {
6434                 if(!isWasmInitialized) {
6435                         throw new Error("initializeWasm() must be awaited first!");
6436                 }
6437                 const nativeResponseValue = wasm.TS_CResult_TxOutAccessErrorZ_clone_ptr(arg);
6438                 return nativeResponseValue;
6439         }
6440         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_clone(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR orig);
6441         export function CResult_TxOutAccessErrorZ_clone(orig: number): number {
6442                 if(!isWasmInitialized) {
6443                         throw new Error("initializeWasm() must be awaited first!");
6444                 }
6445                 const nativeResponseValue = wasm.TS_CResult_TxOutAccessErrorZ_clone(orig);
6446                 return nativeResponseValue;
6447         }
6448         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void);
6449         export function CResult_NoneChannelMonitorUpdateErrZ_ok(): number {
6450                 if(!isWasmInitialized) {
6451                         throw new Error("initializeWasm() must be awaited first!");
6452                 }
6453                 const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_ok();
6454                 return nativeResponseValue;
6455         }
6456         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_err(enum LDKChannelMonitorUpdateErr e);
6457         export function CResult_NoneChannelMonitorUpdateErrZ_err(e: ChannelMonitorUpdateErr): number {
6458                 if(!isWasmInitialized) {
6459                         throw new Error("initializeWasm() must be awaited first!");
6460                 }
6461                 const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_err(e);
6462                 return nativeResponseValue;
6463         }
6464         // bool CResult_NoneChannelMonitorUpdateErrZ_is_ok(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR o);
6465         export function CResult_NoneChannelMonitorUpdateErrZ_is_ok(o: number): boolean {
6466                 if(!isWasmInitialized) {
6467                         throw new Error("initializeWasm() must be awaited first!");
6468                 }
6469                 const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_is_ok(o);
6470                 return nativeResponseValue;
6471         }
6472         // void CResult_NoneChannelMonitorUpdateErrZ_free(struct LDKCResult_NoneChannelMonitorUpdateErrZ _res);
6473         export function CResult_NoneChannelMonitorUpdateErrZ_free(_res: number): void {
6474                 if(!isWasmInitialized) {
6475                         throw new Error("initializeWasm() must be awaited first!");
6476                 }
6477                 const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_free(_res);
6478                 // debug statements here
6479         }
6480         // uint64_t CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR arg);
6481         export function CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(arg: number): number {
6482                 if(!isWasmInitialized) {
6483                         throw new Error("initializeWasm() must be awaited first!");
6484                 }
6485                 const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(arg);
6486                 return nativeResponseValue;
6487         }
6488         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_clone(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR orig);
6489         export function CResult_NoneChannelMonitorUpdateErrZ_clone(orig: number): number {
6490                 if(!isWasmInitialized) {
6491                         throw new Error("initializeWasm() must be awaited first!");
6492                 }
6493                 const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_clone(orig);
6494                 return nativeResponseValue;
6495         }
6496         // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_some(struct LDKC2Tuple_usizeTransactionZ o);
6497         export function COption_C2Tuple_usizeTransactionZZ_some(o: number): number {
6498                 if(!isWasmInitialized) {
6499                         throw new Error("initializeWasm() must be awaited first!");
6500                 }
6501                 const nativeResponseValue = wasm.TS_COption_C2Tuple_usizeTransactionZZ_some(o);
6502                 return nativeResponseValue;
6503         }
6504         // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_none(void);
6505         export function COption_C2Tuple_usizeTransactionZZ_none(): number {
6506                 if(!isWasmInitialized) {
6507                         throw new Error("initializeWasm() must be awaited first!");
6508                 }
6509                 const nativeResponseValue = wasm.TS_COption_C2Tuple_usizeTransactionZZ_none();
6510                 return nativeResponseValue;
6511         }
6512         // void COption_C2Tuple_usizeTransactionZZ_free(struct LDKCOption_C2Tuple_usizeTransactionZZ _res);
6513         export function COption_C2Tuple_usizeTransactionZZ_free(_res: number): void {
6514                 if(!isWasmInitialized) {
6515                         throw new Error("initializeWasm() must be awaited first!");
6516                 }
6517                 const nativeResponseValue = wasm.TS_COption_C2Tuple_usizeTransactionZZ_free(_res);
6518                 // debug statements here
6519         }
6520         // uint64_t COption_C2Tuple_usizeTransactionZZ_clone_ptr(LDKCOption_C2Tuple_usizeTransactionZZ *NONNULL_PTR arg);
6521         export function COption_C2Tuple_usizeTransactionZZ_clone_ptr(arg: number): number {
6522                 if(!isWasmInitialized) {
6523                         throw new Error("initializeWasm() must be awaited first!");
6524                 }
6525                 const nativeResponseValue = wasm.TS_COption_C2Tuple_usizeTransactionZZ_clone_ptr(arg);
6526                 return nativeResponseValue;
6527         }
6528         // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_clone(const struct LDKCOption_C2Tuple_usizeTransactionZZ *NONNULL_PTR orig);
6529         export function COption_C2Tuple_usizeTransactionZZ_clone(orig: number): number {
6530                 if(!isWasmInitialized) {
6531                         throw new Error("initializeWasm() must be awaited first!");
6532                 }
6533                 const nativeResponseValue = wasm.TS_COption_C2Tuple_usizeTransactionZZ_clone(orig);
6534                 return nativeResponseValue;
6535         }
6536         // struct LDKCOption_ClosureReasonZ COption_ClosureReasonZ_some(struct LDKClosureReason o);
6537         export function COption_ClosureReasonZ_some(o: number): number {
6538                 if(!isWasmInitialized) {
6539                         throw new Error("initializeWasm() must be awaited first!");
6540                 }
6541                 const nativeResponseValue = wasm.TS_COption_ClosureReasonZ_some(o);
6542                 return nativeResponseValue;
6543         }
6544         // struct LDKCOption_ClosureReasonZ COption_ClosureReasonZ_none(void);
6545         export function COption_ClosureReasonZ_none(): number {
6546                 if(!isWasmInitialized) {
6547                         throw new Error("initializeWasm() must be awaited first!");
6548                 }
6549                 const nativeResponseValue = wasm.TS_COption_ClosureReasonZ_none();
6550                 return nativeResponseValue;
6551         }
6552         // void COption_ClosureReasonZ_free(struct LDKCOption_ClosureReasonZ _res);
6553         export function COption_ClosureReasonZ_free(_res: number): void {
6554                 if(!isWasmInitialized) {
6555                         throw new Error("initializeWasm() must be awaited first!");
6556                 }
6557                 const nativeResponseValue = wasm.TS_COption_ClosureReasonZ_free(_res);
6558                 // debug statements here
6559         }
6560         // uint64_t COption_ClosureReasonZ_clone_ptr(LDKCOption_ClosureReasonZ *NONNULL_PTR arg);
6561         export function COption_ClosureReasonZ_clone_ptr(arg: number): number {
6562                 if(!isWasmInitialized) {
6563                         throw new Error("initializeWasm() must be awaited first!");
6564                 }
6565                 const nativeResponseValue = wasm.TS_COption_ClosureReasonZ_clone_ptr(arg);
6566                 return nativeResponseValue;
6567         }
6568         // struct LDKCOption_ClosureReasonZ COption_ClosureReasonZ_clone(const struct LDKCOption_ClosureReasonZ *NONNULL_PTR orig);
6569         export function COption_ClosureReasonZ_clone(orig: number): number {
6570                 if(!isWasmInitialized) {
6571                         throw new Error("initializeWasm() must be awaited first!");
6572                 }
6573                 const nativeResponseValue = wasm.TS_COption_ClosureReasonZ_clone(orig);
6574                 return nativeResponseValue;
6575         }
6576         // struct LDKCResult_COption_ClosureReasonZDecodeErrorZ CResult_COption_ClosureReasonZDecodeErrorZ_ok(struct LDKCOption_ClosureReasonZ o);
6577         export function CResult_COption_ClosureReasonZDecodeErrorZ_ok(o: number): number {
6578                 if(!isWasmInitialized) {
6579                         throw new Error("initializeWasm() must be awaited first!");
6580                 }
6581                 const nativeResponseValue = wasm.TS_CResult_COption_ClosureReasonZDecodeErrorZ_ok(o);
6582                 return nativeResponseValue;
6583         }
6584         // struct LDKCResult_COption_ClosureReasonZDecodeErrorZ CResult_COption_ClosureReasonZDecodeErrorZ_err(struct LDKDecodeError e);
6585         export function CResult_COption_ClosureReasonZDecodeErrorZ_err(e: number): number {
6586                 if(!isWasmInitialized) {
6587                         throw new Error("initializeWasm() must be awaited first!");
6588                 }
6589                 const nativeResponseValue = wasm.TS_CResult_COption_ClosureReasonZDecodeErrorZ_err(e);
6590                 return nativeResponseValue;
6591         }
6592         // bool CResult_COption_ClosureReasonZDecodeErrorZ_is_ok(const struct LDKCResult_COption_ClosureReasonZDecodeErrorZ *NONNULL_PTR o);
6593         export function CResult_COption_ClosureReasonZDecodeErrorZ_is_ok(o: number): boolean {
6594                 if(!isWasmInitialized) {
6595                         throw new Error("initializeWasm() must be awaited first!");
6596                 }
6597                 const nativeResponseValue = wasm.TS_CResult_COption_ClosureReasonZDecodeErrorZ_is_ok(o);
6598                 return nativeResponseValue;
6599         }
6600         // void CResult_COption_ClosureReasonZDecodeErrorZ_free(struct LDKCResult_COption_ClosureReasonZDecodeErrorZ _res);
6601         export function CResult_COption_ClosureReasonZDecodeErrorZ_free(_res: number): void {
6602                 if(!isWasmInitialized) {
6603                         throw new Error("initializeWasm() must be awaited first!");
6604                 }
6605                 const nativeResponseValue = wasm.TS_CResult_COption_ClosureReasonZDecodeErrorZ_free(_res);
6606                 // debug statements here
6607         }
6608         // uint64_t CResult_COption_ClosureReasonZDecodeErrorZ_clone_ptr(LDKCResult_COption_ClosureReasonZDecodeErrorZ *NONNULL_PTR arg);
6609         export function CResult_COption_ClosureReasonZDecodeErrorZ_clone_ptr(arg: number): number {
6610                 if(!isWasmInitialized) {
6611                         throw new Error("initializeWasm() must be awaited first!");
6612                 }
6613                 const nativeResponseValue = wasm.TS_CResult_COption_ClosureReasonZDecodeErrorZ_clone_ptr(arg);
6614                 return nativeResponseValue;
6615         }
6616         // struct LDKCResult_COption_ClosureReasonZDecodeErrorZ CResult_COption_ClosureReasonZDecodeErrorZ_clone(const struct LDKCResult_COption_ClosureReasonZDecodeErrorZ *NONNULL_PTR orig);
6617         export function CResult_COption_ClosureReasonZDecodeErrorZ_clone(orig: number): number {
6618                 if(!isWasmInitialized) {
6619                         throw new Error("initializeWasm() must be awaited first!");
6620                 }
6621                 const nativeResponseValue = wasm.TS_CResult_COption_ClosureReasonZDecodeErrorZ_clone(orig);
6622                 return nativeResponseValue;
6623         }
6624         // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_some(struct LDKNetworkUpdate o);
6625         export function COption_NetworkUpdateZ_some(o: number): number {
6626                 if(!isWasmInitialized) {
6627                         throw new Error("initializeWasm() must be awaited first!");
6628                 }
6629                 const nativeResponseValue = wasm.TS_COption_NetworkUpdateZ_some(o);
6630                 return nativeResponseValue;
6631         }
6632         // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_none(void);
6633         export function COption_NetworkUpdateZ_none(): number {
6634                 if(!isWasmInitialized) {
6635                         throw new Error("initializeWasm() must be awaited first!");
6636                 }
6637                 const nativeResponseValue = wasm.TS_COption_NetworkUpdateZ_none();
6638                 return nativeResponseValue;
6639         }
6640         // void COption_NetworkUpdateZ_free(struct LDKCOption_NetworkUpdateZ _res);
6641         export function COption_NetworkUpdateZ_free(_res: number): void {
6642                 if(!isWasmInitialized) {
6643                         throw new Error("initializeWasm() must be awaited first!");
6644                 }
6645                 const nativeResponseValue = wasm.TS_COption_NetworkUpdateZ_free(_res);
6646                 // debug statements here
6647         }
6648         // uint64_t COption_NetworkUpdateZ_clone_ptr(LDKCOption_NetworkUpdateZ *NONNULL_PTR arg);
6649         export function COption_NetworkUpdateZ_clone_ptr(arg: number): number {
6650                 if(!isWasmInitialized) {
6651                         throw new Error("initializeWasm() must be awaited first!");
6652                 }
6653                 const nativeResponseValue = wasm.TS_COption_NetworkUpdateZ_clone_ptr(arg);
6654                 return nativeResponseValue;
6655         }
6656         // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_clone(const struct LDKCOption_NetworkUpdateZ *NONNULL_PTR orig);
6657         export function COption_NetworkUpdateZ_clone(orig: number): number {
6658                 if(!isWasmInitialized) {
6659                         throw new Error("initializeWasm() must be awaited first!");
6660                 }
6661                 const nativeResponseValue = wasm.TS_COption_NetworkUpdateZ_clone(orig);
6662                 return nativeResponseValue;
6663         }
6664         // void CVec_SpendableOutputDescriptorZ_free(struct LDKCVec_SpendableOutputDescriptorZ _res);
6665         export function CVec_SpendableOutputDescriptorZ_free(_res: number[]): void {
6666                 if(!isWasmInitialized) {
6667                         throw new Error("initializeWasm() must be awaited first!");
6668                 }
6669                 const nativeResponseValue = wasm.TS_CVec_SpendableOutputDescriptorZ_free(_res);
6670                 // debug statements here
6671         }
6672         // struct LDKCOption_EventZ COption_EventZ_some(struct LDKEvent o);
6673         export function COption_EventZ_some(o: number): number {
6674                 if(!isWasmInitialized) {
6675                         throw new Error("initializeWasm() must be awaited first!");
6676                 }
6677                 const nativeResponseValue = wasm.TS_COption_EventZ_some(o);
6678                 return nativeResponseValue;
6679         }
6680         // struct LDKCOption_EventZ COption_EventZ_none(void);
6681         export function COption_EventZ_none(): number {
6682                 if(!isWasmInitialized) {
6683                         throw new Error("initializeWasm() must be awaited first!");
6684                 }
6685                 const nativeResponseValue = wasm.TS_COption_EventZ_none();
6686                 return nativeResponseValue;
6687         }
6688         // void COption_EventZ_free(struct LDKCOption_EventZ _res);
6689         export function COption_EventZ_free(_res: number): void {
6690                 if(!isWasmInitialized) {
6691                         throw new Error("initializeWasm() must be awaited first!");
6692                 }
6693                 const nativeResponseValue = wasm.TS_COption_EventZ_free(_res);
6694                 // debug statements here
6695         }
6696         // uint64_t COption_EventZ_clone_ptr(LDKCOption_EventZ *NONNULL_PTR arg);
6697         export function COption_EventZ_clone_ptr(arg: number): number {
6698                 if(!isWasmInitialized) {
6699                         throw new Error("initializeWasm() must be awaited first!");
6700                 }
6701                 const nativeResponseValue = wasm.TS_COption_EventZ_clone_ptr(arg);
6702                 return nativeResponseValue;
6703         }
6704         // struct LDKCOption_EventZ COption_EventZ_clone(const struct LDKCOption_EventZ *NONNULL_PTR orig);
6705         export function COption_EventZ_clone(orig: number): number {
6706                 if(!isWasmInitialized) {
6707                         throw new Error("initializeWasm() must be awaited first!");
6708                 }
6709                 const nativeResponseValue = wasm.TS_COption_EventZ_clone(orig);
6710                 return nativeResponseValue;
6711         }
6712         // struct LDKCResult_COption_EventZDecodeErrorZ CResult_COption_EventZDecodeErrorZ_ok(struct LDKCOption_EventZ o);
6713         export function CResult_COption_EventZDecodeErrorZ_ok(o: number): number {
6714                 if(!isWasmInitialized) {
6715                         throw new Error("initializeWasm() must be awaited first!");
6716                 }
6717                 const nativeResponseValue = wasm.TS_CResult_COption_EventZDecodeErrorZ_ok(o);
6718                 return nativeResponseValue;
6719         }
6720         // struct LDKCResult_COption_EventZDecodeErrorZ CResult_COption_EventZDecodeErrorZ_err(struct LDKDecodeError e);
6721         export function CResult_COption_EventZDecodeErrorZ_err(e: number): number {
6722                 if(!isWasmInitialized) {
6723                         throw new Error("initializeWasm() must be awaited first!");
6724                 }
6725                 const nativeResponseValue = wasm.TS_CResult_COption_EventZDecodeErrorZ_err(e);
6726                 return nativeResponseValue;
6727         }
6728         // bool CResult_COption_EventZDecodeErrorZ_is_ok(const struct LDKCResult_COption_EventZDecodeErrorZ *NONNULL_PTR o);
6729         export function CResult_COption_EventZDecodeErrorZ_is_ok(o: number): boolean {
6730                 if(!isWasmInitialized) {
6731                         throw new Error("initializeWasm() must be awaited first!");
6732                 }
6733                 const nativeResponseValue = wasm.TS_CResult_COption_EventZDecodeErrorZ_is_ok(o);
6734                 return nativeResponseValue;
6735         }
6736         // void CResult_COption_EventZDecodeErrorZ_free(struct LDKCResult_COption_EventZDecodeErrorZ _res);
6737         export function CResult_COption_EventZDecodeErrorZ_free(_res: number): void {
6738                 if(!isWasmInitialized) {
6739                         throw new Error("initializeWasm() must be awaited first!");
6740                 }
6741                 const nativeResponseValue = wasm.TS_CResult_COption_EventZDecodeErrorZ_free(_res);
6742                 // debug statements here
6743         }
6744         // uint64_t CResult_COption_EventZDecodeErrorZ_clone_ptr(LDKCResult_COption_EventZDecodeErrorZ *NONNULL_PTR arg);
6745         export function CResult_COption_EventZDecodeErrorZ_clone_ptr(arg: number): number {
6746                 if(!isWasmInitialized) {
6747                         throw new Error("initializeWasm() must be awaited first!");
6748                 }
6749                 const nativeResponseValue = wasm.TS_CResult_COption_EventZDecodeErrorZ_clone_ptr(arg);
6750                 return nativeResponseValue;
6751         }
6752         // struct LDKCResult_COption_EventZDecodeErrorZ CResult_COption_EventZDecodeErrorZ_clone(const struct LDKCResult_COption_EventZDecodeErrorZ *NONNULL_PTR orig);
6753         export function CResult_COption_EventZDecodeErrorZ_clone(orig: number): number {
6754                 if(!isWasmInitialized) {
6755                         throw new Error("initializeWasm() must be awaited first!");
6756                 }
6757                 const nativeResponseValue = wasm.TS_CResult_COption_EventZDecodeErrorZ_clone(orig);
6758                 return nativeResponseValue;
6759         }
6760         // struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_ok(struct LDKNodeId o);
6761         export function CResult_NodeIdDecodeErrorZ_ok(o: number): number {
6762                 if(!isWasmInitialized) {
6763                         throw new Error("initializeWasm() must be awaited first!");
6764                 }
6765                 const nativeResponseValue = wasm.TS_CResult_NodeIdDecodeErrorZ_ok(o);
6766                 return nativeResponseValue;
6767         }
6768         // struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_err(struct LDKDecodeError e);
6769         export function CResult_NodeIdDecodeErrorZ_err(e: number): number {
6770                 if(!isWasmInitialized) {
6771                         throw new Error("initializeWasm() must be awaited first!");
6772                 }
6773                 const nativeResponseValue = wasm.TS_CResult_NodeIdDecodeErrorZ_err(e);
6774                 return nativeResponseValue;
6775         }
6776         // bool CResult_NodeIdDecodeErrorZ_is_ok(const struct LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR o);
6777         export function CResult_NodeIdDecodeErrorZ_is_ok(o: number): boolean {
6778                 if(!isWasmInitialized) {
6779                         throw new Error("initializeWasm() must be awaited first!");
6780                 }
6781                 const nativeResponseValue = wasm.TS_CResult_NodeIdDecodeErrorZ_is_ok(o);
6782                 return nativeResponseValue;
6783         }
6784         // void CResult_NodeIdDecodeErrorZ_free(struct LDKCResult_NodeIdDecodeErrorZ _res);
6785         export function CResult_NodeIdDecodeErrorZ_free(_res: number): void {
6786                 if(!isWasmInitialized) {
6787                         throw new Error("initializeWasm() must be awaited first!");
6788                 }
6789                 const nativeResponseValue = wasm.TS_CResult_NodeIdDecodeErrorZ_free(_res);
6790                 // debug statements here
6791         }
6792         // uint64_t CResult_NodeIdDecodeErrorZ_clone_ptr(LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR arg);
6793         export function CResult_NodeIdDecodeErrorZ_clone_ptr(arg: number): number {
6794                 if(!isWasmInitialized) {
6795                         throw new Error("initializeWasm() must be awaited first!");
6796                 }
6797                 const nativeResponseValue = wasm.TS_CResult_NodeIdDecodeErrorZ_clone_ptr(arg);
6798                 return nativeResponseValue;
6799         }
6800         // struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_clone(const struct LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR orig);
6801         export function CResult_NodeIdDecodeErrorZ_clone(orig: number): number {
6802                 if(!isWasmInitialized) {
6803                         throw new Error("initializeWasm() must be awaited first!");
6804                 }
6805                 const nativeResponseValue = wasm.TS_CResult_NodeIdDecodeErrorZ_clone(orig);
6806                 return nativeResponseValue;
6807         }
6808         // struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ CResult_COption_NetworkUpdateZDecodeErrorZ_ok(struct LDKCOption_NetworkUpdateZ o);
6809         export function CResult_COption_NetworkUpdateZDecodeErrorZ_ok(o: number): number {
6810                 if(!isWasmInitialized) {
6811                         throw new Error("initializeWasm() must be awaited first!");
6812                 }
6813                 const nativeResponseValue = wasm.TS_CResult_COption_NetworkUpdateZDecodeErrorZ_ok(o);
6814                 return nativeResponseValue;
6815         }
6816         // struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ CResult_COption_NetworkUpdateZDecodeErrorZ_err(struct LDKDecodeError e);
6817         export function CResult_COption_NetworkUpdateZDecodeErrorZ_err(e: number): number {
6818                 if(!isWasmInitialized) {
6819                         throw new Error("initializeWasm() must be awaited first!");
6820                 }
6821                 const nativeResponseValue = wasm.TS_CResult_COption_NetworkUpdateZDecodeErrorZ_err(e);
6822                 return nativeResponseValue;
6823         }
6824         // bool CResult_COption_NetworkUpdateZDecodeErrorZ_is_ok(const struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ *NONNULL_PTR o);
6825         export function CResult_COption_NetworkUpdateZDecodeErrorZ_is_ok(o: number): boolean {
6826                 if(!isWasmInitialized) {
6827                         throw new Error("initializeWasm() must be awaited first!");
6828                 }
6829                 const nativeResponseValue = wasm.TS_CResult_COption_NetworkUpdateZDecodeErrorZ_is_ok(o);
6830                 return nativeResponseValue;
6831         }
6832         // void CResult_COption_NetworkUpdateZDecodeErrorZ_free(struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ _res);
6833         export function CResult_COption_NetworkUpdateZDecodeErrorZ_free(_res: number): void {
6834                 if(!isWasmInitialized) {
6835                         throw new Error("initializeWasm() must be awaited first!");
6836                 }
6837                 const nativeResponseValue = wasm.TS_CResult_COption_NetworkUpdateZDecodeErrorZ_free(_res);
6838                 // debug statements here
6839         }
6840         // uint64_t CResult_COption_NetworkUpdateZDecodeErrorZ_clone_ptr(LDKCResult_COption_NetworkUpdateZDecodeErrorZ *NONNULL_PTR arg);
6841         export function CResult_COption_NetworkUpdateZDecodeErrorZ_clone_ptr(arg: number): number {
6842                 if(!isWasmInitialized) {
6843                         throw new Error("initializeWasm() must be awaited first!");
6844                 }
6845                 const nativeResponseValue = wasm.TS_CResult_COption_NetworkUpdateZDecodeErrorZ_clone_ptr(arg);
6846                 return nativeResponseValue;
6847         }
6848         // struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ CResult_COption_NetworkUpdateZDecodeErrorZ_clone(const struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ *NONNULL_PTR orig);
6849         export function CResult_COption_NetworkUpdateZDecodeErrorZ_clone(orig: number): number {
6850                 if(!isWasmInitialized) {
6851                         throw new Error("initializeWasm() must be awaited first!");
6852                 }
6853                 const nativeResponseValue = wasm.TS_CResult_COption_NetworkUpdateZDecodeErrorZ_clone(orig);
6854                 return nativeResponseValue;
6855         }
6856         // struct LDKCOption_AccessZ COption_AccessZ_some(struct LDKAccess o);
6857         export function COption_AccessZ_some(o: number): number {
6858                 if(!isWasmInitialized) {
6859                         throw new Error("initializeWasm() must be awaited first!");
6860                 }
6861                 const nativeResponseValue = wasm.TS_COption_AccessZ_some(o);
6862                 return nativeResponseValue;
6863         }
6864         // struct LDKCOption_AccessZ COption_AccessZ_none(void);
6865         export function COption_AccessZ_none(): number {
6866                 if(!isWasmInitialized) {
6867                         throw new Error("initializeWasm() must be awaited first!");
6868                 }
6869                 const nativeResponseValue = wasm.TS_COption_AccessZ_none();
6870                 return nativeResponseValue;
6871         }
6872         // void COption_AccessZ_free(struct LDKCOption_AccessZ _res);
6873         export function COption_AccessZ_free(_res: number): void {
6874                 if(!isWasmInitialized) {
6875                         throw new Error("initializeWasm() must be awaited first!");
6876                 }
6877                 const nativeResponseValue = wasm.TS_COption_AccessZ_free(_res);
6878                 // debug statements here
6879         }
6880         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_ok(struct LDKDirectionalChannelInfo o);
6881         export function CResult_DirectionalChannelInfoDecodeErrorZ_ok(o: number): number {
6882                 if(!isWasmInitialized) {
6883                         throw new Error("initializeWasm() must be awaited first!");
6884                 }
6885                 const nativeResponseValue = wasm.TS_CResult_DirectionalChannelInfoDecodeErrorZ_ok(o);
6886                 return nativeResponseValue;
6887         }
6888         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
6889         export function CResult_DirectionalChannelInfoDecodeErrorZ_err(e: number): number {
6890                 if(!isWasmInitialized) {
6891                         throw new Error("initializeWasm() must be awaited first!");
6892                 }
6893                 const nativeResponseValue = wasm.TS_CResult_DirectionalChannelInfoDecodeErrorZ_err(e);
6894                 return nativeResponseValue;
6895         }
6896         // bool CResult_DirectionalChannelInfoDecodeErrorZ_is_ok(const struct LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR o);
6897         export function CResult_DirectionalChannelInfoDecodeErrorZ_is_ok(o: number): boolean {
6898                 if(!isWasmInitialized) {
6899                         throw new Error("initializeWasm() must be awaited first!");
6900                 }
6901                 const nativeResponseValue = wasm.TS_CResult_DirectionalChannelInfoDecodeErrorZ_is_ok(o);
6902                 return nativeResponseValue;
6903         }
6904         // void CResult_DirectionalChannelInfoDecodeErrorZ_free(struct LDKCResult_DirectionalChannelInfoDecodeErrorZ _res);
6905         export function CResult_DirectionalChannelInfoDecodeErrorZ_free(_res: number): void {
6906                 if(!isWasmInitialized) {
6907                         throw new Error("initializeWasm() must be awaited first!");
6908                 }
6909                 const nativeResponseValue = wasm.TS_CResult_DirectionalChannelInfoDecodeErrorZ_free(_res);
6910                 // debug statements here
6911         }
6912         // uint64_t CResult_DirectionalChannelInfoDecodeErrorZ_clone_ptr(LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR arg);
6913         export function CResult_DirectionalChannelInfoDecodeErrorZ_clone_ptr(arg: number): number {
6914                 if(!isWasmInitialized) {
6915                         throw new Error("initializeWasm() must be awaited first!");
6916                 }
6917                 const nativeResponseValue = wasm.TS_CResult_DirectionalChannelInfoDecodeErrorZ_clone_ptr(arg);
6918                 return nativeResponseValue;
6919         }
6920         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_clone(const struct LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR orig);
6921         export function CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig: number): number {
6922                 if(!isWasmInitialized) {
6923                         throw new Error("initializeWasm() must be awaited first!");
6924                 }
6925                 const nativeResponseValue = wasm.TS_CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig);
6926                 return nativeResponseValue;
6927         }
6928         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_ok(struct LDKChannelInfo o);
6929         export function CResult_ChannelInfoDecodeErrorZ_ok(o: number): number {
6930                 if(!isWasmInitialized) {
6931                         throw new Error("initializeWasm() must be awaited first!");
6932                 }
6933                 const nativeResponseValue = wasm.TS_CResult_ChannelInfoDecodeErrorZ_ok(o);
6934                 return nativeResponseValue;
6935         }
6936         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
6937         export function CResult_ChannelInfoDecodeErrorZ_err(e: number): number {
6938                 if(!isWasmInitialized) {
6939                         throw new Error("initializeWasm() must be awaited first!");
6940                 }
6941                 const nativeResponseValue = wasm.TS_CResult_ChannelInfoDecodeErrorZ_err(e);
6942                 return nativeResponseValue;
6943         }
6944         // bool CResult_ChannelInfoDecodeErrorZ_is_ok(const struct LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR o);
6945         export function CResult_ChannelInfoDecodeErrorZ_is_ok(o: number): boolean {
6946                 if(!isWasmInitialized) {
6947                         throw new Error("initializeWasm() must be awaited first!");
6948                 }
6949                 const nativeResponseValue = wasm.TS_CResult_ChannelInfoDecodeErrorZ_is_ok(o);
6950                 return nativeResponseValue;
6951         }
6952         // void CResult_ChannelInfoDecodeErrorZ_free(struct LDKCResult_ChannelInfoDecodeErrorZ _res);
6953         export function CResult_ChannelInfoDecodeErrorZ_free(_res: number): void {
6954                 if(!isWasmInitialized) {
6955                         throw new Error("initializeWasm() must be awaited first!");
6956                 }
6957                 const nativeResponseValue = wasm.TS_CResult_ChannelInfoDecodeErrorZ_free(_res);
6958                 // debug statements here
6959         }
6960         // uint64_t CResult_ChannelInfoDecodeErrorZ_clone_ptr(LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR arg);
6961         export function CResult_ChannelInfoDecodeErrorZ_clone_ptr(arg: number): number {
6962                 if(!isWasmInitialized) {
6963                         throw new Error("initializeWasm() must be awaited first!");
6964                 }
6965                 const nativeResponseValue = wasm.TS_CResult_ChannelInfoDecodeErrorZ_clone_ptr(arg);
6966                 return nativeResponseValue;
6967         }
6968         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_clone(const struct LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR orig);
6969         export function CResult_ChannelInfoDecodeErrorZ_clone(orig: number): number {
6970                 if(!isWasmInitialized) {
6971                         throw new Error("initializeWasm() must be awaited first!");
6972                 }
6973                 const nativeResponseValue = wasm.TS_CResult_ChannelInfoDecodeErrorZ_clone(orig);
6974                 return nativeResponseValue;
6975         }
6976         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_ok(struct LDKRoutingFees o);
6977         export function CResult_RoutingFeesDecodeErrorZ_ok(o: number): number {
6978                 if(!isWasmInitialized) {
6979                         throw new Error("initializeWasm() must be awaited first!");
6980                 }
6981                 const nativeResponseValue = wasm.TS_CResult_RoutingFeesDecodeErrorZ_ok(o);
6982                 return nativeResponseValue;
6983         }
6984         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_err(struct LDKDecodeError e);
6985         export function CResult_RoutingFeesDecodeErrorZ_err(e: number): number {
6986                 if(!isWasmInitialized) {
6987                         throw new Error("initializeWasm() must be awaited first!");
6988                 }
6989                 const nativeResponseValue = wasm.TS_CResult_RoutingFeesDecodeErrorZ_err(e);
6990                 return nativeResponseValue;
6991         }
6992         // bool CResult_RoutingFeesDecodeErrorZ_is_ok(const struct LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR o);
6993         export function CResult_RoutingFeesDecodeErrorZ_is_ok(o: number): boolean {
6994                 if(!isWasmInitialized) {
6995                         throw new Error("initializeWasm() must be awaited first!");
6996                 }
6997                 const nativeResponseValue = wasm.TS_CResult_RoutingFeesDecodeErrorZ_is_ok(o);
6998                 return nativeResponseValue;
6999         }
7000         // void CResult_RoutingFeesDecodeErrorZ_free(struct LDKCResult_RoutingFeesDecodeErrorZ _res);
7001         export function CResult_RoutingFeesDecodeErrorZ_free(_res: number): void {
7002                 if(!isWasmInitialized) {
7003                         throw new Error("initializeWasm() must be awaited first!");
7004                 }
7005                 const nativeResponseValue = wasm.TS_CResult_RoutingFeesDecodeErrorZ_free(_res);
7006                 // debug statements here
7007         }
7008         // uint64_t CResult_RoutingFeesDecodeErrorZ_clone_ptr(LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR arg);
7009         export function CResult_RoutingFeesDecodeErrorZ_clone_ptr(arg: number): number {
7010                 if(!isWasmInitialized) {
7011                         throw new Error("initializeWasm() must be awaited first!");
7012                 }
7013                 const nativeResponseValue = wasm.TS_CResult_RoutingFeesDecodeErrorZ_clone_ptr(arg);
7014                 return nativeResponseValue;
7015         }
7016         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_clone(const struct LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR orig);
7017         export function CResult_RoutingFeesDecodeErrorZ_clone(orig: number): number {
7018                 if(!isWasmInitialized) {
7019                         throw new Error("initializeWasm() must be awaited first!");
7020                 }
7021                 const nativeResponseValue = wasm.TS_CResult_RoutingFeesDecodeErrorZ_clone(orig);
7022                 return nativeResponseValue;
7023         }
7024         // void CVec_NetAddressZ_free(struct LDKCVec_NetAddressZ _res);
7025         export function CVec_NetAddressZ_free(_res: number[]): void {
7026                 if(!isWasmInitialized) {
7027                         throw new Error("initializeWasm() must be awaited first!");
7028                 }
7029                 const nativeResponseValue = wasm.TS_CVec_NetAddressZ_free(_res);
7030                 // debug statements here
7031         }
7032         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_ok(struct LDKNodeAnnouncementInfo o);
7033         export function CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o: number): number {
7034                 if(!isWasmInitialized) {
7035                         throw new Error("initializeWasm() must be awaited first!");
7036                 }
7037                 const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o);
7038                 return nativeResponseValue;
7039         }
7040         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_err(struct LDKDecodeError e);
7041         export function CResult_NodeAnnouncementInfoDecodeErrorZ_err(e: number): number {
7042                 if(!isWasmInitialized) {
7043                         throw new Error("initializeWasm() must be awaited first!");
7044                 }
7045                 const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementInfoDecodeErrorZ_err(e);
7046                 return nativeResponseValue;
7047         }
7048         // bool CResult_NodeAnnouncementInfoDecodeErrorZ_is_ok(const struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR o);
7049         export function CResult_NodeAnnouncementInfoDecodeErrorZ_is_ok(o: number): boolean {
7050                 if(!isWasmInitialized) {
7051                         throw new Error("initializeWasm() must be awaited first!");
7052                 }
7053                 const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementInfoDecodeErrorZ_is_ok(o);
7054                 return nativeResponseValue;
7055         }
7056         // void CResult_NodeAnnouncementInfoDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res);
7057         export function CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res: number): void {
7058                 if(!isWasmInitialized) {
7059                         throw new Error("initializeWasm() must be awaited first!");
7060                 }
7061                 const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res);
7062                 // debug statements here
7063         }
7064         // uint64_t CResult_NodeAnnouncementInfoDecodeErrorZ_clone_ptr(LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR arg);
7065         export function CResult_NodeAnnouncementInfoDecodeErrorZ_clone_ptr(arg: number): number {
7066                 if(!isWasmInitialized) {
7067                         throw new Error("initializeWasm() must be awaited first!");
7068                 }
7069                 const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementInfoDecodeErrorZ_clone_ptr(arg);
7070                 return nativeResponseValue;
7071         }
7072         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR orig);
7073         export function CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig: number): number {
7074                 if(!isWasmInitialized) {
7075                         throw new Error("initializeWasm() must be awaited first!");
7076                 }
7077                 const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig);
7078                 return nativeResponseValue;
7079         }
7080         // void CVec_u64Z_free(struct LDKCVec_u64Z _res);
7081         export function CVec_u64Z_free(_res: number[]): void {
7082                 if(!isWasmInitialized) {
7083                         throw new Error("initializeWasm() must be awaited first!");
7084                 }
7085                 const nativeResponseValue = wasm.TS_CVec_u64Z_free(_res);
7086                 // debug statements here
7087         }
7088         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_ok(struct LDKNodeInfo o);
7089         export function CResult_NodeInfoDecodeErrorZ_ok(o: number): number {
7090                 if(!isWasmInitialized) {
7091                         throw new Error("initializeWasm() must be awaited first!");
7092                 }
7093                 const nativeResponseValue = wasm.TS_CResult_NodeInfoDecodeErrorZ_ok(o);
7094                 return nativeResponseValue;
7095         }
7096         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_err(struct LDKDecodeError e);
7097         export function CResult_NodeInfoDecodeErrorZ_err(e: number): number {
7098                 if(!isWasmInitialized) {
7099                         throw new Error("initializeWasm() must be awaited first!");
7100                 }
7101                 const nativeResponseValue = wasm.TS_CResult_NodeInfoDecodeErrorZ_err(e);
7102                 return nativeResponseValue;
7103         }
7104         // bool CResult_NodeInfoDecodeErrorZ_is_ok(const struct LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR o);
7105         export function CResult_NodeInfoDecodeErrorZ_is_ok(o: number): boolean {
7106                 if(!isWasmInitialized) {
7107                         throw new Error("initializeWasm() must be awaited first!");
7108                 }
7109                 const nativeResponseValue = wasm.TS_CResult_NodeInfoDecodeErrorZ_is_ok(o);
7110                 return nativeResponseValue;
7111         }
7112         // void CResult_NodeInfoDecodeErrorZ_free(struct LDKCResult_NodeInfoDecodeErrorZ _res);
7113         export function CResult_NodeInfoDecodeErrorZ_free(_res: number): void {
7114                 if(!isWasmInitialized) {
7115                         throw new Error("initializeWasm() must be awaited first!");
7116                 }
7117                 const nativeResponseValue = wasm.TS_CResult_NodeInfoDecodeErrorZ_free(_res);
7118                 // debug statements here
7119         }
7120         // uint64_t CResult_NodeInfoDecodeErrorZ_clone_ptr(LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR arg);
7121         export function CResult_NodeInfoDecodeErrorZ_clone_ptr(arg: number): number {
7122                 if(!isWasmInitialized) {
7123                         throw new Error("initializeWasm() must be awaited first!");
7124                 }
7125                 const nativeResponseValue = wasm.TS_CResult_NodeInfoDecodeErrorZ_clone_ptr(arg);
7126                 return nativeResponseValue;
7127         }
7128         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_clone(const struct LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR orig);
7129         export function CResult_NodeInfoDecodeErrorZ_clone(orig: number): number {
7130                 if(!isWasmInitialized) {
7131                         throw new Error("initializeWasm() must be awaited first!");
7132                 }
7133                 const nativeResponseValue = wasm.TS_CResult_NodeInfoDecodeErrorZ_clone(orig);
7134                 return nativeResponseValue;
7135         }
7136         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_ok(struct LDKNetworkGraph o);
7137         export function CResult_NetworkGraphDecodeErrorZ_ok(o: number): number {
7138                 if(!isWasmInitialized) {
7139                         throw new Error("initializeWasm() must be awaited first!");
7140                 }
7141                 const nativeResponseValue = wasm.TS_CResult_NetworkGraphDecodeErrorZ_ok(o);
7142                 return nativeResponseValue;
7143         }
7144         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_err(struct LDKDecodeError e);
7145         export function CResult_NetworkGraphDecodeErrorZ_err(e: number): number {
7146                 if(!isWasmInitialized) {
7147                         throw new Error("initializeWasm() must be awaited first!");
7148                 }
7149                 const nativeResponseValue = wasm.TS_CResult_NetworkGraphDecodeErrorZ_err(e);
7150                 return nativeResponseValue;
7151         }
7152         // bool CResult_NetworkGraphDecodeErrorZ_is_ok(const struct LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR o);
7153         export function CResult_NetworkGraphDecodeErrorZ_is_ok(o: number): boolean {
7154                 if(!isWasmInitialized) {
7155                         throw new Error("initializeWasm() must be awaited first!");
7156                 }
7157                 const nativeResponseValue = wasm.TS_CResult_NetworkGraphDecodeErrorZ_is_ok(o);
7158                 return nativeResponseValue;
7159         }
7160         // void CResult_NetworkGraphDecodeErrorZ_free(struct LDKCResult_NetworkGraphDecodeErrorZ _res);
7161         export function CResult_NetworkGraphDecodeErrorZ_free(_res: number): void {
7162                 if(!isWasmInitialized) {
7163                         throw new Error("initializeWasm() must be awaited first!");
7164                 }
7165                 const nativeResponseValue = wasm.TS_CResult_NetworkGraphDecodeErrorZ_free(_res);
7166                 // debug statements here
7167         }
7168         // uint64_t CResult_NetworkGraphDecodeErrorZ_clone_ptr(LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR arg);
7169         export function CResult_NetworkGraphDecodeErrorZ_clone_ptr(arg: number): number {
7170                 if(!isWasmInitialized) {
7171                         throw new Error("initializeWasm() must be awaited first!");
7172                 }
7173                 const nativeResponseValue = wasm.TS_CResult_NetworkGraphDecodeErrorZ_clone_ptr(arg);
7174                 return nativeResponseValue;
7175         }
7176         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_clone(const struct LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR orig);
7177         export function CResult_NetworkGraphDecodeErrorZ_clone(orig: number): number {
7178                 if(!isWasmInitialized) {
7179                         throw new Error("initializeWasm() must be awaited first!");
7180                 }
7181                 const nativeResponseValue = wasm.TS_CResult_NetworkGraphDecodeErrorZ_clone(orig);
7182                 return nativeResponseValue;
7183         }
7184         // struct LDKCOption_CVec_NetAddressZZ COption_CVec_NetAddressZZ_some(struct LDKCVec_NetAddressZ o);
7185         export function COption_CVec_NetAddressZZ_some(o: number[]): number {
7186                 if(!isWasmInitialized) {
7187                         throw new Error("initializeWasm() must be awaited first!");
7188                 }
7189                 const nativeResponseValue = wasm.TS_COption_CVec_NetAddressZZ_some(o);
7190                 return nativeResponseValue;
7191         }
7192         // struct LDKCOption_CVec_NetAddressZZ COption_CVec_NetAddressZZ_none(void);
7193         export function COption_CVec_NetAddressZZ_none(): number {
7194                 if(!isWasmInitialized) {
7195                         throw new Error("initializeWasm() must be awaited first!");
7196                 }
7197                 const nativeResponseValue = wasm.TS_COption_CVec_NetAddressZZ_none();
7198                 return nativeResponseValue;
7199         }
7200         // void COption_CVec_NetAddressZZ_free(struct LDKCOption_CVec_NetAddressZZ _res);
7201         export function COption_CVec_NetAddressZZ_free(_res: number): void {
7202                 if(!isWasmInitialized) {
7203                         throw new Error("initializeWasm() must be awaited first!");
7204                 }
7205                 const nativeResponseValue = wasm.TS_COption_CVec_NetAddressZZ_free(_res);
7206                 // debug statements here
7207         }
7208         // uint64_t COption_CVec_NetAddressZZ_clone_ptr(LDKCOption_CVec_NetAddressZZ *NONNULL_PTR arg);
7209         export function COption_CVec_NetAddressZZ_clone_ptr(arg: number): number {
7210                 if(!isWasmInitialized) {
7211                         throw new Error("initializeWasm() must be awaited first!");
7212                 }
7213                 const nativeResponseValue = wasm.TS_COption_CVec_NetAddressZZ_clone_ptr(arg);
7214                 return nativeResponseValue;
7215         }
7216         // struct LDKCOption_CVec_NetAddressZZ COption_CVec_NetAddressZZ_clone(const struct LDKCOption_CVec_NetAddressZZ *NONNULL_PTR orig);
7217         export function COption_CVec_NetAddressZZ_clone(orig: number): number {
7218                 if(!isWasmInitialized) {
7219                         throw new Error("initializeWasm() must be awaited first!");
7220                 }
7221                 const nativeResponseValue = wasm.TS_COption_CVec_NetAddressZZ_clone(orig);
7222                 return nativeResponseValue;
7223         }
7224         // struct LDKCResult_ScoringParametersDecodeErrorZ CResult_ScoringParametersDecodeErrorZ_ok(struct LDKScoringParameters o);
7225         export function CResult_ScoringParametersDecodeErrorZ_ok(o: number): number {
7226                 if(!isWasmInitialized) {
7227                         throw new Error("initializeWasm() must be awaited first!");
7228                 }
7229                 const nativeResponseValue = wasm.TS_CResult_ScoringParametersDecodeErrorZ_ok(o);
7230                 return nativeResponseValue;
7231         }
7232         // struct LDKCResult_ScoringParametersDecodeErrorZ CResult_ScoringParametersDecodeErrorZ_err(struct LDKDecodeError e);
7233         export function CResult_ScoringParametersDecodeErrorZ_err(e: number): number {
7234                 if(!isWasmInitialized) {
7235                         throw new Error("initializeWasm() must be awaited first!");
7236                 }
7237                 const nativeResponseValue = wasm.TS_CResult_ScoringParametersDecodeErrorZ_err(e);
7238                 return nativeResponseValue;
7239         }
7240         // bool CResult_ScoringParametersDecodeErrorZ_is_ok(const struct LDKCResult_ScoringParametersDecodeErrorZ *NONNULL_PTR o);
7241         export function CResult_ScoringParametersDecodeErrorZ_is_ok(o: number): boolean {
7242                 if(!isWasmInitialized) {
7243                         throw new Error("initializeWasm() must be awaited first!");
7244                 }
7245                 const nativeResponseValue = wasm.TS_CResult_ScoringParametersDecodeErrorZ_is_ok(o);
7246                 return nativeResponseValue;
7247         }
7248         // void CResult_ScoringParametersDecodeErrorZ_free(struct LDKCResult_ScoringParametersDecodeErrorZ _res);
7249         export function CResult_ScoringParametersDecodeErrorZ_free(_res: number): void {
7250                 if(!isWasmInitialized) {
7251                         throw new Error("initializeWasm() must be awaited first!");
7252                 }
7253                 const nativeResponseValue = wasm.TS_CResult_ScoringParametersDecodeErrorZ_free(_res);
7254                 // debug statements here
7255         }
7256         // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_ok(struct LDKInitFeatures o);
7257         export function CResult_InitFeaturesDecodeErrorZ_ok(o: number): number {
7258                 if(!isWasmInitialized) {
7259                         throw new Error("initializeWasm() must be awaited first!");
7260                 }
7261                 const nativeResponseValue = wasm.TS_CResult_InitFeaturesDecodeErrorZ_ok(o);
7262                 return nativeResponseValue;
7263         }
7264         // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
7265         export function CResult_InitFeaturesDecodeErrorZ_err(e: number): number {
7266                 if(!isWasmInitialized) {
7267                         throw new Error("initializeWasm() must be awaited first!");
7268                 }
7269                 const nativeResponseValue = wasm.TS_CResult_InitFeaturesDecodeErrorZ_err(e);
7270                 return nativeResponseValue;
7271         }
7272         // bool CResult_InitFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR o);
7273         export function CResult_InitFeaturesDecodeErrorZ_is_ok(o: number): boolean {
7274                 if(!isWasmInitialized) {
7275                         throw new Error("initializeWasm() must be awaited first!");
7276                 }
7277                 const nativeResponseValue = wasm.TS_CResult_InitFeaturesDecodeErrorZ_is_ok(o);
7278                 return nativeResponseValue;
7279         }
7280         // void CResult_InitFeaturesDecodeErrorZ_free(struct LDKCResult_InitFeaturesDecodeErrorZ _res);
7281         export function CResult_InitFeaturesDecodeErrorZ_free(_res: number): void {
7282                 if(!isWasmInitialized) {
7283                         throw new Error("initializeWasm() must be awaited first!");
7284                 }
7285                 const nativeResponseValue = wasm.TS_CResult_InitFeaturesDecodeErrorZ_free(_res);
7286                 // debug statements here
7287         }
7288         // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_ok(struct LDKChannelFeatures o);
7289         export function CResult_ChannelFeaturesDecodeErrorZ_ok(o: number): number {
7290                 if(!isWasmInitialized) {
7291                         throw new Error("initializeWasm() must be awaited first!");
7292                 }
7293                 const nativeResponseValue = wasm.TS_CResult_ChannelFeaturesDecodeErrorZ_ok(o);
7294                 return nativeResponseValue;
7295         }
7296         // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
7297         export function CResult_ChannelFeaturesDecodeErrorZ_err(e: number): number {
7298                 if(!isWasmInitialized) {
7299                         throw new Error("initializeWasm() must be awaited first!");
7300                 }
7301                 const nativeResponseValue = wasm.TS_CResult_ChannelFeaturesDecodeErrorZ_err(e);
7302                 return nativeResponseValue;
7303         }
7304         // bool CResult_ChannelFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_ChannelFeaturesDecodeErrorZ *NONNULL_PTR o);
7305         export function CResult_ChannelFeaturesDecodeErrorZ_is_ok(o: number): boolean {
7306                 if(!isWasmInitialized) {
7307                         throw new Error("initializeWasm() must be awaited first!");
7308                 }
7309                 const nativeResponseValue = wasm.TS_CResult_ChannelFeaturesDecodeErrorZ_is_ok(o);
7310                 return nativeResponseValue;
7311         }
7312         // void CResult_ChannelFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelFeaturesDecodeErrorZ _res);
7313         export function CResult_ChannelFeaturesDecodeErrorZ_free(_res: number): void {
7314                 if(!isWasmInitialized) {
7315                         throw new Error("initializeWasm() must be awaited first!");
7316                 }
7317                 const nativeResponseValue = wasm.TS_CResult_ChannelFeaturesDecodeErrorZ_free(_res);
7318                 // debug statements here
7319         }
7320         // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_ok(struct LDKNodeFeatures o);
7321         export function CResult_NodeFeaturesDecodeErrorZ_ok(o: number): number {
7322                 if(!isWasmInitialized) {
7323                         throw new Error("initializeWasm() must be awaited first!");
7324                 }
7325                 const nativeResponseValue = wasm.TS_CResult_NodeFeaturesDecodeErrorZ_ok(o);
7326                 return nativeResponseValue;
7327         }
7328         // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
7329         export function CResult_NodeFeaturesDecodeErrorZ_err(e: number): number {
7330                 if(!isWasmInitialized) {
7331                         throw new Error("initializeWasm() must be awaited first!");
7332                 }
7333                 const nativeResponseValue = wasm.TS_CResult_NodeFeaturesDecodeErrorZ_err(e);
7334                 return nativeResponseValue;
7335         }
7336         // bool CResult_NodeFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_NodeFeaturesDecodeErrorZ *NONNULL_PTR o);
7337         export function CResult_NodeFeaturesDecodeErrorZ_is_ok(o: number): boolean {
7338                 if(!isWasmInitialized) {
7339                         throw new Error("initializeWasm() must be awaited first!");
7340                 }
7341                 const nativeResponseValue = wasm.TS_CResult_NodeFeaturesDecodeErrorZ_is_ok(o);
7342                 return nativeResponseValue;
7343         }
7344         // void CResult_NodeFeaturesDecodeErrorZ_free(struct LDKCResult_NodeFeaturesDecodeErrorZ _res);
7345         export function CResult_NodeFeaturesDecodeErrorZ_free(_res: number): void {
7346                 if(!isWasmInitialized) {
7347                         throw new Error("initializeWasm() must be awaited first!");
7348                 }
7349                 const nativeResponseValue = wasm.TS_CResult_NodeFeaturesDecodeErrorZ_free(_res);
7350                 // debug statements here
7351         }
7352         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_ok(struct LDKInvoiceFeatures o);
7353         export function CResult_InvoiceFeaturesDecodeErrorZ_ok(o: number): number {
7354                 if(!isWasmInitialized) {
7355                         throw new Error("initializeWasm() must be awaited first!");
7356                 }
7357                 const nativeResponseValue = wasm.TS_CResult_InvoiceFeaturesDecodeErrorZ_ok(o);
7358                 return nativeResponseValue;
7359         }
7360         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
7361         export function CResult_InvoiceFeaturesDecodeErrorZ_err(e: number): number {
7362                 if(!isWasmInitialized) {
7363                         throw new Error("initializeWasm() must be awaited first!");
7364                 }
7365                 const nativeResponseValue = wasm.TS_CResult_InvoiceFeaturesDecodeErrorZ_err(e);
7366                 return nativeResponseValue;
7367         }
7368         // bool CResult_InvoiceFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_InvoiceFeaturesDecodeErrorZ *NONNULL_PTR o);
7369         export function CResult_InvoiceFeaturesDecodeErrorZ_is_ok(o: number): boolean {
7370                 if(!isWasmInitialized) {
7371                         throw new Error("initializeWasm() must be awaited first!");
7372                 }
7373                 const nativeResponseValue = wasm.TS_CResult_InvoiceFeaturesDecodeErrorZ_is_ok(o);
7374                 return nativeResponseValue;
7375         }
7376         // void CResult_InvoiceFeaturesDecodeErrorZ_free(struct LDKCResult_InvoiceFeaturesDecodeErrorZ _res);
7377         export function CResult_InvoiceFeaturesDecodeErrorZ_free(_res: number): void {
7378                 if(!isWasmInitialized) {
7379                         throw new Error("initializeWasm() must be awaited first!");
7380                 }
7381                 const nativeResponseValue = wasm.TS_CResult_InvoiceFeaturesDecodeErrorZ_free(_res);
7382                 // debug statements here
7383         }
7384         // struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ CResult_ChannelTypeFeaturesDecodeErrorZ_ok(struct LDKChannelTypeFeatures o);
7385         export function CResult_ChannelTypeFeaturesDecodeErrorZ_ok(o: number): number {
7386                 if(!isWasmInitialized) {
7387                         throw new Error("initializeWasm() must be awaited first!");
7388                 }
7389                 const nativeResponseValue = wasm.TS_CResult_ChannelTypeFeaturesDecodeErrorZ_ok(o);
7390                 return nativeResponseValue;
7391         }
7392         // struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ CResult_ChannelTypeFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
7393         export function CResult_ChannelTypeFeaturesDecodeErrorZ_err(e: number): number {
7394                 if(!isWasmInitialized) {
7395                         throw new Error("initializeWasm() must be awaited first!");
7396                 }
7397                 const nativeResponseValue = wasm.TS_CResult_ChannelTypeFeaturesDecodeErrorZ_err(e);
7398                 return nativeResponseValue;
7399         }
7400         // bool CResult_ChannelTypeFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR o);
7401         export function CResult_ChannelTypeFeaturesDecodeErrorZ_is_ok(o: number): boolean {
7402                 if(!isWasmInitialized) {
7403                         throw new Error("initializeWasm() must be awaited first!");
7404                 }
7405                 const nativeResponseValue = wasm.TS_CResult_ChannelTypeFeaturesDecodeErrorZ_is_ok(o);
7406                 return nativeResponseValue;
7407         }
7408         // void CResult_ChannelTypeFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ _res);
7409         export function CResult_ChannelTypeFeaturesDecodeErrorZ_free(_res: number): void {
7410                 if(!isWasmInitialized) {
7411                         throw new Error("initializeWasm() must be awaited first!");
7412                 }
7413                 const nativeResponseValue = wasm.TS_CResult_ChannelTypeFeaturesDecodeErrorZ_free(_res);
7414                 // debug statements here
7415         }
7416         // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_ok(struct LDKNetAddress o);
7417         export function CResult_NetAddressDecodeErrorZ_ok(o: number): number {
7418                 if(!isWasmInitialized) {
7419                         throw new Error("initializeWasm() must be awaited first!");
7420                 }
7421                 const nativeResponseValue = wasm.TS_CResult_NetAddressDecodeErrorZ_ok(o);
7422                 return nativeResponseValue;
7423         }
7424         // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_err(struct LDKDecodeError e);
7425         export function CResult_NetAddressDecodeErrorZ_err(e: number): number {
7426                 if(!isWasmInitialized) {
7427                         throw new Error("initializeWasm() must be awaited first!");
7428                 }
7429                 const nativeResponseValue = wasm.TS_CResult_NetAddressDecodeErrorZ_err(e);
7430                 return nativeResponseValue;
7431         }
7432         // bool CResult_NetAddressDecodeErrorZ_is_ok(const struct LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR o);
7433         export function CResult_NetAddressDecodeErrorZ_is_ok(o: number): boolean {
7434                 if(!isWasmInitialized) {
7435                         throw new Error("initializeWasm() must be awaited first!");
7436                 }
7437                 const nativeResponseValue = wasm.TS_CResult_NetAddressDecodeErrorZ_is_ok(o);
7438                 return nativeResponseValue;
7439         }
7440         // void CResult_NetAddressDecodeErrorZ_free(struct LDKCResult_NetAddressDecodeErrorZ _res);
7441         export function CResult_NetAddressDecodeErrorZ_free(_res: number): void {
7442                 if(!isWasmInitialized) {
7443                         throw new Error("initializeWasm() must be awaited first!");
7444                 }
7445                 const nativeResponseValue = wasm.TS_CResult_NetAddressDecodeErrorZ_free(_res);
7446                 // debug statements here
7447         }
7448         // uint64_t CResult_NetAddressDecodeErrorZ_clone_ptr(LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR arg);
7449         export function CResult_NetAddressDecodeErrorZ_clone_ptr(arg: number): number {
7450                 if(!isWasmInitialized) {
7451                         throw new Error("initializeWasm() must be awaited first!");
7452                 }
7453                 const nativeResponseValue = wasm.TS_CResult_NetAddressDecodeErrorZ_clone_ptr(arg);
7454                 return nativeResponseValue;
7455         }
7456         // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_clone(const struct LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR orig);
7457         export function CResult_NetAddressDecodeErrorZ_clone(orig: number): number {
7458                 if(!isWasmInitialized) {
7459                         throw new Error("initializeWasm() must be awaited first!");
7460                 }
7461                 const nativeResponseValue = wasm.TS_CResult_NetAddressDecodeErrorZ_clone(orig);
7462                 return nativeResponseValue;
7463         }
7464         // void CVec_UpdateAddHTLCZ_free(struct LDKCVec_UpdateAddHTLCZ _res);
7465         export function CVec_UpdateAddHTLCZ_free(_res: number[]): void {
7466                 if(!isWasmInitialized) {
7467                         throw new Error("initializeWasm() must be awaited first!");
7468                 }
7469                 const nativeResponseValue = wasm.TS_CVec_UpdateAddHTLCZ_free(_res);
7470                 // debug statements here
7471         }
7472         // void CVec_UpdateFulfillHTLCZ_free(struct LDKCVec_UpdateFulfillHTLCZ _res);
7473         export function CVec_UpdateFulfillHTLCZ_free(_res: number[]): void {
7474                 if(!isWasmInitialized) {
7475                         throw new Error("initializeWasm() must be awaited first!");
7476                 }
7477                 const nativeResponseValue = wasm.TS_CVec_UpdateFulfillHTLCZ_free(_res);
7478                 // debug statements here
7479         }
7480         // void CVec_UpdateFailHTLCZ_free(struct LDKCVec_UpdateFailHTLCZ _res);
7481         export function CVec_UpdateFailHTLCZ_free(_res: number[]): void {
7482                 if(!isWasmInitialized) {
7483                         throw new Error("initializeWasm() must be awaited first!");
7484                 }
7485                 const nativeResponseValue = wasm.TS_CVec_UpdateFailHTLCZ_free(_res);
7486                 // debug statements here
7487         }
7488         // void CVec_UpdateFailMalformedHTLCZ_free(struct LDKCVec_UpdateFailMalformedHTLCZ _res);
7489         export function CVec_UpdateFailMalformedHTLCZ_free(_res: number[]): void {
7490                 if(!isWasmInitialized) {
7491                         throw new Error("initializeWasm() must be awaited first!");
7492                 }
7493                 const nativeResponseValue = wasm.TS_CVec_UpdateFailMalformedHTLCZ_free(_res);
7494                 // debug statements here
7495         }
7496         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_ok(struct LDKAcceptChannel o);
7497         export function CResult_AcceptChannelDecodeErrorZ_ok(o: number): number {
7498                 if(!isWasmInitialized) {
7499                         throw new Error("initializeWasm() must be awaited first!");
7500                 }
7501                 const nativeResponseValue = wasm.TS_CResult_AcceptChannelDecodeErrorZ_ok(o);
7502                 return nativeResponseValue;
7503         }
7504         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_err(struct LDKDecodeError e);
7505         export function CResult_AcceptChannelDecodeErrorZ_err(e: number): number {
7506                 if(!isWasmInitialized) {
7507                         throw new Error("initializeWasm() must be awaited first!");
7508                 }
7509                 const nativeResponseValue = wasm.TS_CResult_AcceptChannelDecodeErrorZ_err(e);
7510                 return nativeResponseValue;
7511         }
7512         // bool CResult_AcceptChannelDecodeErrorZ_is_ok(const struct LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR o);
7513         export function CResult_AcceptChannelDecodeErrorZ_is_ok(o: number): boolean {
7514                 if(!isWasmInitialized) {
7515                         throw new Error("initializeWasm() must be awaited first!");
7516                 }
7517                 const nativeResponseValue = wasm.TS_CResult_AcceptChannelDecodeErrorZ_is_ok(o);
7518                 return nativeResponseValue;
7519         }
7520         // void CResult_AcceptChannelDecodeErrorZ_free(struct LDKCResult_AcceptChannelDecodeErrorZ _res);
7521         export function CResult_AcceptChannelDecodeErrorZ_free(_res: number): void {
7522                 if(!isWasmInitialized) {
7523                         throw new Error("initializeWasm() must be awaited first!");
7524                 }
7525                 const nativeResponseValue = wasm.TS_CResult_AcceptChannelDecodeErrorZ_free(_res);
7526                 // debug statements here
7527         }
7528         // uint64_t CResult_AcceptChannelDecodeErrorZ_clone_ptr(LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR arg);
7529         export function CResult_AcceptChannelDecodeErrorZ_clone_ptr(arg: number): number {
7530                 if(!isWasmInitialized) {
7531                         throw new Error("initializeWasm() must be awaited first!");
7532                 }
7533                 const nativeResponseValue = wasm.TS_CResult_AcceptChannelDecodeErrorZ_clone_ptr(arg);
7534                 return nativeResponseValue;
7535         }
7536         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_clone(const struct LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR orig);
7537         export function CResult_AcceptChannelDecodeErrorZ_clone(orig: number): number {
7538                 if(!isWasmInitialized) {
7539                         throw new Error("initializeWasm() must be awaited first!");
7540                 }
7541                 const nativeResponseValue = wasm.TS_CResult_AcceptChannelDecodeErrorZ_clone(orig);
7542                 return nativeResponseValue;
7543         }
7544         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_ok(struct LDKAnnouncementSignatures o);
7545         export function CResult_AnnouncementSignaturesDecodeErrorZ_ok(o: number): number {
7546                 if(!isWasmInitialized) {
7547                         throw new Error("initializeWasm() must be awaited first!");
7548                 }
7549                 const nativeResponseValue = wasm.TS_CResult_AnnouncementSignaturesDecodeErrorZ_ok(o);
7550                 return nativeResponseValue;
7551         }
7552         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_err(struct LDKDecodeError e);
7553         export function CResult_AnnouncementSignaturesDecodeErrorZ_err(e: number): number {
7554                 if(!isWasmInitialized) {
7555                         throw new Error("initializeWasm() must be awaited first!");
7556                 }
7557                 const nativeResponseValue = wasm.TS_CResult_AnnouncementSignaturesDecodeErrorZ_err(e);
7558                 return nativeResponseValue;
7559         }
7560         // bool CResult_AnnouncementSignaturesDecodeErrorZ_is_ok(const struct LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR o);
7561         export function CResult_AnnouncementSignaturesDecodeErrorZ_is_ok(o: number): boolean {
7562                 if(!isWasmInitialized) {
7563                         throw new Error("initializeWasm() must be awaited first!");
7564                 }
7565                 const nativeResponseValue = wasm.TS_CResult_AnnouncementSignaturesDecodeErrorZ_is_ok(o);
7566                 return nativeResponseValue;
7567         }
7568         // void CResult_AnnouncementSignaturesDecodeErrorZ_free(struct LDKCResult_AnnouncementSignaturesDecodeErrorZ _res);
7569         export function CResult_AnnouncementSignaturesDecodeErrorZ_free(_res: number): void {
7570                 if(!isWasmInitialized) {
7571                         throw new Error("initializeWasm() must be awaited first!");
7572                 }
7573                 const nativeResponseValue = wasm.TS_CResult_AnnouncementSignaturesDecodeErrorZ_free(_res);
7574                 // debug statements here
7575         }
7576         // uint64_t CResult_AnnouncementSignaturesDecodeErrorZ_clone_ptr(LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR arg);
7577         export function CResult_AnnouncementSignaturesDecodeErrorZ_clone_ptr(arg: number): number {
7578                 if(!isWasmInitialized) {
7579                         throw new Error("initializeWasm() must be awaited first!");
7580                 }
7581                 const nativeResponseValue = wasm.TS_CResult_AnnouncementSignaturesDecodeErrorZ_clone_ptr(arg);
7582                 return nativeResponseValue;
7583         }
7584         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_clone(const struct LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR orig);
7585         export function CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig: number): number {
7586                 if(!isWasmInitialized) {
7587                         throw new Error("initializeWasm() must be awaited first!");
7588                 }
7589                 const nativeResponseValue = wasm.TS_CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig);
7590                 return nativeResponseValue;
7591         }
7592         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_ok(struct LDKChannelReestablish o);
7593         export function CResult_ChannelReestablishDecodeErrorZ_ok(o: number): number {
7594                 if(!isWasmInitialized) {
7595                         throw new Error("initializeWasm() must be awaited first!");
7596                 }
7597                 const nativeResponseValue = wasm.TS_CResult_ChannelReestablishDecodeErrorZ_ok(o);
7598                 return nativeResponseValue;
7599         }
7600         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_err(struct LDKDecodeError e);
7601         export function CResult_ChannelReestablishDecodeErrorZ_err(e: number): number {
7602                 if(!isWasmInitialized) {
7603                         throw new Error("initializeWasm() must be awaited first!");
7604                 }
7605                 const nativeResponseValue = wasm.TS_CResult_ChannelReestablishDecodeErrorZ_err(e);
7606                 return nativeResponseValue;
7607         }
7608         // bool CResult_ChannelReestablishDecodeErrorZ_is_ok(const struct LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR o);
7609         export function CResult_ChannelReestablishDecodeErrorZ_is_ok(o: number): boolean {
7610                 if(!isWasmInitialized) {
7611                         throw new Error("initializeWasm() must be awaited first!");
7612                 }
7613                 const nativeResponseValue = wasm.TS_CResult_ChannelReestablishDecodeErrorZ_is_ok(o);
7614                 return nativeResponseValue;
7615         }
7616         // void CResult_ChannelReestablishDecodeErrorZ_free(struct LDKCResult_ChannelReestablishDecodeErrorZ _res);
7617         export function CResult_ChannelReestablishDecodeErrorZ_free(_res: number): void {
7618                 if(!isWasmInitialized) {
7619                         throw new Error("initializeWasm() must be awaited first!");
7620                 }
7621                 const nativeResponseValue = wasm.TS_CResult_ChannelReestablishDecodeErrorZ_free(_res);
7622                 // debug statements here
7623         }
7624         // uint64_t CResult_ChannelReestablishDecodeErrorZ_clone_ptr(LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR arg);
7625         export function CResult_ChannelReestablishDecodeErrorZ_clone_ptr(arg: number): number {
7626                 if(!isWasmInitialized) {
7627                         throw new Error("initializeWasm() must be awaited first!");
7628                 }
7629                 const nativeResponseValue = wasm.TS_CResult_ChannelReestablishDecodeErrorZ_clone_ptr(arg);
7630                 return nativeResponseValue;
7631         }
7632         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_clone(const struct LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR orig);
7633         export function CResult_ChannelReestablishDecodeErrorZ_clone(orig: number): number {
7634                 if(!isWasmInitialized) {
7635                         throw new Error("initializeWasm() must be awaited first!");
7636                 }
7637                 const nativeResponseValue = wasm.TS_CResult_ChannelReestablishDecodeErrorZ_clone(orig);
7638                 return nativeResponseValue;
7639         }
7640         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_ok(struct LDKClosingSigned o);
7641         export function CResult_ClosingSignedDecodeErrorZ_ok(o: number): number {
7642                 if(!isWasmInitialized) {
7643                         throw new Error("initializeWasm() must be awaited first!");
7644                 }
7645                 const nativeResponseValue = wasm.TS_CResult_ClosingSignedDecodeErrorZ_ok(o);
7646                 return nativeResponseValue;
7647         }
7648         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_err(struct LDKDecodeError e);
7649         export function CResult_ClosingSignedDecodeErrorZ_err(e: number): number {
7650                 if(!isWasmInitialized) {
7651                         throw new Error("initializeWasm() must be awaited first!");
7652                 }
7653                 const nativeResponseValue = wasm.TS_CResult_ClosingSignedDecodeErrorZ_err(e);
7654                 return nativeResponseValue;
7655         }
7656         // bool CResult_ClosingSignedDecodeErrorZ_is_ok(const struct LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR o);
7657         export function CResult_ClosingSignedDecodeErrorZ_is_ok(o: number): boolean {
7658                 if(!isWasmInitialized) {
7659                         throw new Error("initializeWasm() must be awaited first!");
7660                 }
7661                 const nativeResponseValue = wasm.TS_CResult_ClosingSignedDecodeErrorZ_is_ok(o);
7662                 return nativeResponseValue;
7663         }
7664         // void CResult_ClosingSignedDecodeErrorZ_free(struct LDKCResult_ClosingSignedDecodeErrorZ _res);
7665         export function CResult_ClosingSignedDecodeErrorZ_free(_res: number): void {
7666                 if(!isWasmInitialized) {
7667                         throw new Error("initializeWasm() must be awaited first!");
7668                 }
7669                 const nativeResponseValue = wasm.TS_CResult_ClosingSignedDecodeErrorZ_free(_res);
7670                 // debug statements here
7671         }
7672         // uint64_t CResult_ClosingSignedDecodeErrorZ_clone_ptr(LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR arg);
7673         export function CResult_ClosingSignedDecodeErrorZ_clone_ptr(arg: number): number {
7674                 if(!isWasmInitialized) {
7675                         throw new Error("initializeWasm() must be awaited first!");
7676                 }
7677                 const nativeResponseValue = wasm.TS_CResult_ClosingSignedDecodeErrorZ_clone_ptr(arg);
7678                 return nativeResponseValue;
7679         }
7680         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR orig);
7681         export function CResult_ClosingSignedDecodeErrorZ_clone(orig: number): number {
7682                 if(!isWasmInitialized) {
7683                         throw new Error("initializeWasm() must be awaited first!");
7684                 }
7685                 const nativeResponseValue = wasm.TS_CResult_ClosingSignedDecodeErrorZ_clone(orig);
7686                 return nativeResponseValue;
7687         }
7688         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(struct LDKClosingSignedFeeRange o);
7689         export function CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(o: number): number {
7690                 if(!isWasmInitialized) {
7691                         throw new Error("initializeWasm() must be awaited first!");
7692                 }
7693                 const nativeResponseValue = wasm.TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(o);
7694                 return nativeResponseValue;
7695         }
7696         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ CResult_ClosingSignedFeeRangeDecodeErrorZ_err(struct LDKDecodeError e);
7697         export function CResult_ClosingSignedFeeRangeDecodeErrorZ_err(e: number): number {
7698                 if(!isWasmInitialized) {
7699                         throw new Error("initializeWasm() must be awaited first!");
7700                 }
7701                 const nativeResponseValue = wasm.TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_err(e);
7702                 return nativeResponseValue;
7703         }
7704         // bool CResult_ClosingSignedFeeRangeDecodeErrorZ_is_ok(const struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ *NONNULL_PTR o);
7705         export function CResult_ClosingSignedFeeRangeDecodeErrorZ_is_ok(o: number): boolean {
7706                 if(!isWasmInitialized) {
7707                         throw new Error("initializeWasm() must be awaited first!");
7708                 }
7709                 const nativeResponseValue = wasm.TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_is_ok(o);
7710                 return nativeResponseValue;
7711         }
7712         // void CResult_ClosingSignedFeeRangeDecodeErrorZ_free(struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ _res);
7713         export function CResult_ClosingSignedFeeRangeDecodeErrorZ_free(_res: number): void {
7714                 if(!isWasmInitialized) {
7715                         throw new Error("initializeWasm() must be awaited first!");
7716                 }
7717                 const nativeResponseValue = wasm.TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_free(_res);
7718                 // debug statements here
7719         }
7720         // uint64_t CResult_ClosingSignedFeeRangeDecodeErrorZ_clone_ptr(LDKCResult_ClosingSignedFeeRangeDecodeErrorZ *NONNULL_PTR arg);
7721         export function CResult_ClosingSignedFeeRangeDecodeErrorZ_clone_ptr(arg: number): number {
7722                 if(!isWasmInitialized) {
7723                         throw new Error("initializeWasm() must be awaited first!");
7724                 }
7725                 const nativeResponseValue = wasm.TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_clone_ptr(arg);
7726                 return nativeResponseValue;
7727         }
7728         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ CResult_ClosingSignedFeeRangeDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ *NONNULL_PTR orig);
7729         export function CResult_ClosingSignedFeeRangeDecodeErrorZ_clone(orig: number): number {
7730                 if(!isWasmInitialized) {
7731                         throw new Error("initializeWasm() must be awaited first!");
7732                 }
7733                 const nativeResponseValue = wasm.TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_clone(orig);
7734                 return nativeResponseValue;
7735         }
7736         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_ok(struct LDKCommitmentSigned o);
7737         export function CResult_CommitmentSignedDecodeErrorZ_ok(o: number): number {
7738                 if(!isWasmInitialized) {
7739                         throw new Error("initializeWasm() must be awaited first!");
7740                 }
7741                 const nativeResponseValue = wasm.TS_CResult_CommitmentSignedDecodeErrorZ_ok(o);
7742                 return nativeResponseValue;
7743         }
7744         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_err(struct LDKDecodeError e);
7745         export function CResult_CommitmentSignedDecodeErrorZ_err(e: number): number {
7746                 if(!isWasmInitialized) {
7747                         throw new Error("initializeWasm() must be awaited first!");
7748                 }
7749                 const nativeResponseValue = wasm.TS_CResult_CommitmentSignedDecodeErrorZ_err(e);
7750                 return nativeResponseValue;
7751         }
7752         // bool CResult_CommitmentSignedDecodeErrorZ_is_ok(const struct LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR o);
7753         export function CResult_CommitmentSignedDecodeErrorZ_is_ok(o: number): boolean {
7754                 if(!isWasmInitialized) {
7755                         throw new Error("initializeWasm() must be awaited first!");
7756                 }
7757                 const nativeResponseValue = wasm.TS_CResult_CommitmentSignedDecodeErrorZ_is_ok(o);
7758                 return nativeResponseValue;
7759         }
7760         // void CResult_CommitmentSignedDecodeErrorZ_free(struct LDKCResult_CommitmentSignedDecodeErrorZ _res);
7761         export function CResult_CommitmentSignedDecodeErrorZ_free(_res: number): void {
7762                 if(!isWasmInitialized) {
7763                         throw new Error("initializeWasm() must be awaited first!");
7764                 }
7765                 const nativeResponseValue = wasm.TS_CResult_CommitmentSignedDecodeErrorZ_free(_res);
7766                 // debug statements here
7767         }
7768         // uint64_t CResult_CommitmentSignedDecodeErrorZ_clone_ptr(LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR arg);
7769         export function CResult_CommitmentSignedDecodeErrorZ_clone_ptr(arg: number): number {
7770                 if(!isWasmInitialized) {
7771                         throw new Error("initializeWasm() must be awaited first!");
7772                 }
7773                 const nativeResponseValue = wasm.TS_CResult_CommitmentSignedDecodeErrorZ_clone_ptr(arg);
7774                 return nativeResponseValue;
7775         }
7776         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_clone(const struct LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR orig);
7777         export function CResult_CommitmentSignedDecodeErrorZ_clone(orig: number): number {
7778                 if(!isWasmInitialized) {
7779                         throw new Error("initializeWasm() must be awaited first!");
7780                 }
7781                 const nativeResponseValue = wasm.TS_CResult_CommitmentSignedDecodeErrorZ_clone(orig);
7782                 return nativeResponseValue;
7783         }
7784         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_ok(struct LDKFundingCreated o);
7785         export function CResult_FundingCreatedDecodeErrorZ_ok(o: number): number {
7786                 if(!isWasmInitialized) {
7787                         throw new Error("initializeWasm() must be awaited first!");
7788                 }
7789                 const nativeResponseValue = wasm.TS_CResult_FundingCreatedDecodeErrorZ_ok(o);
7790                 return nativeResponseValue;
7791         }
7792         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_err(struct LDKDecodeError e);
7793         export function CResult_FundingCreatedDecodeErrorZ_err(e: number): number {
7794                 if(!isWasmInitialized) {
7795                         throw new Error("initializeWasm() must be awaited first!");
7796                 }
7797                 const nativeResponseValue = wasm.TS_CResult_FundingCreatedDecodeErrorZ_err(e);
7798                 return nativeResponseValue;
7799         }
7800         // bool CResult_FundingCreatedDecodeErrorZ_is_ok(const struct LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR o);
7801         export function CResult_FundingCreatedDecodeErrorZ_is_ok(o: number): boolean {
7802                 if(!isWasmInitialized) {
7803                         throw new Error("initializeWasm() must be awaited first!");
7804                 }
7805                 const nativeResponseValue = wasm.TS_CResult_FundingCreatedDecodeErrorZ_is_ok(o);
7806                 return nativeResponseValue;
7807         }
7808         // void CResult_FundingCreatedDecodeErrorZ_free(struct LDKCResult_FundingCreatedDecodeErrorZ _res);
7809         export function CResult_FundingCreatedDecodeErrorZ_free(_res: number): void {
7810                 if(!isWasmInitialized) {
7811                         throw new Error("initializeWasm() must be awaited first!");
7812                 }
7813                 const nativeResponseValue = wasm.TS_CResult_FundingCreatedDecodeErrorZ_free(_res);
7814                 // debug statements here
7815         }
7816         // uint64_t CResult_FundingCreatedDecodeErrorZ_clone_ptr(LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR arg);
7817         export function CResult_FundingCreatedDecodeErrorZ_clone_ptr(arg: number): number {
7818                 if(!isWasmInitialized) {
7819                         throw new Error("initializeWasm() must be awaited first!");
7820                 }
7821                 const nativeResponseValue = wasm.TS_CResult_FundingCreatedDecodeErrorZ_clone_ptr(arg);
7822                 return nativeResponseValue;
7823         }
7824         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_clone(const struct LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR orig);
7825         export function CResult_FundingCreatedDecodeErrorZ_clone(orig: number): number {
7826                 if(!isWasmInitialized) {
7827                         throw new Error("initializeWasm() must be awaited first!");
7828                 }
7829                 const nativeResponseValue = wasm.TS_CResult_FundingCreatedDecodeErrorZ_clone(orig);
7830                 return nativeResponseValue;
7831         }
7832         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_ok(struct LDKFundingSigned o);
7833         export function CResult_FundingSignedDecodeErrorZ_ok(o: number): number {
7834                 if(!isWasmInitialized) {
7835                         throw new Error("initializeWasm() must be awaited first!");
7836                 }
7837                 const nativeResponseValue = wasm.TS_CResult_FundingSignedDecodeErrorZ_ok(o);
7838                 return nativeResponseValue;
7839         }
7840         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_err(struct LDKDecodeError e);
7841         export function CResult_FundingSignedDecodeErrorZ_err(e: number): number {
7842                 if(!isWasmInitialized) {
7843                         throw new Error("initializeWasm() must be awaited first!");
7844                 }
7845                 const nativeResponseValue = wasm.TS_CResult_FundingSignedDecodeErrorZ_err(e);
7846                 return nativeResponseValue;
7847         }
7848         // bool CResult_FundingSignedDecodeErrorZ_is_ok(const struct LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR o);
7849         export function CResult_FundingSignedDecodeErrorZ_is_ok(o: number): boolean {
7850                 if(!isWasmInitialized) {
7851                         throw new Error("initializeWasm() must be awaited first!");
7852                 }
7853                 const nativeResponseValue = wasm.TS_CResult_FundingSignedDecodeErrorZ_is_ok(o);
7854                 return nativeResponseValue;
7855         }
7856         // void CResult_FundingSignedDecodeErrorZ_free(struct LDKCResult_FundingSignedDecodeErrorZ _res);
7857         export function CResult_FundingSignedDecodeErrorZ_free(_res: number): void {
7858                 if(!isWasmInitialized) {
7859                         throw new Error("initializeWasm() must be awaited first!");
7860                 }
7861                 const nativeResponseValue = wasm.TS_CResult_FundingSignedDecodeErrorZ_free(_res);
7862                 // debug statements here
7863         }
7864         // uint64_t CResult_FundingSignedDecodeErrorZ_clone_ptr(LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR arg);
7865         export function CResult_FundingSignedDecodeErrorZ_clone_ptr(arg: number): number {
7866                 if(!isWasmInitialized) {
7867                         throw new Error("initializeWasm() must be awaited first!");
7868                 }
7869                 const nativeResponseValue = wasm.TS_CResult_FundingSignedDecodeErrorZ_clone_ptr(arg);
7870                 return nativeResponseValue;
7871         }
7872         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_clone(const struct LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR orig);
7873         export function CResult_FundingSignedDecodeErrorZ_clone(orig: number): number {
7874                 if(!isWasmInitialized) {
7875                         throw new Error("initializeWasm() must be awaited first!");
7876                 }
7877                 const nativeResponseValue = wasm.TS_CResult_FundingSignedDecodeErrorZ_clone(orig);
7878                 return nativeResponseValue;
7879         }
7880         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_ok(struct LDKFundingLocked o);
7881         export function CResult_FundingLockedDecodeErrorZ_ok(o: number): number {
7882                 if(!isWasmInitialized) {
7883                         throw new Error("initializeWasm() must be awaited first!");
7884                 }
7885                 const nativeResponseValue = wasm.TS_CResult_FundingLockedDecodeErrorZ_ok(o);
7886                 return nativeResponseValue;
7887         }
7888         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_err(struct LDKDecodeError e);
7889         export function CResult_FundingLockedDecodeErrorZ_err(e: number): number {
7890                 if(!isWasmInitialized) {
7891                         throw new Error("initializeWasm() must be awaited first!");
7892                 }
7893                 const nativeResponseValue = wasm.TS_CResult_FundingLockedDecodeErrorZ_err(e);
7894                 return nativeResponseValue;
7895         }
7896         // bool CResult_FundingLockedDecodeErrorZ_is_ok(const struct LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR o);
7897         export function CResult_FundingLockedDecodeErrorZ_is_ok(o: number): boolean {
7898                 if(!isWasmInitialized) {
7899                         throw new Error("initializeWasm() must be awaited first!");
7900                 }
7901                 const nativeResponseValue = wasm.TS_CResult_FundingLockedDecodeErrorZ_is_ok(o);
7902                 return nativeResponseValue;
7903         }
7904         // void CResult_FundingLockedDecodeErrorZ_free(struct LDKCResult_FundingLockedDecodeErrorZ _res);
7905         export function CResult_FundingLockedDecodeErrorZ_free(_res: number): void {
7906                 if(!isWasmInitialized) {
7907                         throw new Error("initializeWasm() must be awaited first!");
7908                 }
7909                 const nativeResponseValue = wasm.TS_CResult_FundingLockedDecodeErrorZ_free(_res);
7910                 // debug statements here
7911         }
7912         // uint64_t CResult_FundingLockedDecodeErrorZ_clone_ptr(LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR arg);
7913         export function CResult_FundingLockedDecodeErrorZ_clone_ptr(arg: number): number {
7914                 if(!isWasmInitialized) {
7915                         throw new Error("initializeWasm() must be awaited first!");
7916                 }
7917                 const nativeResponseValue = wasm.TS_CResult_FundingLockedDecodeErrorZ_clone_ptr(arg);
7918                 return nativeResponseValue;
7919         }
7920         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_clone(const struct LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR orig);
7921         export function CResult_FundingLockedDecodeErrorZ_clone(orig: number): number {
7922                 if(!isWasmInitialized) {
7923                         throw new Error("initializeWasm() must be awaited first!");
7924                 }
7925                 const nativeResponseValue = wasm.TS_CResult_FundingLockedDecodeErrorZ_clone(orig);
7926                 return nativeResponseValue;
7927         }
7928         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_ok(struct LDKInit o);
7929         export function CResult_InitDecodeErrorZ_ok(o: number): number {
7930                 if(!isWasmInitialized) {
7931                         throw new Error("initializeWasm() must be awaited first!");
7932                 }
7933                 const nativeResponseValue = wasm.TS_CResult_InitDecodeErrorZ_ok(o);
7934                 return nativeResponseValue;
7935         }
7936         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_err(struct LDKDecodeError e);
7937         export function CResult_InitDecodeErrorZ_err(e: number): number {
7938                 if(!isWasmInitialized) {
7939                         throw new Error("initializeWasm() must be awaited first!");
7940                 }
7941                 const nativeResponseValue = wasm.TS_CResult_InitDecodeErrorZ_err(e);
7942                 return nativeResponseValue;
7943         }
7944         // bool CResult_InitDecodeErrorZ_is_ok(const struct LDKCResult_InitDecodeErrorZ *NONNULL_PTR o);
7945         export function CResult_InitDecodeErrorZ_is_ok(o: number): boolean {
7946                 if(!isWasmInitialized) {
7947                         throw new Error("initializeWasm() must be awaited first!");
7948                 }
7949                 const nativeResponseValue = wasm.TS_CResult_InitDecodeErrorZ_is_ok(o);
7950                 return nativeResponseValue;
7951         }
7952         // void CResult_InitDecodeErrorZ_free(struct LDKCResult_InitDecodeErrorZ _res);
7953         export function CResult_InitDecodeErrorZ_free(_res: number): void {
7954                 if(!isWasmInitialized) {
7955                         throw new Error("initializeWasm() must be awaited first!");
7956                 }
7957                 const nativeResponseValue = wasm.TS_CResult_InitDecodeErrorZ_free(_res);
7958                 // debug statements here
7959         }
7960         // uint64_t CResult_InitDecodeErrorZ_clone_ptr(LDKCResult_InitDecodeErrorZ *NONNULL_PTR arg);
7961         export function CResult_InitDecodeErrorZ_clone_ptr(arg: number): number {
7962                 if(!isWasmInitialized) {
7963                         throw new Error("initializeWasm() must be awaited first!");
7964                 }
7965                 const nativeResponseValue = wasm.TS_CResult_InitDecodeErrorZ_clone_ptr(arg);
7966                 return nativeResponseValue;
7967         }
7968         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_clone(const struct LDKCResult_InitDecodeErrorZ *NONNULL_PTR orig);
7969         export function CResult_InitDecodeErrorZ_clone(orig: number): number {
7970                 if(!isWasmInitialized) {
7971                         throw new Error("initializeWasm() must be awaited first!");
7972                 }
7973                 const nativeResponseValue = wasm.TS_CResult_InitDecodeErrorZ_clone(orig);
7974                 return nativeResponseValue;
7975         }
7976         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_ok(struct LDKOpenChannel o);
7977         export function CResult_OpenChannelDecodeErrorZ_ok(o: number): number {
7978                 if(!isWasmInitialized) {
7979                         throw new Error("initializeWasm() must be awaited first!");
7980                 }
7981                 const nativeResponseValue = wasm.TS_CResult_OpenChannelDecodeErrorZ_ok(o);
7982                 return nativeResponseValue;
7983         }
7984         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_err(struct LDKDecodeError e);
7985         export function CResult_OpenChannelDecodeErrorZ_err(e: number): number {
7986                 if(!isWasmInitialized) {
7987                         throw new Error("initializeWasm() must be awaited first!");
7988                 }
7989                 const nativeResponseValue = wasm.TS_CResult_OpenChannelDecodeErrorZ_err(e);
7990                 return nativeResponseValue;
7991         }
7992         // bool CResult_OpenChannelDecodeErrorZ_is_ok(const struct LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR o);
7993         export function CResult_OpenChannelDecodeErrorZ_is_ok(o: number): boolean {
7994                 if(!isWasmInitialized) {
7995                         throw new Error("initializeWasm() must be awaited first!");
7996                 }
7997                 const nativeResponseValue = wasm.TS_CResult_OpenChannelDecodeErrorZ_is_ok(o);
7998                 return nativeResponseValue;
7999         }
8000         // void CResult_OpenChannelDecodeErrorZ_free(struct LDKCResult_OpenChannelDecodeErrorZ _res);
8001         export function CResult_OpenChannelDecodeErrorZ_free(_res: number): void {
8002                 if(!isWasmInitialized) {
8003                         throw new Error("initializeWasm() must be awaited first!");
8004                 }
8005                 const nativeResponseValue = wasm.TS_CResult_OpenChannelDecodeErrorZ_free(_res);
8006                 // debug statements here
8007         }
8008         // uint64_t CResult_OpenChannelDecodeErrorZ_clone_ptr(LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR arg);
8009         export function CResult_OpenChannelDecodeErrorZ_clone_ptr(arg: number): number {
8010                 if(!isWasmInitialized) {
8011                         throw new Error("initializeWasm() must be awaited first!");
8012                 }
8013                 const nativeResponseValue = wasm.TS_CResult_OpenChannelDecodeErrorZ_clone_ptr(arg);
8014                 return nativeResponseValue;
8015         }
8016         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_clone(const struct LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR orig);
8017         export function CResult_OpenChannelDecodeErrorZ_clone(orig: number): number {
8018                 if(!isWasmInitialized) {
8019                         throw new Error("initializeWasm() must be awaited first!");
8020                 }
8021                 const nativeResponseValue = wasm.TS_CResult_OpenChannelDecodeErrorZ_clone(orig);
8022                 return nativeResponseValue;
8023         }
8024         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_ok(struct LDKRevokeAndACK o);
8025         export function CResult_RevokeAndACKDecodeErrorZ_ok(o: number): number {
8026                 if(!isWasmInitialized) {
8027                         throw new Error("initializeWasm() must be awaited first!");
8028                 }
8029                 const nativeResponseValue = wasm.TS_CResult_RevokeAndACKDecodeErrorZ_ok(o);
8030                 return nativeResponseValue;
8031         }
8032         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_err(struct LDKDecodeError e);
8033         export function CResult_RevokeAndACKDecodeErrorZ_err(e: number): number {
8034                 if(!isWasmInitialized) {
8035                         throw new Error("initializeWasm() must be awaited first!");
8036                 }
8037                 const nativeResponseValue = wasm.TS_CResult_RevokeAndACKDecodeErrorZ_err(e);
8038                 return nativeResponseValue;
8039         }
8040         // bool CResult_RevokeAndACKDecodeErrorZ_is_ok(const struct LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR o);
8041         export function CResult_RevokeAndACKDecodeErrorZ_is_ok(o: number): boolean {
8042                 if(!isWasmInitialized) {
8043                         throw new Error("initializeWasm() must be awaited first!");
8044                 }
8045                 const nativeResponseValue = wasm.TS_CResult_RevokeAndACKDecodeErrorZ_is_ok(o);
8046                 return nativeResponseValue;
8047         }
8048         // void CResult_RevokeAndACKDecodeErrorZ_free(struct LDKCResult_RevokeAndACKDecodeErrorZ _res);
8049         export function CResult_RevokeAndACKDecodeErrorZ_free(_res: number): void {
8050                 if(!isWasmInitialized) {
8051                         throw new Error("initializeWasm() must be awaited first!");
8052                 }
8053                 const nativeResponseValue = wasm.TS_CResult_RevokeAndACKDecodeErrorZ_free(_res);
8054                 // debug statements here
8055         }
8056         // uint64_t CResult_RevokeAndACKDecodeErrorZ_clone_ptr(LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR arg);
8057         export function CResult_RevokeAndACKDecodeErrorZ_clone_ptr(arg: number): number {
8058                 if(!isWasmInitialized) {
8059                         throw new Error("initializeWasm() must be awaited first!");
8060                 }
8061                 const nativeResponseValue = wasm.TS_CResult_RevokeAndACKDecodeErrorZ_clone_ptr(arg);
8062                 return nativeResponseValue;
8063         }
8064         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_clone(const struct LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR orig);
8065         export function CResult_RevokeAndACKDecodeErrorZ_clone(orig: number): number {
8066                 if(!isWasmInitialized) {
8067                         throw new Error("initializeWasm() must be awaited first!");
8068                 }
8069                 const nativeResponseValue = wasm.TS_CResult_RevokeAndACKDecodeErrorZ_clone(orig);
8070                 return nativeResponseValue;
8071         }
8072         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_ok(struct LDKShutdown o);
8073         export function CResult_ShutdownDecodeErrorZ_ok(o: number): number {
8074                 if(!isWasmInitialized) {
8075                         throw new Error("initializeWasm() must be awaited first!");
8076                 }
8077                 const nativeResponseValue = wasm.TS_CResult_ShutdownDecodeErrorZ_ok(o);
8078                 return nativeResponseValue;
8079         }
8080         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_err(struct LDKDecodeError e);
8081         export function CResult_ShutdownDecodeErrorZ_err(e: number): number {
8082                 if(!isWasmInitialized) {
8083                         throw new Error("initializeWasm() must be awaited first!");
8084                 }
8085                 const nativeResponseValue = wasm.TS_CResult_ShutdownDecodeErrorZ_err(e);
8086                 return nativeResponseValue;
8087         }
8088         // bool CResult_ShutdownDecodeErrorZ_is_ok(const struct LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR o);
8089         export function CResult_ShutdownDecodeErrorZ_is_ok(o: number): boolean {
8090                 if(!isWasmInitialized) {
8091                         throw new Error("initializeWasm() must be awaited first!");
8092                 }
8093                 const nativeResponseValue = wasm.TS_CResult_ShutdownDecodeErrorZ_is_ok(o);
8094                 return nativeResponseValue;
8095         }
8096         // void CResult_ShutdownDecodeErrorZ_free(struct LDKCResult_ShutdownDecodeErrorZ _res);
8097         export function CResult_ShutdownDecodeErrorZ_free(_res: number): void {
8098                 if(!isWasmInitialized) {
8099                         throw new Error("initializeWasm() must be awaited first!");
8100                 }
8101                 const nativeResponseValue = wasm.TS_CResult_ShutdownDecodeErrorZ_free(_res);
8102                 // debug statements here
8103         }
8104         // uint64_t CResult_ShutdownDecodeErrorZ_clone_ptr(LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR arg);
8105         export function CResult_ShutdownDecodeErrorZ_clone_ptr(arg: number): number {
8106                 if(!isWasmInitialized) {
8107                         throw new Error("initializeWasm() must be awaited first!");
8108                 }
8109                 const nativeResponseValue = wasm.TS_CResult_ShutdownDecodeErrorZ_clone_ptr(arg);
8110                 return nativeResponseValue;
8111         }
8112         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_clone(const struct LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR orig);
8113         export function CResult_ShutdownDecodeErrorZ_clone(orig: number): number {
8114                 if(!isWasmInitialized) {
8115                         throw new Error("initializeWasm() must be awaited first!");
8116                 }
8117                 const nativeResponseValue = wasm.TS_CResult_ShutdownDecodeErrorZ_clone(orig);
8118                 return nativeResponseValue;
8119         }
8120         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_ok(struct LDKUpdateFailHTLC o);
8121         export function CResult_UpdateFailHTLCDecodeErrorZ_ok(o: number): number {
8122                 if(!isWasmInitialized) {
8123                         throw new Error("initializeWasm() must be awaited first!");
8124                 }
8125                 const nativeResponseValue = wasm.TS_CResult_UpdateFailHTLCDecodeErrorZ_ok(o);
8126                 return nativeResponseValue;
8127         }
8128         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_err(struct LDKDecodeError e);
8129         export function CResult_UpdateFailHTLCDecodeErrorZ_err(e: number): number {
8130                 if(!isWasmInitialized) {
8131                         throw new Error("initializeWasm() must be awaited first!");
8132                 }
8133                 const nativeResponseValue = wasm.TS_CResult_UpdateFailHTLCDecodeErrorZ_err(e);
8134                 return nativeResponseValue;
8135         }
8136         // bool CResult_UpdateFailHTLCDecodeErrorZ_is_ok(const struct LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR o);
8137         export function CResult_UpdateFailHTLCDecodeErrorZ_is_ok(o: number): boolean {
8138                 if(!isWasmInitialized) {
8139                         throw new Error("initializeWasm() must be awaited first!");
8140                 }
8141                 const nativeResponseValue = wasm.TS_CResult_UpdateFailHTLCDecodeErrorZ_is_ok(o);
8142                 return nativeResponseValue;
8143         }
8144         // void CResult_UpdateFailHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailHTLCDecodeErrorZ _res);
8145         export function CResult_UpdateFailHTLCDecodeErrorZ_free(_res: number): void {
8146                 if(!isWasmInitialized) {
8147                         throw new Error("initializeWasm() must be awaited first!");
8148                 }
8149                 const nativeResponseValue = wasm.TS_CResult_UpdateFailHTLCDecodeErrorZ_free(_res);
8150                 // debug statements here
8151         }
8152         // uint64_t CResult_UpdateFailHTLCDecodeErrorZ_clone_ptr(LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR arg);
8153         export function CResult_UpdateFailHTLCDecodeErrorZ_clone_ptr(arg: number): number {
8154                 if(!isWasmInitialized) {
8155                         throw new Error("initializeWasm() must be awaited first!");
8156                 }
8157                 const nativeResponseValue = wasm.TS_CResult_UpdateFailHTLCDecodeErrorZ_clone_ptr(arg);
8158                 return nativeResponseValue;
8159         }
8160         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR orig);
8161         export function CResult_UpdateFailHTLCDecodeErrorZ_clone(orig: number): number {
8162                 if(!isWasmInitialized) {
8163                         throw new Error("initializeWasm() must be awaited first!");
8164                 }
8165                 const nativeResponseValue = wasm.TS_CResult_UpdateFailHTLCDecodeErrorZ_clone(orig);
8166                 return nativeResponseValue;
8167         }
8168         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(struct LDKUpdateFailMalformedHTLC o);
8169         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o: number): number {
8170                 if(!isWasmInitialized) {
8171                         throw new Error("initializeWasm() must be awaited first!");
8172                 }
8173                 const nativeResponseValue = wasm.TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o);
8174                 return nativeResponseValue;
8175         }
8176         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(struct LDKDecodeError e);
8177         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e: number): number {
8178                 if(!isWasmInitialized) {
8179                         throw new Error("initializeWasm() must be awaited first!");
8180                 }
8181                 const nativeResponseValue = wasm.TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e);
8182                 return nativeResponseValue;
8183         }
8184         // bool CResult_UpdateFailMalformedHTLCDecodeErrorZ_is_ok(const struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR o);
8185         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_is_ok(o: number): boolean {
8186                 if(!isWasmInitialized) {
8187                         throw new Error("initializeWasm() must be awaited first!");
8188                 }
8189                 const nativeResponseValue = wasm.TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_is_ok(o);
8190                 return nativeResponseValue;
8191         }
8192         // void CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ _res);
8193         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res: number): void {
8194                 if(!isWasmInitialized) {
8195                         throw new Error("initializeWasm() must be awaited first!");
8196                 }
8197                 const nativeResponseValue = wasm.TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res);
8198                 // debug statements here
8199         }
8200         // uint64_t CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone_ptr(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR arg);
8201         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone_ptr(arg: number): number {
8202                 if(!isWasmInitialized) {
8203                         throw new Error("initializeWasm() must be awaited first!");
8204                 }
8205                 const nativeResponseValue = wasm.TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone_ptr(arg);
8206                 return nativeResponseValue;
8207         }
8208         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR orig);
8209         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig: number): number {
8210                 if(!isWasmInitialized) {
8211                         throw new Error("initializeWasm() must be awaited first!");
8212                 }
8213                 const nativeResponseValue = wasm.TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig);
8214                 return nativeResponseValue;
8215         }
8216         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_ok(struct LDKUpdateFee o);
8217         export function CResult_UpdateFeeDecodeErrorZ_ok(o: number): number {
8218                 if(!isWasmInitialized) {
8219                         throw new Error("initializeWasm() must be awaited first!");
8220                 }
8221                 const nativeResponseValue = wasm.TS_CResult_UpdateFeeDecodeErrorZ_ok(o);
8222                 return nativeResponseValue;
8223         }
8224         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_err(struct LDKDecodeError e);
8225         export function CResult_UpdateFeeDecodeErrorZ_err(e: number): number {
8226                 if(!isWasmInitialized) {
8227                         throw new Error("initializeWasm() must be awaited first!");
8228                 }
8229                 const nativeResponseValue = wasm.TS_CResult_UpdateFeeDecodeErrorZ_err(e);
8230                 return nativeResponseValue;
8231         }
8232         // bool CResult_UpdateFeeDecodeErrorZ_is_ok(const struct LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR o);
8233         export function CResult_UpdateFeeDecodeErrorZ_is_ok(o: number): boolean {
8234                 if(!isWasmInitialized) {
8235                         throw new Error("initializeWasm() must be awaited first!");
8236                 }
8237                 const nativeResponseValue = wasm.TS_CResult_UpdateFeeDecodeErrorZ_is_ok(o);
8238                 return nativeResponseValue;
8239         }
8240         // void CResult_UpdateFeeDecodeErrorZ_free(struct LDKCResult_UpdateFeeDecodeErrorZ _res);
8241         export function CResult_UpdateFeeDecodeErrorZ_free(_res: number): void {
8242                 if(!isWasmInitialized) {
8243                         throw new Error("initializeWasm() must be awaited first!");
8244                 }
8245                 const nativeResponseValue = wasm.TS_CResult_UpdateFeeDecodeErrorZ_free(_res);
8246                 // debug statements here
8247         }
8248         // uint64_t CResult_UpdateFeeDecodeErrorZ_clone_ptr(LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR arg);
8249         export function CResult_UpdateFeeDecodeErrorZ_clone_ptr(arg: number): number {
8250                 if(!isWasmInitialized) {
8251                         throw new Error("initializeWasm() must be awaited first!");
8252                 }
8253                 const nativeResponseValue = wasm.TS_CResult_UpdateFeeDecodeErrorZ_clone_ptr(arg);
8254                 return nativeResponseValue;
8255         }
8256         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_clone(const struct LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR orig);
8257         export function CResult_UpdateFeeDecodeErrorZ_clone(orig: number): number {
8258                 if(!isWasmInitialized) {
8259                         throw new Error("initializeWasm() must be awaited first!");
8260                 }
8261                 const nativeResponseValue = wasm.TS_CResult_UpdateFeeDecodeErrorZ_clone(orig);
8262                 return nativeResponseValue;
8263         }
8264         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_ok(struct LDKUpdateFulfillHTLC o);
8265         export function CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o: number): number {
8266                 if(!isWasmInitialized) {
8267                         throw new Error("initializeWasm() must be awaited first!");
8268                 }
8269                 const nativeResponseValue = wasm.TS_CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o);
8270                 return nativeResponseValue;
8271         }
8272         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_err(struct LDKDecodeError e);
8273         export function CResult_UpdateFulfillHTLCDecodeErrorZ_err(e: number): number {
8274                 if(!isWasmInitialized) {
8275                         throw new Error("initializeWasm() must be awaited first!");
8276                 }
8277                 const nativeResponseValue = wasm.TS_CResult_UpdateFulfillHTLCDecodeErrorZ_err(e);
8278                 return nativeResponseValue;
8279         }
8280         // bool CResult_UpdateFulfillHTLCDecodeErrorZ_is_ok(const struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR o);
8281         export function CResult_UpdateFulfillHTLCDecodeErrorZ_is_ok(o: number): boolean {
8282                 if(!isWasmInitialized) {
8283                         throw new Error("initializeWasm() must be awaited first!");
8284                 }
8285                 const nativeResponseValue = wasm.TS_CResult_UpdateFulfillHTLCDecodeErrorZ_is_ok(o);
8286                 return nativeResponseValue;
8287         }
8288         // void CResult_UpdateFulfillHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ _res);
8289         export function CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res: number): void {
8290                 if(!isWasmInitialized) {
8291                         throw new Error("initializeWasm() must be awaited first!");
8292                 }
8293                 const nativeResponseValue = wasm.TS_CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res);
8294                 // debug statements here
8295         }
8296         // uint64_t CResult_UpdateFulfillHTLCDecodeErrorZ_clone_ptr(LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR arg);
8297         export function CResult_UpdateFulfillHTLCDecodeErrorZ_clone_ptr(arg: number): number {
8298                 if(!isWasmInitialized) {
8299                         throw new Error("initializeWasm() must be awaited first!");
8300                 }
8301                 const nativeResponseValue = wasm.TS_CResult_UpdateFulfillHTLCDecodeErrorZ_clone_ptr(arg);
8302                 return nativeResponseValue;
8303         }
8304         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR orig);
8305         export function CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig: number): number {
8306                 if(!isWasmInitialized) {
8307                         throw new Error("initializeWasm() must be awaited first!");
8308                 }
8309                 const nativeResponseValue = wasm.TS_CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig);
8310                 return nativeResponseValue;
8311         }
8312         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_ok(struct LDKUpdateAddHTLC o);
8313         export function CResult_UpdateAddHTLCDecodeErrorZ_ok(o: number): number {
8314                 if(!isWasmInitialized) {
8315                         throw new Error("initializeWasm() must be awaited first!");
8316                 }
8317                 const nativeResponseValue = wasm.TS_CResult_UpdateAddHTLCDecodeErrorZ_ok(o);
8318                 return nativeResponseValue;
8319         }
8320         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_err(struct LDKDecodeError e);
8321         export function CResult_UpdateAddHTLCDecodeErrorZ_err(e: number): number {
8322                 if(!isWasmInitialized) {
8323                         throw new Error("initializeWasm() must be awaited first!");
8324                 }
8325                 const nativeResponseValue = wasm.TS_CResult_UpdateAddHTLCDecodeErrorZ_err(e);
8326                 return nativeResponseValue;
8327         }
8328         // bool CResult_UpdateAddHTLCDecodeErrorZ_is_ok(const struct LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR o);
8329         export function CResult_UpdateAddHTLCDecodeErrorZ_is_ok(o: number): boolean {
8330                 if(!isWasmInitialized) {
8331                         throw new Error("initializeWasm() must be awaited first!");
8332                 }
8333                 const nativeResponseValue = wasm.TS_CResult_UpdateAddHTLCDecodeErrorZ_is_ok(o);
8334                 return nativeResponseValue;
8335         }
8336         // void CResult_UpdateAddHTLCDecodeErrorZ_free(struct LDKCResult_UpdateAddHTLCDecodeErrorZ _res);
8337         export function CResult_UpdateAddHTLCDecodeErrorZ_free(_res: number): void {
8338                 if(!isWasmInitialized) {
8339                         throw new Error("initializeWasm() must be awaited first!");
8340                 }
8341                 const nativeResponseValue = wasm.TS_CResult_UpdateAddHTLCDecodeErrorZ_free(_res);
8342                 // debug statements here
8343         }
8344         // uint64_t CResult_UpdateAddHTLCDecodeErrorZ_clone_ptr(LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR arg);
8345         export function CResult_UpdateAddHTLCDecodeErrorZ_clone_ptr(arg: number): number {
8346                 if(!isWasmInitialized) {
8347                         throw new Error("initializeWasm() must be awaited first!");
8348                 }
8349                 const nativeResponseValue = wasm.TS_CResult_UpdateAddHTLCDecodeErrorZ_clone_ptr(arg);
8350                 return nativeResponseValue;
8351         }
8352         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR orig);
8353         export function CResult_UpdateAddHTLCDecodeErrorZ_clone(orig: number): number {
8354                 if(!isWasmInitialized) {
8355                         throw new Error("initializeWasm() must be awaited first!");
8356                 }
8357                 const nativeResponseValue = wasm.TS_CResult_UpdateAddHTLCDecodeErrorZ_clone(orig);
8358                 return nativeResponseValue;
8359         }
8360         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_ok(struct LDKPing o);
8361         export function CResult_PingDecodeErrorZ_ok(o: number): number {
8362                 if(!isWasmInitialized) {
8363                         throw new Error("initializeWasm() must be awaited first!");
8364                 }
8365                 const nativeResponseValue = wasm.TS_CResult_PingDecodeErrorZ_ok(o);
8366                 return nativeResponseValue;
8367         }
8368         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_err(struct LDKDecodeError e);
8369         export function CResult_PingDecodeErrorZ_err(e: number): number {
8370                 if(!isWasmInitialized) {
8371                         throw new Error("initializeWasm() must be awaited first!");
8372                 }
8373                 const nativeResponseValue = wasm.TS_CResult_PingDecodeErrorZ_err(e);
8374                 return nativeResponseValue;
8375         }
8376         // bool CResult_PingDecodeErrorZ_is_ok(const struct LDKCResult_PingDecodeErrorZ *NONNULL_PTR o);
8377         export function CResult_PingDecodeErrorZ_is_ok(o: number): boolean {
8378                 if(!isWasmInitialized) {
8379                         throw new Error("initializeWasm() must be awaited first!");
8380                 }
8381                 const nativeResponseValue = wasm.TS_CResult_PingDecodeErrorZ_is_ok(o);
8382                 return nativeResponseValue;
8383         }
8384         // void CResult_PingDecodeErrorZ_free(struct LDKCResult_PingDecodeErrorZ _res);
8385         export function CResult_PingDecodeErrorZ_free(_res: number): void {
8386                 if(!isWasmInitialized) {
8387                         throw new Error("initializeWasm() must be awaited first!");
8388                 }
8389                 const nativeResponseValue = wasm.TS_CResult_PingDecodeErrorZ_free(_res);
8390                 // debug statements here
8391         }
8392         // uint64_t CResult_PingDecodeErrorZ_clone_ptr(LDKCResult_PingDecodeErrorZ *NONNULL_PTR arg);
8393         export function CResult_PingDecodeErrorZ_clone_ptr(arg: number): number {
8394                 if(!isWasmInitialized) {
8395                         throw new Error("initializeWasm() must be awaited first!");
8396                 }
8397                 const nativeResponseValue = wasm.TS_CResult_PingDecodeErrorZ_clone_ptr(arg);
8398                 return nativeResponseValue;
8399         }
8400         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_clone(const struct LDKCResult_PingDecodeErrorZ *NONNULL_PTR orig);
8401         export function CResult_PingDecodeErrorZ_clone(orig: number): number {
8402                 if(!isWasmInitialized) {
8403                         throw new Error("initializeWasm() must be awaited first!");
8404                 }
8405                 const nativeResponseValue = wasm.TS_CResult_PingDecodeErrorZ_clone(orig);
8406                 return nativeResponseValue;
8407         }
8408         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_ok(struct LDKPong o);
8409         export function CResult_PongDecodeErrorZ_ok(o: number): number {
8410                 if(!isWasmInitialized) {
8411                         throw new Error("initializeWasm() must be awaited first!");
8412                 }
8413                 const nativeResponseValue = wasm.TS_CResult_PongDecodeErrorZ_ok(o);
8414                 return nativeResponseValue;
8415         }
8416         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_err(struct LDKDecodeError e);
8417         export function CResult_PongDecodeErrorZ_err(e: number): number {
8418                 if(!isWasmInitialized) {
8419                         throw new Error("initializeWasm() must be awaited first!");
8420                 }
8421                 const nativeResponseValue = wasm.TS_CResult_PongDecodeErrorZ_err(e);
8422                 return nativeResponseValue;
8423         }
8424         // bool CResult_PongDecodeErrorZ_is_ok(const struct LDKCResult_PongDecodeErrorZ *NONNULL_PTR o);
8425         export function CResult_PongDecodeErrorZ_is_ok(o: number): boolean {
8426                 if(!isWasmInitialized) {
8427                         throw new Error("initializeWasm() must be awaited first!");
8428                 }
8429                 const nativeResponseValue = wasm.TS_CResult_PongDecodeErrorZ_is_ok(o);
8430                 return nativeResponseValue;
8431         }
8432         // void CResult_PongDecodeErrorZ_free(struct LDKCResult_PongDecodeErrorZ _res);
8433         export function CResult_PongDecodeErrorZ_free(_res: number): void {
8434                 if(!isWasmInitialized) {
8435                         throw new Error("initializeWasm() must be awaited first!");
8436                 }
8437                 const nativeResponseValue = wasm.TS_CResult_PongDecodeErrorZ_free(_res);
8438                 // debug statements here
8439         }
8440         // uint64_t CResult_PongDecodeErrorZ_clone_ptr(LDKCResult_PongDecodeErrorZ *NONNULL_PTR arg);
8441         export function CResult_PongDecodeErrorZ_clone_ptr(arg: number): number {
8442                 if(!isWasmInitialized) {
8443                         throw new Error("initializeWasm() must be awaited first!");
8444                 }
8445                 const nativeResponseValue = wasm.TS_CResult_PongDecodeErrorZ_clone_ptr(arg);
8446                 return nativeResponseValue;
8447         }
8448         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_clone(const struct LDKCResult_PongDecodeErrorZ *NONNULL_PTR orig);
8449         export function CResult_PongDecodeErrorZ_clone(orig: number): number {
8450                 if(!isWasmInitialized) {
8451                         throw new Error("initializeWasm() must be awaited first!");
8452                 }
8453                 const nativeResponseValue = wasm.TS_CResult_PongDecodeErrorZ_clone(orig);
8454                 return nativeResponseValue;
8455         }
8456         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(struct LDKUnsignedChannelAnnouncement o);
8457         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o: number): number {
8458                 if(!isWasmInitialized) {
8459                         throw new Error("initializeWasm() must be awaited first!");
8460                 }
8461                 const nativeResponseValue = wasm.TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o);
8462                 return nativeResponseValue;
8463         }
8464         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
8465         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e: number): number {
8466                 if(!isWasmInitialized) {
8467                         throw new Error("initializeWasm() must be awaited first!");
8468                 }
8469                 const nativeResponseValue = wasm.TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e);
8470                 return nativeResponseValue;
8471         }
8472         // bool CResult_UnsignedChannelAnnouncementDecodeErrorZ_is_ok(const struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR o);
8473         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_is_ok(o: number): boolean {
8474                 if(!isWasmInitialized) {
8475                         throw new Error("initializeWasm() must be awaited first!");
8476                 }
8477                 const nativeResponseValue = wasm.TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_is_ok(o);
8478                 return nativeResponseValue;
8479         }
8480         // void CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ _res);
8481         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res: number): void {
8482                 if(!isWasmInitialized) {
8483                         throw new Error("initializeWasm() must be awaited first!");
8484                 }
8485                 const nativeResponseValue = wasm.TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res);
8486                 // debug statements here
8487         }
8488         // uint64_t CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone_ptr(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR arg);
8489         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone_ptr(arg: number): number {
8490                 if(!isWasmInitialized) {
8491                         throw new Error("initializeWasm() must be awaited first!");
8492                 }
8493                 const nativeResponseValue = wasm.TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone_ptr(arg);
8494                 return nativeResponseValue;
8495         }
8496         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
8497         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
8498                 if(!isWasmInitialized) {
8499                         throw new Error("initializeWasm() must be awaited first!");
8500                 }
8501                 const nativeResponseValue = wasm.TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig);
8502                 return nativeResponseValue;
8503         }
8504         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_ok(struct LDKChannelAnnouncement o);
8505         export function CResult_ChannelAnnouncementDecodeErrorZ_ok(o: number): number {
8506                 if(!isWasmInitialized) {
8507                         throw new Error("initializeWasm() must be awaited first!");
8508                 }
8509                 const nativeResponseValue = wasm.TS_CResult_ChannelAnnouncementDecodeErrorZ_ok(o);
8510                 return nativeResponseValue;
8511         }
8512         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
8513         export function CResult_ChannelAnnouncementDecodeErrorZ_err(e: number): number {
8514                 if(!isWasmInitialized) {
8515                         throw new Error("initializeWasm() must be awaited first!");
8516                 }
8517                 const nativeResponseValue = wasm.TS_CResult_ChannelAnnouncementDecodeErrorZ_err(e);
8518                 return nativeResponseValue;
8519         }
8520         // bool CResult_ChannelAnnouncementDecodeErrorZ_is_ok(const struct LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR o);
8521         export function CResult_ChannelAnnouncementDecodeErrorZ_is_ok(o: number): boolean {
8522                 if(!isWasmInitialized) {
8523                         throw new Error("initializeWasm() must be awaited first!");
8524                 }
8525                 const nativeResponseValue = wasm.TS_CResult_ChannelAnnouncementDecodeErrorZ_is_ok(o);
8526                 return nativeResponseValue;
8527         }
8528         // void CResult_ChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_ChannelAnnouncementDecodeErrorZ _res);
8529         export function CResult_ChannelAnnouncementDecodeErrorZ_free(_res: number): void {
8530                 if(!isWasmInitialized) {
8531                         throw new Error("initializeWasm() must be awaited first!");
8532                 }
8533                 const nativeResponseValue = wasm.TS_CResult_ChannelAnnouncementDecodeErrorZ_free(_res);
8534                 // debug statements here
8535         }
8536         // uint64_t CResult_ChannelAnnouncementDecodeErrorZ_clone_ptr(LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR arg);
8537         export function CResult_ChannelAnnouncementDecodeErrorZ_clone_ptr(arg: number): number {
8538                 if(!isWasmInitialized) {
8539                         throw new Error("initializeWasm() must be awaited first!");
8540                 }
8541                 const nativeResponseValue = wasm.TS_CResult_ChannelAnnouncementDecodeErrorZ_clone_ptr(arg);
8542                 return nativeResponseValue;
8543         }
8544         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
8545         export function CResult_ChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
8546                 if(!isWasmInitialized) {
8547                         throw new Error("initializeWasm() must be awaited first!");
8548                 }
8549                 const nativeResponseValue = wasm.TS_CResult_ChannelAnnouncementDecodeErrorZ_clone(orig);
8550                 return nativeResponseValue;
8551         }
8552         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_ok(struct LDKUnsignedChannelUpdate o);
8553         export function CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o: number): number {
8554                 if(!isWasmInitialized) {
8555                         throw new Error("initializeWasm() must be awaited first!");
8556                 }
8557                 const nativeResponseValue = wasm.TS_CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o);
8558                 return nativeResponseValue;
8559         }
8560         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
8561         export function CResult_UnsignedChannelUpdateDecodeErrorZ_err(e: number): number {
8562                 if(!isWasmInitialized) {
8563                         throw new Error("initializeWasm() must be awaited first!");
8564                 }
8565                 const nativeResponseValue = wasm.TS_CResult_UnsignedChannelUpdateDecodeErrorZ_err(e);
8566                 return nativeResponseValue;
8567         }
8568         // bool CResult_UnsignedChannelUpdateDecodeErrorZ_is_ok(const struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR o);
8569         export function CResult_UnsignedChannelUpdateDecodeErrorZ_is_ok(o: number): boolean {
8570                 if(!isWasmInitialized) {
8571                         throw new Error("initializeWasm() must be awaited first!");
8572                 }
8573                 const nativeResponseValue = wasm.TS_CResult_UnsignedChannelUpdateDecodeErrorZ_is_ok(o);
8574                 return nativeResponseValue;
8575         }
8576         // void CResult_UnsignedChannelUpdateDecodeErrorZ_free(struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ _res);
8577         export function CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res: number): void {
8578                 if(!isWasmInitialized) {
8579                         throw new Error("initializeWasm() must be awaited first!");
8580                 }
8581                 const nativeResponseValue = wasm.TS_CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res);
8582                 // debug statements here
8583         }
8584         // uint64_t CResult_UnsignedChannelUpdateDecodeErrorZ_clone_ptr(LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR arg);
8585         export function CResult_UnsignedChannelUpdateDecodeErrorZ_clone_ptr(arg: number): number {
8586                 if(!isWasmInitialized) {
8587                         throw new Error("initializeWasm() must be awaited first!");
8588                 }
8589                 const nativeResponseValue = wasm.TS_CResult_UnsignedChannelUpdateDecodeErrorZ_clone_ptr(arg);
8590                 return nativeResponseValue;
8591         }
8592         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
8593         export function CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig: number): number {
8594                 if(!isWasmInitialized) {
8595                         throw new Error("initializeWasm() must be awaited first!");
8596                 }
8597                 const nativeResponseValue = wasm.TS_CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig);
8598                 return nativeResponseValue;
8599         }
8600         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_ok(struct LDKChannelUpdate o);
8601         export function CResult_ChannelUpdateDecodeErrorZ_ok(o: number): number {
8602                 if(!isWasmInitialized) {
8603                         throw new Error("initializeWasm() must be awaited first!");
8604                 }
8605                 const nativeResponseValue = wasm.TS_CResult_ChannelUpdateDecodeErrorZ_ok(o);
8606                 return nativeResponseValue;
8607         }
8608         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
8609         export function CResult_ChannelUpdateDecodeErrorZ_err(e: number): number {
8610                 if(!isWasmInitialized) {
8611                         throw new Error("initializeWasm() must be awaited first!");
8612                 }
8613                 const nativeResponseValue = wasm.TS_CResult_ChannelUpdateDecodeErrorZ_err(e);
8614                 return nativeResponseValue;
8615         }
8616         // bool CResult_ChannelUpdateDecodeErrorZ_is_ok(const struct LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR o);
8617         export function CResult_ChannelUpdateDecodeErrorZ_is_ok(o: number): boolean {
8618                 if(!isWasmInitialized) {
8619                         throw new Error("initializeWasm() must be awaited first!");
8620                 }
8621                 const nativeResponseValue = wasm.TS_CResult_ChannelUpdateDecodeErrorZ_is_ok(o);
8622                 return nativeResponseValue;
8623         }
8624         // void CResult_ChannelUpdateDecodeErrorZ_free(struct LDKCResult_ChannelUpdateDecodeErrorZ _res);
8625         export function CResult_ChannelUpdateDecodeErrorZ_free(_res: number): void {
8626                 if(!isWasmInitialized) {
8627                         throw new Error("initializeWasm() must be awaited first!");
8628                 }
8629                 const nativeResponseValue = wasm.TS_CResult_ChannelUpdateDecodeErrorZ_free(_res);
8630                 // debug statements here
8631         }
8632         // uint64_t CResult_ChannelUpdateDecodeErrorZ_clone_ptr(LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR arg);
8633         export function CResult_ChannelUpdateDecodeErrorZ_clone_ptr(arg: number): number {
8634                 if(!isWasmInitialized) {
8635                         throw new Error("initializeWasm() must be awaited first!");
8636                 }
8637                 const nativeResponseValue = wasm.TS_CResult_ChannelUpdateDecodeErrorZ_clone_ptr(arg);
8638                 return nativeResponseValue;
8639         }
8640         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
8641         export function CResult_ChannelUpdateDecodeErrorZ_clone(orig: number): number {
8642                 if(!isWasmInitialized) {
8643                         throw new Error("initializeWasm() must be awaited first!");
8644                 }
8645                 const nativeResponseValue = wasm.TS_CResult_ChannelUpdateDecodeErrorZ_clone(orig);
8646                 return nativeResponseValue;
8647         }
8648         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_ok(struct LDKErrorMessage o);
8649         export function CResult_ErrorMessageDecodeErrorZ_ok(o: number): number {
8650                 if(!isWasmInitialized) {
8651                         throw new Error("initializeWasm() must be awaited first!");
8652                 }
8653                 const nativeResponseValue = wasm.TS_CResult_ErrorMessageDecodeErrorZ_ok(o);
8654                 return nativeResponseValue;
8655         }
8656         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_err(struct LDKDecodeError e);
8657         export function CResult_ErrorMessageDecodeErrorZ_err(e: number): number {
8658                 if(!isWasmInitialized) {
8659                         throw new Error("initializeWasm() must be awaited first!");
8660                 }
8661                 const nativeResponseValue = wasm.TS_CResult_ErrorMessageDecodeErrorZ_err(e);
8662                 return nativeResponseValue;
8663         }
8664         // bool CResult_ErrorMessageDecodeErrorZ_is_ok(const struct LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR o);
8665         export function CResult_ErrorMessageDecodeErrorZ_is_ok(o: number): boolean {
8666                 if(!isWasmInitialized) {
8667                         throw new Error("initializeWasm() must be awaited first!");
8668                 }
8669                 const nativeResponseValue = wasm.TS_CResult_ErrorMessageDecodeErrorZ_is_ok(o);
8670                 return nativeResponseValue;
8671         }
8672         // void CResult_ErrorMessageDecodeErrorZ_free(struct LDKCResult_ErrorMessageDecodeErrorZ _res);
8673         export function CResult_ErrorMessageDecodeErrorZ_free(_res: number): void {
8674                 if(!isWasmInitialized) {
8675                         throw new Error("initializeWasm() must be awaited first!");
8676                 }
8677                 const nativeResponseValue = wasm.TS_CResult_ErrorMessageDecodeErrorZ_free(_res);
8678                 // debug statements here
8679         }
8680         // uint64_t CResult_ErrorMessageDecodeErrorZ_clone_ptr(LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR arg);
8681         export function CResult_ErrorMessageDecodeErrorZ_clone_ptr(arg: number): number {
8682                 if(!isWasmInitialized) {
8683                         throw new Error("initializeWasm() must be awaited first!");
8684                 }
8685                 const nativeResponseValue = wasm.TS_CResult_ErrorMessageDecodeErrorZ_clone_ptr(arg);
8686                 return nativeResponseValue;
8687         }
8688         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_clone(const struct LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR orig);
8689         export function CResult_ErrorMessageDecodeErrorZ_clone(orig: number): number {
8690                 if(!isWasmInitialized) {
8691                         throw new Error("initializeWasm() must be awaited first!");
8692                 }
8693                 const nativeResponseValue = wasm.TS_CResult_ErrorMessageDecodeErrorZ_clone(orig);
8694                 return nativeResponseValue;
8695         }
8696         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(struct LDKUnsignedNodeAnnouncement o);
8697         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o: number): number {
8698                 if(!isWasmInitialized) {
8699                         throw new Error("initializeWasm() must be awaited first!");
8700                 }
8701                 const nativeResponseValue = wasm.TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o);
8702                 return nativeResponseValue;
8703         }
8704         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
8705         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e: number): number {
8706                 if(!isWasmInitialized) {
8707                         throw new Error("initializeWasm() must be awaited first!");
8708                 }
8709                 const nativeResponseValue = wasm.TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e);
8710                 return nativeResponseValue;
8711         }
8712         // bool CResult_UnsignedNodeAnnouncementDecodeErrorZ_is_ok(const struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR o);
8713         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_is_ok(o: number): boolean {
8714                 if(!isWasmInitialized) {
8715                         throw new Error("initializeWasm() must be awaited first!");
8716                 }
8717                 const nativeResponseValue = wasm.TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_is_ok(o);
8718                 return nativeResponseValue;
8719         }
8720         // void CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res);
8721         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res: number): void {
8722                 if(!isWasmInitialized) {
8723                         throw new Error("initializeWasm() must be awaited first!");
8724                 }
8725                 const nativeResponseValue = wasm.TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res);
8726                 // debug statements here
8727         }
8728         // uint64_t CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone_ptr(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR arg);
8729         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone_ptr(arg: number): number {
8730                 if(!isWasmInitialized) {
8731                         throw new Error("initializeWasm() must be awaited first!");
8732                 }
8733                 const nativeResponseValue = wasm.TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone_ptr(arg);
8734                 return nativeResponseValue;
8735         }
8736         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
8737         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig: number): number {
8738                 if(!isWasmInitialized) {
8739                         throw new Error("initializeWasm() must be awaited first!");
8740                 }
8741                 const nativeResponseValue = wasm.TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig);
8742                 return nativeResponseValue;
8743         }
8744         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_ok(struct LDKNodeAnnouncement o);
8745         export function CResult_NodeAnnouncementDecodeErrorZ_ok(o: number): number {
8746                 if(!isWasmInitialized) {
8747                         throw new Error("initializeWasm() must be awaited first!");
8748                 }
8749                 const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementDecodeErrorZ_ok(o);
8750                 return nativeResponseValue;
8751         }
8752         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
8753         export function CResult_NodeAnnouncementDecodeErrorZ_err(e: number): number {
8754                 if(!isWasmInitialized) {
8755                         throw new Error("initializeWasm() must be awaited first!");
8756                 }
8757                 const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementDecodeErrorZ_err(e);
8758                 return nativeResponseValue;
8759         }
8760         // bool CResult_NodeAnnouncementDecodeErrorZ_is_ok(const struct LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR o);
8761         export function CResult_NodeAnnouncementDecodeErrorZ_is_ok(o: number): boolean {
8762                 if(!isWasmInitialized) {
8763                         throw new Error("initializeWasm() must be awaited first!");
8764                 }
8765                 const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementDecodeErrorZ_is_ok(o);
8766                 return nativeResponseValue;
8767         }
8768         // void CResult_NodeAnnouncementDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementDecodeErrorZ _res);
8769         export function CResult_NodeAnnouncementDecodeErrorZ_free(_res: number): void {
8770                 if(!isWasmInitialized) {
8771                         throw new Error("initializeWasm() must be awaited first!");
8772                 }
8773                 const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementDecodeErrorZ_free(_res);
8774                 // debug statements here
8775         }
8776         // uint64_t CResult_NodeAnnouncementDecodeErrorZ_clone_ptr(LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR arg);
8777         export function CResult_NodeAnnouncementDecodeErrorZ_clone_ptr(arg: number): number {
8778                 if(!isWasmInitialized) {
8779                         throw new Error("initializeWasm() must be awaited first!");
8780                 }
8781                 const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementDecodeErrorZ_clone_ptr(arg);
8782                 return nativeResponseValue;
8783         }
8784         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
8785         export function CResult_NodeAnnouncementDecodeErrorZ_clone(orig: number): number {
8786                 if(!isWasmInitialized) {
8787                         throw new Error("initializeWasm() must be awaited first!");
8788                 }
8789                 const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementDecodeErrorZ_clone(orig);
8790                 return nativeResponseValue;
8791         }
8792         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_ok(struct LDKQueryShortChannelIds o);
8793         export function CResult_QueryShortChannelIdsDecodeErrorZ_ok(o: number): number {
8794                 if(!isWasmInitialized) {
8795                         throw new Error("initializeWasm() must be awaited first!");
8796                 }
8797                 const nativeResponseValue = wasm.TS_CResult_QueryShortChannelIdsDecodeErrorZ_ok(o);
8798                 return nativeResponseValue;
8799         }
8800         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_err(struct LDKDecodeError e);
8801         export function CResult_QueryShortChannelIdsDecodeErrorZ_err(e: number): number {
8802                 if(!isWasmInitialized) {
8803                         throw new Error("initializeWasm() must be awaited first!");
8804                 }
8805                 const nativeResponseValue = wasm.TS_CResult_QueryShortChannelIdsDecodeErrorZ_err(e);
8806                 return nativeResponseValue;
8807         }
8808         // bool CResult_QueryShortChannelIdsDecodeErrorZ_is_ok(const struct LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR o);
8809         export function CResult_QueryShortChannelIdsDecodeErrorZ_is_ok(o: number): boolean {
8810                 if(!isWasmInitialized) {
8811                         throw new Error("initializeWasm() must be awaited first!");
8812                 }
8813                 const nativeResponseValue = wasm.TS_CResult_QueryShortChannelIdsDecodeErrorZ_is_ok(o);
8814                 return nativeResponseValue;
8815         }
8816         // void CResult_QueryShortChannelIdsDecodeErrorZ_free(struct LDKCResult_QueryShortChannelIdsDecodeErrorZ _res);
8817         export function CResult_QueryShortChannelIdsDecodeErrorZ_free(_res: number): void {
8818                 if(!isWasmInitialized) {
8819                         throw new Error("initializeWasm() must be awaited first!");
8820                 }
8821                 const nativeResponseValue = wasm.TS_CResult_QueryShortChannelIdsDecodeErrorZ_free(_res);
8822                 // debug statements here
8823         }
8824         // uint64_t CResult_QueryShortChannelIdsDecodeErrorZ_clone_ptr(LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR arg);
8825         export function CResult_QueryShortChannelIdsDecodeErrorZ_clone_ptr(arg: number): number {
8826                 if(!isWasmInitialized) {
8827                         throw new Error("initializeWasm() must be awaited first!");
8828                 }
8829                 const nativeResponseValue = wasm.TS_CResult_QueryShortChannelIdsDecodeErrorZ_clone_ptr(arg);
8830                 return nativeResponseValue;
8831         }
8832         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_clone(const struct LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR orig);
8833         export function CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig: number): number {
8834                 if(!isWasmInitialized) {
8835                         throw new Error("initializeWasm() must be awaited first!");
8836                 }
8837                 const nativeResponseValue = wasm.TS_CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig);
8838                 return nativeResponseValue;
8839         }
8840         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(struct LDKReplyShortChannelIdsEnd o);
8841         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o: number): number {
8842                 if(!isWasmInitialized) {
8843                         throw new Error("initializeWasm() must be awaited first!");
8844                 }
8845                 const nativeResponseValue = wasm.TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o);
8846                 return nativeResponseValue;
8847         }
8848         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(struct LDKDecodeError e);
8849         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e: number): number {
8850                 if(!isWasmInitialized) {
8851                         throw new Error("initializeWasm() must be awaited first!");
8852                 }
8853                 const nativeResponseValue = wasm.TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e);
8854                 return nativeResponseValue;
8855         }
8856         // bool CResult_ReplyShortChannelIdsEndDecodeErrorZ_is_ok(const struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR o);
8857         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_is_ok(o: number): boolean {
8858                 if(!isWasmInitialized) {
8859                         throw new Error("initializeWasm() must be awaited first!");
8860                 }
8861                 const nativeResponseValue = wasm.TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_is_ok(o);
8862                 return nativeResponseValue;
8863         }
8864         // void CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res);
8865         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res: number): void {
8866                 if(!isWasmInitialized) {
8867                         throw new Error("initializeWasm() must be awaited first!");
8868                 }
8869                 const nativeResponseValue = wasm.TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res);
8870                 // debug statements here
8871         }
8872         // uint64_t CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone_ptr(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR arg);
8873         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone_ptr(arg: number): number {
8874                 if(!isWasmInitialized) {
8875                         throw new Error("initializeWasm() must be awaited first!");
8876                 }
8877                 const nativeResponseValue = wasm.TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone_ptr(arg);
8878                 return nativeResponseValue;
8879         }
8880         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(const struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR orig);
8881         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig: number): number {
8882                 if(!isWasmInitialized) {
8883                         throw new Error("initializeWasm() must be awaited first!");
8884                 }
8885                 const nativeResponseValue = wasm.TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig);
8886                 return nativeResponseValue;
8887         }
8888         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_ok(struct LDKQueryChannelRange o);
8889         export function CResult_QueryChannelRangeDecodeErrorZ_ok(o: number): number {
8890                 if(!isWasmInitialized) {
8891                         throw new Error("initializeWasm() must be awaited first!");
8892                 }
8893                 const nativeResponseValue = wasm.TS_CResult_QueryChannelRangeDecodeErrorZ_ok(o);
8894                 return nativeResponseValue;
8895         }
8896         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
8897         export function CResult_QueryChannelRangeDecodeErrorZ_err(e: number): number {
8898                 if(!isWasmInitialized) {
8899                         throw new Error("initializeWasm() must be awaited first!");
8900                 }
8901                 const nativeResponseValue = wasm.TS_CResult_QueryChannelRangeDecodeErrorZ_err(e);
8902                 return nativeResponseValue;
8903         }
8904         // bool CResult_QueryChannelRangeDecodeErrorZ_is_ok(const struct LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR o);
8905         export function CResult_QueryChannelRangeDecodeErrorZ_is_ok(o: number): boolean {
8906                 if(!isWasmInitialized) {
8907                         throw new Error("initializeWasm() must be awaited first!");
8908                 }
8909                 const nativeResponseValue = wasm.TS_CResult_QueryChannelRangeDecodeErrorZ_is_ok(o);
8910                 return nativeResponseValue;
8911         }
8912         // void CResult_QueryChannelRangeDecodeErrorZ_free(struct LDKCResult_QueryChannelRangeDecodeErrorZ _res);
8913         export function CResult_QueryChannelRangeDecodeErrorZ_free(_res: number): void {
8914                 if(!isWasmInitialized) {
8915                         throw new Error("initializeWasm() must be awaited first!");
8916                 }
8917                 const nativeResponseValue = wasm.TS_CResult_QueryChannelRangeDecodeErrorZ_free(_res);
8918                 // debug statements here
8919         }
8920         // uint64_t CResult_QueryChannelRangeDecodeErrorZ_clone_ptr(LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR arg);
8921         export function CResult_QueryChannelRangeDecodeErrorZ_clone_ptr(arg: number): number {
8922                 if(!isWasmInitialized) {
8923                         throw new Error("initializeWasm() must be awaited first!");
8924                 }
8925                 const nativeResponseValue = wasm.TS_CResult_QueryChannelRangeDecodeErrorZ_clone_ptr(arg);
8926                 return nativeResponseValue;
8927         }
8928         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_clone(const struct LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR orig);
8929         export function CResult_QueryChannelRangeDecodeErrorZ_clone(orig: number): number {
8930                 if(!isWasmInitialized) {
8931                         throw new Error("initializeWasm() must be awaited first!");
8932                 }
8933                 const nativeResponseValue = wasm.TS_CResult_QueryChannelRangeDecodeErrorZ_clone(orig);
8934                 return nativeResponseValue;
8935         }
8936         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_ok(struct LDKReplyChannelRange o);
8937         export function CResult_ReplyChannelRangeDecodeErrorZ_ok(o: number): number {
8938                 if(!isWasmInitialized) {
8939                         throw new Error("initializeWasm() must be awaited first!");
8940                 }
8941                 const nativeResponseValue = wasm.TS_CResult_ReplyChannelRangeDecodeErrorZ_ok(o);
8942                 return nativeResponseValue;
8943         }
8944         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
8945         export function CResult_ReplyChannelRangeDecodeErrorZ_err(e: number): number {
8946                 if(!isWasmInitialized) {
8947                         throw new Error("initializeWasm() must be awaited first!");
8948                 }
8949                 const nativeResponseValue = wasm.TS_CResult_ReplyChannelRangeDecodeErrorZ_err(e);
8950                 return nativeResponseValue;
8951         }
8952         // bool CResult_ReplyChannelRangeDecodeErrorZ_is_ok(const struct LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR o);
8953         export function CResult_ReplyChannelRangeDecodeErrorZ_is_ok(o: number): boolean {
8954                 if(!isWasmInitialized) {
8955                         throw new Error("initializeWasm() must be awaited first!");
8956                 }
8957                 const nativeResponseValue = wasm.TS_CResult_ReplyChannelRangeDecodeErrorZ_is_ok(o);
8958                 return nativeResponseValue;
8959         }
8960         // void CResult_ReplyChannelRangeDecodeErrorZ_free(struct LDKCResult_ReplyChannelRangeDecodeErrorZ _res);
8961         export function CResult_ReplyChannelRangeDecodeErrorZ_free(_res: number): void {
8962                 if(!isWasmInitialized) {
8963                         throw new Error("initializeWasm() must be awaited first!");
8964                 }
8965                 const nativeResponseValue = wasm.TS_CResult_ReplyChannelRangeDecodeErrorZ_free(_res);
8966                 // debug statements here
8967         }
8968         // uint64_t CResult_ReplyChannelRangeDecodeErrorZ_clone_ptr(LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR arg);
8969         export function CResult_ReplyChannelRangeDecodeErrorZ_clone_ptr(arg: number): number {
8970                 if(!isWasmInitialized) {
8971                         throw new Error("initializeWasm() must be awaited first!");
8972                 }
8973                 const nativeResponseValue = wasm.TS_CResult_ReplyChannelRangeDecodeErrorZ_clone_ptr(arg);
8974                 return nativeResponseValue;
8975         }
8976         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_clone(const struct LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR orig);
8977         export function CResult_ReplyChannelRangeDecodeErrorZ_clone(orig: number): number {
8978                 if(!isWasmInitialized) {
8979                         throw new Error("initializeWasm() must be awaited first!");
8980                 }
8981                 const nativeResponseValue = wasm.TS_CResult_ReplyChannelRangeDecodeErrorZ_clone(orig);
8982                 return nativeResponseValue;
8983         }
8984         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_ok(struct LDKGossipTimestampFilter o);
8985         export function CResult_GossipTimestampFilterDecodeErrorZ_ok(o: number): number {
8986                 if(!isWasmInitialized) {
8987                         throw new Error("initializeWasm() must be awaited first!");
8988                 }
8989                 const nativeResponseValue = wasm.TS_CResult_GossipTimestampFilterDecodeErrorZ_ok(o);
8990                 return nativeResponseValue;
8991         }
8992         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_err(struct LDKDecodeError e);
8993         export function CResult_GossipTimestampFilterDecodeErrorZ_err(e: number): number {
8994                 if(!isWasmInitialized) {
8995                         throw new Error("initializeWasm() must be awaited first!");
8996                 }
8997                 const nativeResponseValue = wasm.TS_CResult_GossipTimestampFilterDecodeErrorZ_err(e);
8998                 return nativeResponseValue;
8999         }
9000         // bool CResult_GossipTimestampFilterDecodeErrorZ_is_ok(const struct LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR o);
9001         export function CResult_GossipTimestampFilterDecodeErrorZ_is_ok(o: number): boolean {
9002                 if(!isWasmInitialized) {
9003                         throw new Error("initializeWasm() must be awaited first!");
9004                 }
9005                 const nativeResponseValue = wasm.TS_CResult_GossipTimestampFilterDecodeErrorZ_is_ok(o);
9006                 return nativeResponseValue;
9007         }
9008         // void CResult_GossipTimestampFilterDecodeErrorZ_free(struct LDKCResult_GossipTimestampFilterDecodeErrorZ _res);
9009         export function CResult_GossipTimestampFilterDecodeErrorZ_free(_res: number): void {
9010                 if(!isWasmInitialized) {
9011                         throw new Error("initializeWasm() must be awaited first!");
9012                 }
9013                 const nativeResponseValue = wasm.TS_CResult_GossipTimestampFilterDecodeErrorZ_free(_res);
9014                 // debug statements here
9015         }
9016         // uint64_t CResult_GossipTimestampFilterDecodeErrorZ_clone_ptr(LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR arg);
9017         export function CResult_GossipTimestampFilterDecodeErrorZ_clone_ptr(arg: number): number {
9018                 if(!isWasmInitialized) {
9019                         throw new Error("initializeWasm() must be awaited first!");
9020                 }
9021                 const nativeResponseValue = wasm.TS_CResult_GossipTimestampFilterDecodeErrorZ_clone_ptr(arg);
9022                 return nativeResponseValue;
9023         }
9024         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_clone(const struct LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR orig);
9025         export function CResult_GossipTimestampFilterDecodeErrorZ_clone(orig: number): number {
9026                 if(!isWasmInitialized) {
9027                         throw new Error("initializeWasm() must be awaited first!");
9028                 }
9029                 const nativeResponseValue = wasm.TS_CResult_GossipTimestampFilterDecodeErrorZ_clone(orig);
9030                 return nativeResponseValue;
9031         }
9032         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKDelayedPaymentOutputDescriptor o);
9033         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o: number): number {
9034                 if(!isWasmInitialized) {
9035                         throw new Error("initializeWasm() must be awaited first!");
9036                 }
9037                 const nativeResponseValue = wasm.TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o);
9038                 return nativeResponseValue;
9039         }
9040         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
9041         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e: number): number {
9042                 if(!isWasmInitialized) {
9043                         throw new Error("initializeWasm() must be awaited first!");
9044                 }
9045                 const nativeResponseValue = wasm.TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e);
9046                 return nativeResponseValue;
9047         }
9048         // bool CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_is_ok(const struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR o);
9049         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_is_ok(o: number): boolean {
9050                 if(!isWasmInitialized) {
9051                         throw new Error("initializeWasm() must be awaited first!");
9052                 }
9053                 const nativeResponseValue = wasm.TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_is_ok(o);
9054                 return nativeResponseValue;
9055         }
9056         // void CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ _res);
9057         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(_res: number): void {
9058                 if(!isWasmInitialized) {
9059                         throw new Error("initializeWasm() must be awaited first!");
9060                 }
9061                 const nativeResponseValue = wasm.TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(_res);
9062                 // debug statements here
9063         }
9064         // uint64_t CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone_ptr(LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR arg);
9065         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone_ptr(arg: number): number {
9066                 if(!isWasmInitialized) {
9067                         throw new Error("initializeWasm() must be awaited first!");
9068                 }
9069                 const nativeResponseValue = wasm.TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone_ptr(arg);
9070                 return nativeResponseValue;
9071         }
9072         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
9073         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(orig: number): number {
9074                 if(!isWasmInitialized) {
9075                         throw new Error("initializeWasm() must be awaited first!");
9076                 }
9077                 const nativeResponseValue = wasm.TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(orig);
9078                 return nativeResponseValue;
9079         }
9080         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKStaticPaymentOutputDescriptor o);
9081         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o: number): number {
9082                 if(!isWasmInitialized) {
9083                         throw new Error("initializeWasm() must be awaited first!");
9084                 }
9085                 const nativeResponseValue = wasm.TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o);
9086                 return nativeResponseValue;
9087         }
9088         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
9089         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e: number): number {
9090                 if(!isWasmInitialized) {
9091                         throw new Error("initializeWasm() must be awaited first!");
9092                 }
9093                 const nativeResponseValue = wasm.TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e);
9094                 return nativeResponseValue;
9095         }
9096         // bool CResult_StaticPaymentOutputDescriptorDecodeErrorZ_is_ok(const struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR o);
9097         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_is_ok(o: number): boolean {
9098                 if(!isWasmInitialized) {
9099                         throw new Error("initializeWasm() must be awaited first!");
9100                 }
9101                 const nativeResponseValue = wasm.TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_is_ok(o);
9102                 return nativeResponseValue;
9103         }
9104         // void CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ _res);
9105         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(_res: number): void {
9106                 if(!isWasmInitialized) {
9107                         throw new Error("initializeWasm() must be awaited first!");
9108                 }
9109                 const nativeResponseValue = wasm.TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(_res);
9110                 // debug statements here
9111         }
9112         // uint64_t CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone_ptr(LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR arg);
9113         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone_ptr(arg: number): number {
9114                 if(!isWasmInitialized) {
9115                         throw new Error("initializeWasm() must be awaited first!");
9116                 }
9117                 const nativeResponseValue = wasm.TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone_ptr(arg);
9118                 return nativeResponseValue;
9119         }
9120         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
9121         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(orig: number): number {
9122                 if(!isWasmInitialized) {
9123                         throw new Error("initializeWasm() must be awaited first!");
9124                 }
9125                 const nativeResponseValue = wasm.TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(orig);
9126                 return nativeResponseValue;
9127         }
9128         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_ok(struct LDKSpendableOutputDescriptor o);
9129         export function CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o: number): number {
9130                 if(!isWasmInitialized) {
9131                         throw new Error("initializeWasm() must be awaited first!");
9132                 }
9133                 const nativeResponseValue = wasm.TS_CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o);
9134                 return nativeResponseValue;
9135         }
9136         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
9137         export function CResult_SpendableOutputDescriptorDecodeErrorZ_err(e: number): number {
9138                 if(!isWasmInitialized) {
9139                         throw new Error("initializeWasm() must be awaited first!");
9140                 }
9141                 const nativeResponseValue = wasm.TS_CResult_SpendableOutputDescriptorDecodeErrorZ_err(e);
9142                 return nativeResponseValue;
9143         }
9144         // bool CResult_SpendableOutputDescriptorDecodeErrorZ_is_ok(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR o);
9145         export function CResult_SpendableOutputDescriptorDecodeErrorZ_is_ok(o: number): boolean {
9146                 if(!isWasmInitialized) {
9147                         throw new Error("initializeWasm() must be awaited first!");
9148                 }
9149                 const nativeResponseValue = wasm.TS_CResult_SpendableOutputDescriptorDecodeErrorZ_is_ok(o);
9150                 return nativeResponseValue;
9151         }
9152         // void CResult_SpendableOutputDescriptorDecodeErrorZ_free(struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ _res);
9153         export function CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res: number): void {
9154                 if(!isWasmInitialized) {
9155                         throw new Error("initializeWasm() must be awaited first!");
9156                 }
9157                 const nativeResponseValue = wasm.TS_CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res);
9158                 // debug statements here
9159         }
9160         // uint64_t CResult_SpendableOutputDescriptorDecodeErrorZ_clone_ptr(LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR arg);
9161         export function CResult_SpendableOutputDescriptorDecodeErrorZ_clone_ptr(arg: number): number {
9162                 if(!isWasmInitialized) {
9163                         throw new Error("initializeWasm() must be awaited first!");
9164                 }
9165                 const nativeResponseValue = wasm.TS_CResult_SpendableOutputDescriptorDecodeErrorZ_clone_ptr(arg);
9166                 return nativeResponseValue;
9167         }
9168         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
9169         export function CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig: number): number {
9170                 if(!isWasmInitialized) {
9171                         throw new Error("initializeWasm() must be awaited first!");
9172                 }
9173                 const nativeResponseValue = wasm.TS_CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig);
9174                 return nativeResponseValue;
9175         }
9176         // uint64_t C2Tuple_SignatureCVec_SignatureZZ_clone_ptr(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR arg);
9177         export function C2Tuple_SignatureCVec_SignatureZZ_clone_ptr(arg: number): number {
9178                 if(!isWasmInitialized) {
9179                         throw new Error("initializeWasm() must be awaited first!");
9180                 }
9181                 const nativeResponseValue = wasm.TS_C2Tuple_SignatureCVec_SignatureZZ_clone_ptr(arg);
9182                 return nativeResponseValue;
9183         }
9184         // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_clone(const struct LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR orig);
9185         export function C2Tuple_SignatureCVec_SignatureZZ_clone(orig: number): number {
9186                 if(!isWasmInitialized) {
9187                         throw new Error("initializeWasm() must be awaited first!");
9188                 }
9189                 const nativeResponseValue = wasm.TS_C2Tuple_SignatureCVec_SignatureZZ_clone(orig);
9190                 return nativeResponseValue;
9191         }
9192         // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(struct LDKSignature a, struct LDKCVec_SignatureZ b);
9193         export function C2Tuple_SignatureCVec_SignatureZZ_new(a: Uint8Array, b: Uint8Array[]): number {
9194                 if(!isWasmInitialized) {
9195                         throw new Error("initializeWasm() must be awaited first!");
9196                 }
9197                 const nativeResponseValue = wasm.TS_C2Tuple_SignatureCVec_SignatureZZ_new(encodeUint8Array(a), b);
9198                 return nativeResponseValue;
9199         }
9200         // void C2Tuple_SignatureCVec_SignatureZZ_free(struct LDKC2Tuple_SignatureCVec_SignatureZZ _res);
9201         export function C2Tuple_SignatureCVec_SignatureZZ_free(_res: number): void {
9202                 if(!isWasmInitialized) {
9203                         throw new Error("initializeWasm() must be awaited first!");
9204                 }
9205                 const nativeResponseValue = wasm.TS_C2Tuple_SignatureCVec_SignatureZZ_free(_res);
9206                 // debug statements here
9207         }
9208         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(struct LDKC2Tuple_SignatureCVec_SignatureZZ o);
9209         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o: number): number {
9210                 if(!isWasmInitialized) {
9211                         throw new Error("initializeWasm() must be awaited first!");
9212                 }
9213                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o);
9214                 return nativeResponseValue;
9215         }
9216         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(void);
9217         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(): number {
9218                 if(!isWasmInitialized) {
9219                         throw new Error("initializeWasm() must be awaited first!");
9220                 }
9221                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err();
9222                 return nativeResponseValue;
9223         }
9224         // bool CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_is_ok(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR o);
9225         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_is_ok(o: number): boolean {
9226                 if(!isWasmInitialized) {
9227                         throw new Error("initializeWasm() must be awaited first!");
9228                 }
9229                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_is_ok(o);
9230                 return nativeResponseValue;
9231         }
9232         // void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ _res);
9233         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res: number): void {
9234                 if(!isWasmInitialized) {
9235                         throw new Error("initializeWasm() must be awaited first!");
9236                 }
9237                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res);
9238                 // debug statements here
9239         }
9240         // uint64_t CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone_ptr(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR arg);
9241         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone_ptr(arg: number): number {
9242                 if(!isWasmInitialized) {
9243                         throw new Error("initializeWasm() must be awaited first!");
9244                 }
9245                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone_ptr(arg);
9246                 return nativeResponseValue;
9247         }
9248         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR orig);
9249         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig: number): number {
9250                 if(!isWasmInitialized) {
9251                         throw new Error("initializeWasm() must be awaited first!");
9252                 }
9253                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig);
9254                 return nativeResponseValue;
9255         }
9256         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_ok(struct LDKSignature o);
9257         export function CResult_SignatureNoneZ_ok(o: Uint8Array): number {
9258                 if(!isWasmInitialized) {
9259                         throw new Error("initializeWasm() must be awaited first!");
9260                 }
9261                 const nativeResponseValue = wasm.TS_CResult_SignatureNoneZ_ok(encodeUint8Array(o));
9262                 return nativeResponseValue;
9263         }
9264         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_err(void);
9265         export function CResult_SignatureNoneZ_err(): number {
9266                 if(!isWasmInitialized) {
9267                         throw new Error("initializeWasm() must be awaited first!");
9268                 }
9269                 const nativeResponseValue = wasm.TS_CResult_SignatureNoneZ_err();
9270                 return nativeResponseValue;
9271         }
9272         // bool CResult_SignatureNoneZ_is_ok(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR o);
9273         export function CResult_SignatureNoneZ_is_ok(o: number): boolean {
9274                 if(!isWasmInitialized) {
9275                         throw new Error("initializeWasm() must be awaited first!");
9276                 }
9277                 const nativeResponseValue = wasm.TS_CResult_SignatureNoneZ_is_ok(o);
9278                 return nativeResponseValue;
9279         }
9280         // void CResult_SignatureNoneZ_free(struct LDKCResult_SignatureNoneZ _res);
9281         export function CResult_SignatureNoneZ_free(_res: number): void {
9282                 if(!isWasmInitialized) {
9283                         throw new Error("initializeWasm() must be awaited first!");
9284                 }
9285                 const nativeResponseValue = wasm.TS_CResult_SignatureNoneZ_free(_res);
9286                 // debug statements here
9287         }
9288         // uint64_t CResult_SignatureNoneZ_clone_ptr(LDKCResult_SignatureNoneZ *NONNULL_PTR arg);
9289         export function CResult_SignatureNoneZ_clone_ptr(arg: number): number {
9290                 if(!isWasmInitialized) {
9291                         throw new Error("initializeWasm() must be awaited first!");
9292                 }
9293                 const nativeResponseValue = wasm.TS_CResult_SignatureNoneZ_clone_ptr(arg);
9294                 return nativeResponseValue;
9295         }
9296         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_clone(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR orig);
9297         export function CResult_SignatureNoneZ_clone(orig: number): number {
9298                 if(!isWasmInitialized) {
9299                         throw new Error("initializeWasm() must be awaited first!");
9300                 }
9301                 const nativeResponseValue = wasm.TS_CResult_SignatureNoneZ_clone(orig);
9302                 return nativeResponseValue;
9303         }
9304         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_ok(struct LDKSign o);
9305         export function CResult_SignDecodeErrorZ_ok(o: number): number {
9306                 if(!isWasmInitialized) {
9307                         throw new Error("initializeWasm() must be awaited first!");
9308                 }
9309                 const nativeResponseValue = wasm.TS_CResult_SignDecodeErrorZ_ok(o);
9310                 return nativeResponseValue;
9311         }
9312         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_err(struct LDKDecodeError e);
9313         export function CResult_SignDecodeErrorZ_err(e: number): number {
9314                 if(!isWasmInitialized) {
9315                         throw new Error("initializeWasm() must be awaited first!");
9316                 }
9317                 const nativeResponseValue = wasm.TS_CResult_SignDecodeErrorZ_err(e);
9318                 return nativeResponseValue;
9319         }
9320         // bool CResult_SignDecodeErrorZ_is_ok(const struct LDKCResult_SignDecodeErrorZ *NONNULL_PTR o);
9321         export function CResult_SignDecodeErrorZ_is_ok(o: number): boolean {
9322                 if(!isWasmInitialized) {
9323                         throw new Error("initializeWasm() must be awaited first!");
9324                 }
9325                 const nativeResponseValue = wasm.TS_CResult_SignDecodeErrorZ_is_ok(o);
9326                 return nativeResponseValue;
9327         }
9328         // void CResult_SignDecodeErrorZ_free(struct LDKCResult_SignDecodeErrorZ _res);
9329         export function CResult_SignDecodeErrorZ_free(_res: number): void {
9330                 if(!isWasmInitialized) {
9331                         throw new Error("initializeWasm() must be awaited first!");
9332                 }
9333                 const nativeResponseValue = wasm.TS_CResult_SignDecodeErrorZ_free(_res);
9334                 // debug statements here
9335         }
9336         // uint64_t CResult_SignDecodeErrorZ_clone_ptr(LDKCResult_SignDecodeErrorZ *NONNULL_PTR arg);
9337         export function CResult_SignDecodeErrorZ_clone_ptr(arg: number): number {
9338                 if(!isWasmInitialized) {
9339                         throw new Error("initializeWasm() must be awaited first!");
9340                 }
9341                 const nativeResponseValue = wasm.TS_CResult_SignDecodeErrorZ_clone_ptr(arg);
9342                 return nativeResponseValue;
9343         }
9344         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_clone(const struct LDKCResult_SignDecodeErrorZ *NONNULL_PTR orig);
9345         export function CResult_SignDecodeErrorZ_clone(orig: number): number {
9346                 if(!isWasmInitialized) {
9347                         throw new Error("initializeWasm() must be awaited first!");
9348                 }
9349                 const nativeResponseValue = wasm.TS_CResult_SignDecodeErrorZ_clone(orig);
9350                 return nativeResponseValue;
9351         }
9352         // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_ok(struct LDKRecoverableSignature o);
9353         export function CResult_RecoverableSignatureNoneZ_ok(arg: Uint8Array): number {
9354                 if(!isWasmInitialized) {
9355                         throw new Error("initializeWasm() must be awaited first!");
9356                 }
9357                 const nativeResponseValue = wasm.TS_CResult_RecoverableSignatureNoneZ_ok(encodeUint8Array(arg));
9358                 return nativeResponseValue;
9359         }
9360         // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_err(void);
9361         export function CResult_RecoverableSignatureNoneZ_err(): number {
9362                 if(!isWasmInitialized) {
9363                         throw new Error("initializeWasm() must be awaited first!");
9364                 }
9365                 const nativeResponseValue = wasm.TS_CResult_RecoverableSignatureNoneZ_err();
9366                 return nativeResponseValue;
9367         }
9368         // bool CResult_RecoverableSignatureNoneZ_is_ok(const struct LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR o);
9369         export function CResult_RecoverableSignatureNoneZ_is_ok(o: number): boolean {
9370                 if(!isWasmInitialized) {
9371                         throw new Error("initializeWasm() must be awaited first!");
9372                 }
9373                 const nativeResponseValue = wasm.TS_CResult_RecoverableSignatureNoneZ_is_ok(o);
9374                 return nativeResponseValue;
9375         }
9376         // void CResult_RecoverableSignatureNoneZ_free(struct LDKCResult_RecoverableSignatureNoneZ _res);
9377         export function CResult_RecoverableSignatureNoneZ_free(_res: number): void {
9378                 if(!isWasmInitialized) {
9379                         throw new Error("initializeWasm() must be awaited first!");
9380                 }
9381                 const nativeResponseValue = wasm.TS_CResult_RecoverableSignatureNoneZ_free(_res);
9382                 // debug statements here
9383         }
9384         // uint64_t CResult_RecoverableSignatureNoneZ_clone_ptr(LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR arg);
9385         export function CResult_RecoverableSignatureNoneZ_clone_ptr(arg: number): number {
9386                 if(!isWasmInitialized) {
9387                         throw new Error("initializeWasm() must be awaited first!");
9388                 }
9389                 const nativeResponseValue = wasm.TS_CResult_RecoverableSignatureNoneZ_clone_ptr(arg);
9390                 return nativeResponseValue;
9391         }
9392         // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_clone(const struct LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR orig);
9393         export function CResult_RecoverableSignatureNoneZ_clone(orig: number): number {
9394                 if(!isWasmInitialized) {
9395                         throw new Error("initializeWasm() must be awaited first!");
9396                 }
9397                 const nativeResponseValue = wasm.TS_CResult_RecoverableSignatureNoneZ_clone(orig);
9398                 return nativeResponseValue;
9399         }
9400         // void CVec_CVec_u8ZZ_free(struct LDKCVec_CVec_u8ZZ _res);
9401         export function CVec_CVec_u8ZZ_free(_res: Uint8Array[]): void {
9402                 if(!isWasmInitialized) {
9403                         throw new Error("initializeWasm() must be awaited first!");
9404                 }
9405                 const nativeResponseValue = wasm.TS_CVec_CVec_u8ZZ_free(_res);
9406                 // debug statements here
9407         }
9408         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_ok(struct LDKCVec_CVec_u8ZZ o);
9409         export function CResult_CVec_CVec_u8ZZNoneZ_ok(o: Uint8Array[]): number {
9410                 if(!isWasmInitialized) {
9411                         throw new Error("initializeWasm() must be awaited first!");
9412                 }
9413                 const nativeResponseValue = wasm.TS_CResult_CVec_CVec_u8ZZNoneZ_ok(o);
9414                 return nativeResponseValue;
9415         }
9416         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_err(void);
9417         export function CResult_CVec_CVec_u8ZZNoneZ_err(): number {
9418                 if(!isWasmInitialized) {
9419                         throw new Error("initializeWasm() must be awaited first!");
9420                 }
9421                 const nativeResponseValue = wasm.TS_CResult_CVec_CVec_u8ZZNoneZ_err();
9422                 return nativeResponseValue;
9423         }
9424         // bool CResult_CVec_CVec_u8ZZNoneZ_is_ok(const struct LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR o);
9425         export function CResult_CVec_CVec_u8ZZNoneZ_is_ok(o: number): boolean {
9426                 if(!isWasmInitialized) {
9427                         throw new Error("initializeWasm() must be awaited first!");
9428                 }
9429                 const nativeResponseValue = wasm.TS_CResult_CVec_CVec_u8ZZNoneZ_is_ok(o);
9430                 return nativeResponseValue;
9431         }
9432         // void CResult_CVec_CVec_u8ZZNoneZ_free(struct LDKCResult_CVec_CVec_u8ZZNoneZ _res);
9433         export function CResult_CVec_CVec_u8ZZNoneZ_free(_res: number): void {
9434                 if(!isWasmInitialized) {
9435                         throw new Error("initializeWasm() must be awaited first!");
9436                 }
9437                 const nativeResponseValue = wasm.TS_CResult_CVec_CVec_u8ZZNoneZ_free(_res);
9438                 // debug statements here
9439         }
9440         // uint64_t CResult_CVec_CVec_u8ZZNoneZ_clone_ptr(LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR arg);
9441         export function CResult_CVec_CVec_u8ZZNoneZ_clone_ptr(arg: number): number {
9442                 if(!isWasmInitialized) {
9443                         throw new Error("initializeWasm() must be awaited first!");
9444                 }
9445                 const nativeResponseValue = wasm.TS_CResult_CVec_CVec_u8ZZNoneZ_clone_ptr(arg);
9446                 return nativeResponseValue;
9447         }
9448         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_clone(const struct LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR orig);
9449         export function CResult_CVec_CVec_u8ZZNoneZ_clone(orig: number): number {
9450                 if(!isWasmInitialized) {
9451                         throw new Error("initializeWasm() must be awaited first!");
9452                 }
9453                 const nativeResponseValue = wasm.TS_CResult_CVec_CVec_u8ZZNoneZ_clone(orig);
9454                 return nativeResponseValue;
9455         }
9456         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_ok(struct LDKInMemorySigner o);
9457         export function CResult_InMemorySignerDecodeErrorZ_ok(o: number): number {
9458                 if(!isWasmInitialized) {
9459                         throw new Error("initializeWasm() must be awaited first!");
9460                 }
9461                 const nativeResponseValue = wasm.TS_CResult_InMemorySignerDecodeErrorZ_ok(o);
9462                 return nativeResponseValue;
9463         }
9464         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_err(struct LDKDecodeError e);
9465         export function CResult_InMemorySignerDecodeErrorZ_err(e: number): number {
9466                 if(!isWasmInitialized) {
9467                         throw new Error("initializeWasm() must be awaited first!");
9468                 }
9469                 const nativeResponseValue = wasm.TS_CResult_InMemorySignerDecodeErrorZ_err(e);
9470                 return nativeResponseValue;
9471         }
9472         // bool CResult_InMemorySignerDecodeErrorZ_is_ok(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR o);
9473         export function CResult_InMemorySignerDecodeErrorZ_is_ok(o: number): boolean {
9474                 if(!isWasmInitialized) {
9475                         throw new Error("initializeWasm() must be awaited first!");
9476                 }
9477                 const nativeResponseValue = wasm.TS_CResult_InMemorySignerDecodeErrorZ_is_ok(o);
9478                 return nativeResponseValue;
9479         }
9480         // void CResult_InMemorySignerDecodeErrorZ_free(struct LDKCResult_InMemorySignerDecodeErrorZ _res);
9481         export function CResult_InMemorySignerDecodeErrorZ_free(_res: number): void {
9482                 if(!isWasmInitialized) {
9483                         throw new Error("initializeWasm() must be awaited first!");
9484                 }
9485                 const nativeResponseValue = wasm.TS_CResult_InMemorySignerDecodeErrorZ_free(_res);
9486                 // debug statements here
9487         }
9488         // uint64_t CResult_InMemorySignerDecodeErrorZ_clone_ptr(LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR arg);
9489         export function CResult_InMemorySignerDecodeErrorZ_clone_ptr(arg: number): number {
9490                 if(!isWasmInitialized) {
9491                         throw new Error("initializeWasm() must be awaited first!");
9492                 }
9493                 const nativeResponseValue = wasm.TS_CResult_InMemorySignerDecodeErrorZ_clone_ptr(arg);
9494                 return nativeResponseValue;
9495         }
9496         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_clone(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR orig);
9497         export function CResult_InMemorySignerDecodeErrorZ_clone(orig: number): number {
9498                 if(!isWasmInitialized) {
9499                         throw new Error("initializeWasm() must be awaited first!");
9500                 }
9501                 const nativeResponseValue = wasm.TS_CResult_InMemorySignerDecodeErrorZ_clone(orig);
9502                 return nativeResponseValue;
9503         }
9504         // void CVec_TxOutZ_free(struct LDKCVec_TxOutZ _res);
9505         export function CVec_TxOutZ_free(_res: number[]): void {
9506                 if(!isWasmInitialized) {
9507                         throw new Error("initializeWasm() must be awaited first!");
9508                 }
9509                 const nativeResponseValue = wasm.TS_CVec_TxOutZ_free(_res);
9510                 // debug statements here
9511         }
9512         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_ok(struct LDKTransaction o);
9513         export function CResult_TransactionNoneZ_ok(o: Uint8Array): number {
9514                 if(!isWasmInitialized) {
9515                         throw new Error("initializeWasm() must be awaited first!");
9516                 }
9517                 const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_ok(encodeUint8Array(o));
9518                 return nativeResponseValue;
9519         }
9520         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_err(void);
9521         export function CResult_TransactionNoneZ_err(): number {
9522                 if(!isWasmInitialized) {
9523                         throw new Error("initializeWasm() must be awaited first!");
9524                 }
9525                 const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_err();
9526                 return nativeResponseValue;
9527         }
9528         // bool CResult_TransactionNoneZ_is_ok(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR o);
9529         export function CResult_TransactionNoneZ_is_ok(o: number): boolean {
9530                 if(!isWasmInitialized) {
9531                         throw new Error("initializeWasm() must be awaited first!");
9532                 }
9533                 const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_is_ok(o);
9534                 return nativeResponseValue;
9535         }
9536         // void CResult_TransactionNoneZ_free(struct LDKCResult_TransactionNoneZ _res);
9537         export function CResult_TransactionNoneZ_free(_res: number): void {
9538                 if(!isWasmInitialized) {
9539                         throw new Error("initializeWasm() must be awaited first!");
9540                 }
9541                 const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_free(_res);
9542                 // debug statements here
9543         }
9544         // uint64_t CResult_TransactionNoneZ_clone_ptr(LDKCResult_TransactionNoneZ *NONNULL_PTR arg);
9545         export function CResult_TransactionNoneZ_clone_ptr(arg: number): number {
9546                 if(!isWasmInitialized) {
9547                         throw new Error("initializeWasm() must be awaited first!");
9548                 }
9549                 const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_clone_ptr(arg);
9550                 return nativeResponseValue;
9551         }
9552         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_clone(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR orig);
9553         export function CResult_TransactionNoneZ_clone(orig: number): number {
9554                 if(!isWasmInitialized) {
9555                         throw new Error("initializeWasm() must be awaited first!");
9556                 }
9557                 const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_clone(orig);
9558                 return nativeResponseValue;
9559         }
9560         // struct LDKCOption_FilterZ COption_FilterZ_some(struct LDKFilter o);
9561         export function COption_FilterZ_some(o: number): number {
9562                 if(!isWasmInitialized) {
9563                         throw new Error("initializeWasm() must be awaited first!");
9564                 }
9565                 const nativeResponseValue = wasm.TS_COption_FilterZ_some(o);
9566                 return nativeResponseValue;
9567         }
9568         // struct LDKCOption_FilterZ COption_FilterZ_none(void);
9569         export function COption_FilterZ_none(): number {
9570                 if(!isWasmInitialized) {
9571                         throw new Error("initializeWasm() must be awaited first!");
9572                 }
9573                 const nativeResponseValue = wasm.TS_COption_FilterZ_none();
9574                 return nativeResponseValue;
9575         }
9576         // void COption_FilterZ_free(struct LDKCOption_FilterZ _res);
9577         export function COption_FilterZ_free(_res: number): void {
9578                 if(!isWasmInitialized) {
9579                         throw new Error("initializeWasm() must be awaited first!");
9580                 }
9581                 const nativeResponseValue = wasm.TS_COption_FilterZ_free(_res);
9582                 // debug statements here
9583         }
9584         // struct LDKCResult_LockedChannelMonitorNoneZ CResult_LockedChannelMonitorNoneZ_ok(struct LDKLockedChannelMonitor o);
9585         export function CResult_LockedChannelMonitorNoneZ_ok(o: number): number {
9586                 if(!isWasmInitialized) {
9587                         throw new Error("initializeWasm() must be awaited first!");
9588                 }
9589                 const nativeResponseValue = wasm.TS_CResult_LockedChannelMonitorNoneZ_ok(o);
9590                 return nativeResponseValue;
9591         }
9592         // struct LDKCResult_LockedChannelMonitorNoneZ CResult_LockedChannelMonitorNoneZ_err(void);
9593         export function CResult_LockedChannelMonitorNoneZ_err(): number {
9594                 if(!isWasmInitialized) {
9595                         throw new Error("initializeWasm() must be awaited first!");
9596                 }
9597                 const nativeResponseValue = wasm.TS_CResult_LockedChannelMonitorNoneZ_err();
9598                 return nativeResponseValue;
9599         }
9600         // bool CResult_LockedChannelMonitorNoneZ_is_ok(const struct LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR o);
9601         export function CResult_LockedChannelMonitorNoneZ_is_ok(o: number): boolean {
9602                 if(!isWasmInitialized) {
9603                         throw new Error("initializeWasm() must be awaited first!");
9604                 }
9605                 const nativeResponseValue = wasm.TS_CResult_LockedChannelMonitorNoneZ_is_ok(o);
9606                 return nativeResponseValue;
9607         }
9608         // void CResult_LockedChannelMonitorNoneZ_free(struct LDKCResult_LockedChannelMonitorNoneZ _res);
9609         export function CResult_LockedChannelMonitorNoneZ_free(_res: number): void {
9610                 if(!isWasmInitialized) {
9611                         throw new Error("initializeWasm() must be awaited first!");
9612                 }
9613                 const nativeResponseValue = wasm.TS_CResult_LockedChannelMonitorNoneZ_free(_res);
9614                 // debug statements here
9615         }
9616         // void CVec_OutPointZ_free(struct LDKCVec_OutPointZ _res);
9617         export function CVec_OutPointZ_free(_res: number[]): void {
9618                 if(!isWasmInitialized) {
9619                         throw new Error("initializeWasm() must be awaited first!");
9620                 }
9621                 const nativeResponseValue = wasm.TS_CVec_OutPointZ_free(_res);
9622                 // debug statements here
9623         }
9624         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void);
9625         export function CResult_NoneAPIErrorZ_ok(): number {
9626                 if(!isWasmInitialized) {
9627                         throw new Error("initializeWasm() must be awaited first!");
9628                 }
9629                 const nativeResponseValue = wasm.TS_CResult_NoneAPIErrorZ_ok();
9630                 return nativeResponseValue;
9631         }
9632         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_err(struct LDKAPIError e);
9633         export function CResult_NoneAPIErrorZ_err(e: number): number {
9634                 if(!isWasmInitialized) {
9635                         throw new Error("initializeWasm() must be awaited first!");
9636                 }
9637                 const nativeResponseValue = wasm.TS_CResult_NoneAPIErrorZ_err(e);
9638                 return nativeResponseValue;
9639         }
9640         // bool CResult_NoneAPIErrorZ_is_ok(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR o);
9641         export function CResult_NoneAPIErrorZ_is_ok(o: number): boolean {
9642                 if(!isWasmInitialized) {
9643                         throw new Error("initializeWasm() must be awaited first!");
9644                 }
9645                 const nativeResponseValue = wasm.TS_CResult_NoneAPIErrorZ_is_ok(o);
9646                 return nativeResponseValue;
9647         }
9648         // void CResult_NoneAPIErrorZ_free(struct LDKCResult_NoneAPIErrorZ _res);
9649         export function CResult_NoneAPIErrorZ_free(_res: number): void {
9650                 if(!isWasmInitialized) {
9651                         throw new Error("initializeWasm() must be awaited first!");
9652                 }
9653                 const nativeResponseValue = wasm.TS_CResult_NoneAPIErrorZ_free(_res);
9654                 // debug statements here
9655         }
9656         // uint64_t CResult_NoneAPIErrorZ_clone_ptr(LDKCResult_NoneAPIErrorZ *NONNULL_PTR arg);
9657         export function CResult_NoneAPIErrorZ_clone_ptr(arg: number): number {
9658                 if(!isWasmInitialized) {
9659                         throw new Error("initializeWasm() must be awaited first!");
9660                 }
9661                 const nativeResponseValue = wasm.TS_CResult_NoneAPIErrorZ_clone_ptr(arg);
9662                 return nativeResponseValue;
9663         }
9664         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_clone(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR orig);
9665         export function CResult_NoneAPIErrorZ_clone(orig: number): number {
9666                 if(!isWasmInitialized) {
9667                         throw new Error("initializeWasm() must be awaited first!");
9668                 }
9669                 const nativeResponseValue = wasm.TS_CResult_NoneAPIErrorZ_clone(orig);
9670                 return nativeResponseValue;
9671         }
9672         // struct LDKCOption_u16Z COption_u16Z_some(uint16_t o);
9673         export function COption_u16Z_some(o: number): number {
9674                 if(!isWasmInitialized) {
9675                         throw new Error("initializeWasm() must be awaited first!");
9676                 }
9677                 const nativeResponseValue = wasm.TS_COption_u16Z_some(o);
9678                 return nativeResponseValue;
9679         }
9680         // struct LDKCOption_u16Z COption_u16Z_none(void);
9681         export function COption_u16Z_none(): number {
9682                 if(!isWasmInitialized) {
9683                         throw new Error("initializeWasm() must be awaited first!");
9684                 }
9685                 const nativeResponseValue = wasm.TS_COption_u16Z_none();
9686                 return nativeResponseValue;
9687         }
9688         // void COption_u16Z_free(struct LDKCOption_u16Z _res);
9689         export function COption_u16Z_free(_res: number): void {
9690                 if(!isWasmInitialized) {
9691                         throw new Error("initializeWasm() must be awaited first!");
9692                 }
9693                 const nativeResponseValue = wasm.TS_COption_u16Z_free(_res);
9694                 // debug statements here
9695         }
9696         // uint64_t COption_u16Z_clone_ptr(LDKCOption_u16Z *NONNULL_PTR arg);
9697         export function COption_u16Z_clone_ptr(arg: number): number {
9698                 if(!isWasmInitialized) {
9699                         throw new Error("initializeWasm() must be awaited first!");
9700                 }
9701                 const nativeResponseValue = wasm.TS_COption_u16Z_clone_ptr(arg);
9702                 return nativeResponseValue;
9703         }
9704         // struct LDKCOption_u16Z COption_u16Z_clone(const struct LDKCOption_u16Z *NONNULL_PTR orig);
9705         export function COption_u16Z_clone(orig: number): number {
9706                 if(!isWasmInitialized) {
9707                         throw new Error("initializeWasm() must be awaited first!");
9708                 }
9709                 const nativeResponseValue = wasm.TS_COption_u16Z_clone(orig);
9710                 return nativeResponseValue;
9711         }
9712         // void CVec_CResult_NoneAPIErrorZZ_free(struct LDKCVec_CResult_NoneAPIErrorZZ _res);
9713         export function CVec_CResult_NoneAPIErrorZZ_free(_res: number[]): void {
9714                 if(!isWasmInitialized) {
9715                         throw new Error("initializeWasm() must be awaited first!");
9716                 }
9717                 const nativeResponseValue = wasm.TS_CVec_CResult_NoneAPIErrorZZ_free(_res);
9718                 // debug statements here
9719         }
9720         // void CVec_APIErrorZ_free(struct LDKCVec_APIErrorZ _res);
9721         export function CVec_APIErrorZ_free(_res: number[]): void {
9722                 if(!isWasmInitialized) {
9723                         throw new Error("initializeWasm() must be awaited first!");
9724                 }
9725                 const nativeResponseValue = wasm.TS_CVec_APIErrorZ_free(_res);
9726                 // debug statements here
9727         }
9728         // struct LDKCResult__u832APIErrorZ CResult__u832APIErrorZ_ok(struct LDKThirtyTwoBytes o);
9729         export function CResult__u832APIErrorZ_ok(o: Uint8Array): number {
9730                 if(!isWasmInitialized) {
9731                         throw new Error("initializeWasm() must be awaited first!");
9732                 }
9733                 const nativeResponseValue = wasm.TS_CResult__u832APIErrorZ_ok(encodeUint8Array(o));
9734                 return nativeResponseValue;
9735         }
9736         // struct LDKCResult__u832APIErrorZ CResult__u832APIErrorZ_err(struct LDKAPIError e);
9737         export function CResult__u832APIErrorZ_err(e: number): number {
9738                 if(!isWasmInitialized) {
9739                         throw new Error("initializeWasm() must be awaited first!");
9740                 }
9741                 const nativeResponseValue = wasm.TS_CResult__u832APIErrorZ_err(e);
9742                 return nativeResponseValue;
9743         }
9744         // bool CResult__u832APIErrorZ_is_ok(const struct LDKCResult__u832APIErrorZ *NONNULL_PTR o);
9745         export function CResult__u832APIErrorZ_is_ok(o: number): boolean {
9746                 if(!isWasmInitialized) {
9747                         throw new Error("initializeWasm() must be awaited first!");
9748                 }
9749                 const nativeResponseValue = wasm.TS_CResult__u832APIErrorZ_is_ok(o);
9750                 return nativeResponseValue;
9751         }
9752         // void CResult__u832APIErrorZ_free(struct LDKCResult__u832APIErrorZ _res);
9753         export function CResult__u832APIErrorZ_free(_res: number): void {
9754                 if(!isWasmInitialized) {
9755                         throw new Error("initializeWasm() must be awaited first!");
9756                 }
9757                 const nativeResponseValue = wasm.TS_CResult__u832APIErrorZ_free(_res);
9758                 // debug statements here
9759         }
9760         // uint64_t CResult__u832APIErrorZ_clone_ptr(LDKCResult__u832APIErrorZ *NONNULL_PTR arg);
9761         export function CResult__u832APIErrorZ_clone_ptr(arg: number): number {
9762                 if(!isWasmInitialized) {
9763                         throw new Error("initializeWasm() must be awaited first!");
9764                 }
9765                 const nativeResponseValue = wasm.TS_CResult__u832APIErrorZ_clone_ptr(arg);
9766                 return nativeResponseValue;
9767         }
9768         // struct LDKCResult__u832APIErrorZ CResult__u832APIErrorZ_clone(const struct LDKCResult__u832APIErrorZ *NONNULL_PTR orig);
9769         export function CResult__u832APIErrorZ_clone(orig: number): number {
9770                 if(!isWasmInitialized) {
9771                         throw new Error("initializeWasm() must be awaited first!");
9772                 }
9773                 const nativeResponseValue = wasm.TS_CResult__u832APIErrorZ_clone(orig);
9774                 return nativeResponseValue;
9775         }
9776         // struct LDKCResult_PaymentIdPaymentSendFailureZ CResult_PaymentIdPaymentSendFailureZ_ok(struct LDKThirtyTwoBytes o);
9777         export function CResult_PaymentIdPaymentSendFailureZ_ok(o: Uint8Array): number {
9778                 if(!isWasmInitialized) {
9779                         throw new Error("initializeWasm() must be awaited first!");
9780                 }
9781                 const nativeResponseValue = wasm.TS_CResult_PaymentIdPaymentSendFailureZ_ok(encodeUint8Array(o));
9782                 return nativeResponseValue;
9783         }
9784         // struct LDKCResult_PaymentIdPaymentSendFailureZ CResult_PaymentIdPaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
9785         export function CResult_PaymentIdPaymentSendFailureZ_err(e: number): number {
9786                 if(!isWasmInitialized) {
9787                         throw new Error("initializeWasm() must be awaited first!");
9788                 }
9789                 const nativeResponseValue = wasm.TS_CResult_PaymentIdPaymentSendFailureZ_err(e);
9790                 return nativeResponseValue;
9791         }
9792         // bool CResult_PaymentIdPaymentSendFailureZ_is_ok(const struct LDKCResult_PaymentIdPaymentSendFailureZ *NONNULL_PTR o);
9793         export function CResult_PaymentIdPaymentSendFailureZ_is_ok(o: number): boolean {
9794                 if(!isWasmInitialized) {
9795                         throw new Error("initializeWasm() must be awaited first!");
9796                 }
9797                 const nativeResponseValue = wasm.TS_CResult_PaymentIdPaymentSendFailureZ_is_ok(o);
9798                 return nativeResponseValue;
9799         }
9800         // void CResult_PaymentIdPaymentSendFailureZ_free(struct LDKCResult_PaymentIdPaymentSendFailureZ _res);
9801         export function CResult_PaymentIdPaymentSendFailureZ_free(_res: number): void {
9802                 if(!isWasmInitialized) {
9803                         throw new Error("initializeWasm() must be awaited first!");
9804                 }
9805                 const nativeResponseValue = wasm.TS_CResult_PaymentIdPaymentSendFailureZ_free(_res);
9806                 // debug statements here
9807         }
9808         // uint64_t CResult_PaymentIdPaymentSendFailureZ_clone_ptr(LDKCResult_PaymentIdPaymentSendFailureZ *NONNULL_PTR arg);
9809         export function CResult_PaymentIdPaymentSendFailureZ_clone_ptr(arg: number): number {
9810                 if(!isWasmInitialized) {
9811                         throw new Error("initializeWasm() must be awaited first!");
9812                 }
9813                 const nativeResponseValue = wasm.TS_CResult_PaymentIdPaymentSendFailureZ_clone_ptr(arg);
9814                 return nativeResponseValue;
9815         }
9816         // struct LDKCResult_PaymentIdPaymentSendFailureZ CResult_PaymentIdPaymentSendFailureZ_clone(const struct LDKCResult_PaymentIdPaymentSendFailureZ *NONNULL_PTR orig);
9817         export function CResult_PaymentIdPaymentSendFailureZ_clone(orig: number): number {
9818                 if(!isWasmInitialized) {
9819                         throw new Error("initializeWasm() must be awaited first!");
9820                 }
9821                 const nativeResponseValue = wasm.TS_CResult_PaymentIdPaymentSendFailureZ_clone(orig);
9822                 return nativeResponseValue;
9823         }
9824         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void);
9825         export function CResult_NonePaymentSendFailureZ_ok(): number {
9826                 if(!isWasmInitialized) {
9827                         throw new Error("initializeWasm() must be awaited first!");
9828                 }
9829                 const nativeResponseValue = wasm.TS_CResult_NonePaymentSendFailureZ_ok();
9830                 return nativeResponseValue;
9831         }
9832         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
9833         export function CResult_NonePaymentSendFailureZ_err(e: number): number {
9834                 if(!isWasmInitialized) {
9835                         throw new Error("initializeWasm() must be awaited first!");
9836                 }
9837                 const nativeResponseValue = wasm.TS_CResult_NonePaymentSendFailureZ_err(e);
9838                 return nativeResponseValue;
9839         }
9840         // bool CResult_NonePaymentSendFailureZ_is_ok(const struct LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR o);
9841         export function CResult_NonePaymentSendFailureZ_is_ok(o: number): boolean {
9842                 if(!isWasmInitialized) {
9843                         throw new Error("initializeWasm() must be awaited first!");
9844                 }
9845                 const nativeResponseValue = wasm.TS_CResult_NonePaymentSendFailureZ_is_ok(o);
9846                 return nativeResponseValue;
9847         }
9848         // void CResult_NonePaymentSendFailureZ_free(struct LDKCResult_NonePaymentSendFailureZ _res);
9849         export function CResult_NonePaymentSendFailureZ_free(_res: number): void {
9850                 if(!isWasmInitialized) {
9851                         throw new Error("initializeWasm() must be awaited first!");
9852                 }
9853                 const nativeResponseValue = wasm.TS_CResult_NonePaymentSendFailureZ_free(_res);
9854                 // debug statements here
9855         }
9856         // uint64_t CResult_NonePaymentSendFailureZ_clone_ptr(LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR arg);
9857         export function CResult_NonePaymentSendFailureZ_clone_ptr(arg: number): number {
9858                 if(!isWasmInitialized) {
9859                         throw new Error("initializeWasm() must be awaited first!");
9860                 }
9861                 const nativeResponseValue = wasm.TS_CResult_NonePaymentSendFailureZ_clone_ptr(arg);
9862                 return nativeResponseValue;
9863         }
9864         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_clone(const struct LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR orig);
9865         export function CResult_NonePaymentSendFailureZ_clone(orig: number): number {
9866                 if(!isWasmInitialized) {
9867                         throw new Error("initializeWasm() must be awaited first!");
9868                 }
9869                 const nativeResponseValue = wasm.TS_CResult_NonePaymentSendFailureZ_clone(orig);
9870                 return nativeResponseValue;
9871         }
9872         // uint64_t C2Tuple_PaymentHashPaymentIdZ_clone_ptr(LDKC2Tuple_PaymentHashPaymentIdZ *NONNULL_PTR arg);
9873         export function C2Tuple_PaymentHashPaymentIdZ_clone_ptr(arg: number): number {
9874                 if(!isWasmInitialized) {
9875                         throw new Error("initializeWasm() must be awaited first!");
9876                 }
9877                 const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentIdZ_clone_ptr(arg);
9878                 return nativeResponseValue;
9879         }
9880         // struct LDKC2Tuple_PaymentHashPaymentIdZ C2Tuple_PaymentHashPaymentIdZ_clone(const struct LDKC2Tuple_PaymentHashPaymentIdZ *NONNULL_PTR orig);
9881         export function C2Tuple_PaymentHashPaymentIdZ_clone(orig: number): number {
9882                 if(!isWasmInitialized) {
9883                         throw new Error("initializeWasm() must be awaited first!");
9884                 }
9885                 const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentIdZ_clone(orig);
9886                 return nativeResponseValue;
9887         }
9888         // struct LDKC2Tuple_PaymentHashPaymentIdZ C2Tuple_PaymentHashPaymentIdZ_new(struct LDKThirtyTwoBytes a, struct LDKThirtyTwoBytes b);
9889         export function C2Tuple_PaymentHashPaymentIdZ_new(a: Uint8Array, b: Uint8Array): number {
9890                 if(!isWasmInitialized) {
9891                         throw new Error("initializeWasm() must be awaited first!");
9892                 }
9893                 const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentIdZ_new(encodeUint8Array(a), encodeUint8Array(b));
9894                 return nativeResponseValue;
9895         }
9896         // void C2Tuple_PaymentHashPaymentIdZ_free(struct LDKC2Tuple_PaymentHashPaymentIdZ _res);
9897         export function C2Tuple_PaymentHashPaymentIdZ_free(_res: number): void {
9898                 if(!isWasmInitialized) {
9899                         throw new Error("initializeWasm() must be awaited first!");
9900                 }
9901                 const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentIdZ_free(_res);
9902                 // debug statements here
9903         }
9904         // struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_ok(struct LDKC2Tuple_PaymentHashPaymentIdZ o);
9905         export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_ok(o: number): number {
9906                 if(!isWasmInitialized) {
9907                         throw new Error("initializeWasm() must be awaited first!");
9908                 }
9909                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_ok(o);
9910                 return nativeResponseValue;
9911         }
9912         // struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
9913         export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_err(e: number): number {
9914                 if(!isWasmInitialized) {
9915                         throw new Error("initializeWasm() must be awaited first!");
9916                 }
9917                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_err(e);
9918                 return nativeResponseValue;
9919         }
9920         // bool CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_is_ok(const struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ *NONNULL_PTR o);
9921         export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_is_ok(o: number): boolean {
9922                 if(!isWasmInitialized) {
9923                         throw new Error("initializeWasm() must be awaited first!");
9924                 }
9925                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_is_ok(o);
9926                 return nativeResponseValue;
9927         }
9928         // void CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_free(struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ _res);
9929         export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_free(_res: number): void {
9930                 if(!isWasmInitialized) {
9931                         throw new Error("initializeWasm() must be awaited first!");
9932                 }
9933                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_free(_res);
9934                 // debug statements here
9935         }
9936         // uint64_t CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone_ptr(LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ *NONNULL_PTR arg);
9937         export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone_ptr(arg: number): number {
9938                 if(!isWasmInitialized) {
9939                         throw new Error("initializeWasm() must be awaited first!");
9940                 }
9941                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone_ptr(arg);
9942                 return nativeResponseValue;
9943         }
9944         // struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone(const struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ *NONNULL_PTR orig);
9945         export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone(orig: number): number {
9946                 if(!isWasmInitialized) {
9947                         throw new Error("initializeWasm() must be awaited first!");
9948                 }
9949                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone(orig);
9950                 return nativeResponseValue;
9951         }
9952         // uint64_t C2Tuple_PaymentHashPaymentSecretZ_clone_ptr(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR arg);
9953         export function C2Tuple_PaymentHashPaymentSecretZ_clone_ptr(arg: number): number {
9954                 if(!isWasmInitialized) {
9955                         throw new Error("initializeWasm() must be awaited first!");
9956                 }
9957                 const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentSecretZ_clone_ptr(arg);
9958                 return nativeResponseValue;
9959         }
9960         // struct LDKC2Tuple_PaymentHashPaymentSecretZ C2Tuple_PaymentHashPaymentSecretZ_clone(const struct LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR orig);
9961         export function C2Tuple_PaymentHashPaymentSecretZ_clone(orig: number): number {
9962                 if(!isWasmInitialized) {
9963                         throw new Error("initializeWasm() must be awaited first!");
9964                 }
9965                 const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentSecretZ_clone(orig);
9966                 return nativeResponseValue;
9967         }
9968         // struct LDKC2Tuple_PaymentHashPaymentSecretZ C2Tuple_PaymentHashPaymentSecretZ_new(struct LDKThirtyTwoBytes a, struct LDKThirtyTwoBytes b);
9969         export function C2Tuple_PaymentHashPaymentSecretZ_new(a: Uint8Array, b: Uint8Array): number {
9970                 if(!isWasmInitialized) {
9971                         throw new Error("initializeWasm() must be awaited first!");
9972                 }
9973                 const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentSecretZ_new(encodeUint8Array(a), encodeUint8Array(b));
9974                 return nativeResponseValue;
9975         }
9976         // void C2Tuple_PaymentHashPaymentSecretZ_free(struct LDKC2Tuple_PaymentHashPaymentSecretZ _res);
9977         export function C2Tuple_PaymentHashPaymentSecretZ_free(_res: number): void {
9978                 if(!isWasmInitialized) {
9979                         throw new Error("initializeWasm() must be awaited first!");
9980                 }
9981                 const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentSecretZ_free(_res);
9982                 // debug statements here
9983         }
9984         // struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_ok(struct LDKC2Tuple_PaymentHashPaymentSecretZ o);
9985         export function CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_ok(o: number): number {
9986                 if(!isWasmInitialized) {
9987                         throw new Error("initializeWasm() must be awaited first!");
9988                 }
9989                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_ok(o);
9990                 return nativeResponseValue;
9991         }
9992         // struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_err(void);
9993         export function CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_err(): number {
9994                 if(!isWasmInitialized) {
9995                         throw new Error("initializeWasm() must be awaited first!");
9996                 }
9997                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_err();
9998                 return nativeResponseValue;
9999         }
10000         // bool CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_is_ok(const struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ *NONNULL_PTR o);
10001         export function CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_is_ok(o: number): boolean {
10002                 if(!isWasmInitialized) {
10003                         throw new Error("initializeWasm() must be awaited first!");
10004                 }
10005                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_is_ok(o);
10006                 return nativeResponseValue;
10007         }
10008         // void CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_free(struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ _res);
10009         export function CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_free(_res: number): void {
10010                 if(!isWasmInitialized) {
10011                         throw new Error("initializeWasm() must be awaited first!");
10012                 }
10013                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_free(_res);
10014                 // debug statements here
10015         }
10016         // uint64_t CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_clone_ptr(LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ *NONNULL_PTR arg);
10017         export function CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_clone_ptr(arg: number): number {
10018                 if(!isWasmInitialized) {
10019                         throw new Error("initializeWasm() must be awaited first!");
10020                 }
10021                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_clone_ptr(arg);
10022                 return nativeResponseValue;
10023         }
10024         // struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_clone(const struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ *NONNULL_PTR orig);
10025         export function CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_clone(orig: number): number {
10026                 if(!isWasmInitialized) {
10027                         throw new Error("initializeWasm() must be awaited first!");
10028                 }
10029                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_clone(orig);
10030                 return nativeResponseValue;
10031         }
10032         // struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_ok(struct LDKC2Tuple_PaymentHashPaymentSecretZ o);
10033         export function CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_ok(o: number): number {
10034                 if(!isWasmInitialized) {
10035                         throw new Error("initializeWasm() must be awaited first!");
10036                 }
10037                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_ok(o);
10038                 return nativeResponseValue;
10039         }
10040         // struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_err(struct LDKAPIError e);
10041         export function CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_err(e: number): number {
10042                 if(!isWasmInitialized) {
10043                         throw new Error("initializeWasm() must be awaited first!");
10044                 }
10045                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_err(e);
10046                 return nativeResponseValue;
10047         }
10048         // bool CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_is_ok(const struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ *NONNULL_PTR o);
10049         export function CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_is_ok(o: number): boolean {
10050                 if(!isWasmInitialized) {
10051                         throw new Error("initializeWasm() must be awaited first!");
10052                 }
10053                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_is_ok(o);
10054                 return nativeResponseValue;
10055         }
10056         // void CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_free(struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ _res);
10057         export function CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_free(_res: number): void {
10058                 if(!isWasmInitialized) {
10059                         throw new Error("initializeWasm() must be awaited first!");
10060                 }
10061                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_free(_res);
10062                 // debug statements here
10063         }
10064         // uint64_t CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_clone_ptr(LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ *NONNULL_PTR arg);
10065         export function CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_clone_ptr(arg: number): number {
10066                 if(!isWasmInitialized) {
10067                         throw new Error("initializeWasm() must be awaited first!");
10068                 }
10069                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_clone_ptr(arg);
10070                 return nativeResponseValue;
10071         }
10072         // struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_clone(const struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ *NONNULL_PTR orig);
10073         export function CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_clone(orig: number): number {
10074                 if(!isWasmInitialized) {
10075                         throw new Error("initializeWasm() must be awaited first!");
10076                 }
10077                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_clone(orig);
10078                 return nativeResponseValue;
10079         }
10080         // struct LDKCResult_PaymentSecretNoneZ CResult_PaymentSecretNoneZ_ok(struct LDKThirtyTwoBytes o);
10081         export function CResult_PaymentSecretNoneZ_ok(o: Uint8Array): number {
10082                 if(!isWasmInitialized) {
10083                         throw new Error("initializeWasm() must be awaited first!");
10084                 }
10085                 const nativeResponseValue = wasm.TS_CResult_PaymentSecretNoneZ_ok(encodeUint8Array(o));
10086                 return nativeResponseValue;
10087         }
10088         // struct LDKCResult_PaymentSecretNoneZ CResult_PaymentSecretNoneZ_err(void);
10089         export function CResult_PaymentSecretNoneZ_err(): number {
10090                 if(!isWasmInitialized) {
10091                         throw new Error("initializeWasm() must be awaited first!");
10092                 }
10093                 const nativeResponseValue = wasm.TS_CResult_PaymentSecretNoneZ_err();
10094                 return nativeResponseValue;
10095         }
10096         // bool CResult_PaymentSecretNoneZ_is_ok(const struct LDKCResult_PaymentSecretNoneZ *NONNULL_PTR o);
10097         export function CResult_PaymentSecretNoneZ_is_ok(o: number): boolean {
10098                 if(!isWasmInitialized) {
10099                         throw new Error("initializeWasm() must be awaited first!");
10100                 }
10101                 const nativeResponseValue = wasm.TS_CResult_PaymentSecretNoneZ_is_ok(o);
10102                 return nativeResponseValue;
10103         }
10104         // void CResult_PaymentSecretNoneZ_free(struct LDKCResult_PaymentSecretNoneZ _res);
10105         export function CResult_PaymentSecretNoneZ_free(_res: number): void {
10106                 if(!isWasmInitialized) {
10107                         throw new Error("initializeWasm() must be awaited first!");
10108                 }
10109                 const nativeResponseValue = wasm.TS_CResult_PaymentSecretNoneZ_free(_res);
10110                 // debug statements here
10111         }
10112         // uint64_t CResult_PaymentSecretNoneZ_clone_ptr(LDKCResult_PaymentSecretNoneZ *NONNULL_PTR arg);
10113         export function CResult_PaymentSecretNoneZ_clone_ptr(arg: number): number {
10114                 if(!isWasmInitialized) {
10115                         throw new Error("initializeWasm() must be awaited first!");
10116                 }
10117                 const nativeResponseValue = wasm.TS_CResult_PaymentSecretNoneZ_clone_ptr(arg);
10118                 return nativeResponseValue;
10119         }
10120         // struct LDKCResult_PaymentSecretNoneZ CResult_PaymentSecretNoneZ_clone(const struct LDKCResult_PaymentSecretNoneZ *NONNULL_PTR orig);
10121         export function CResult_PaymentSecretNoneZ_clone(orig: number): number {
10122                 if(!isWasmInitialized) {
10123                         throw new Error("initializeWasm() must be awaited first!");
10124                 }
10125                 const nativeResponseValue = wasm.TS_CResult_PaymentSecretNoneZ_clone(orig);
10126                 return nativeResponseValue;
10127         }
10128         // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_ok(struct LDKThirtyTwoBytes o);
10129         export function CResult_PaymentSecretAPIErrorZ_ok(o: Uint8Array): number {
10130                 if(!isWasmInitialized) {
10131                         throw new Error("initializeWasm() must be awaited first!");
10132                 }
10133                 const nativeResponseValue = wasm.TS_CResult_PaymentSecretAPIErrorZ_ok(encodeUint8Array(o));
10134                 return nativeResponseValue;
10135         }
10136         // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_err(struct LDKAPIError e);
10137         export function CResult_PaymentSecretAPIErrorZ_err(e: number): number {
10138                 if(!isWasmInitialized) {
10139                         throw new Error("initializeWasm() must be awaited first!");
10140                 }
10141                 const nativeResponseValue = wasm.TS_CResult_PaymentSecretAPIErrorZ_err(e);
10142                 return nativeResponseValue;
10143         }
10144         // bool CResult_PaymentSecretAPIErrorZ_is_ok(const struct LDKCResult_PaymentSecretAPIErrorZ *NONNULL_PTR o);
10145         export function CResult_PaymentSecretAPIErrorZ_is_ok(o: number): boolean {
10146                 if(!isWasmInitialized) {
10147                         throw new Error("initializeWasm() must be awaited first!");
10148                 }
10149                 const nativeResponseValue = wasm.TS_CResult_PaymentSecretAPIErrorZ_is_ok(o);
10150                 return nativeResponseValue;
10151         }
10152         // void CResult_PaymentSecretAPIErrorZ_free(struct LDKCResult_PaymentSecretAPIErrorZ _res);
10153         export function CResult_PaymentSecretAPIErrorZ_free(_res: number): void {
10154                 if(!isWasmInitialized) {
10155                         throw new Error("initializeWasm() must be awaited first!");
10156                 }
10157                 const nativeResponseValue = wasm.TS_CResult_PaymentSecretAPIErrorZ_free(_res);
10158                 // debug statements here
10159         }
10160         // uint64_t CResult_PaymentSecretAPIErrorZ_clone_ptr(LDKCResult_PaymentSecretAPIErrorZ *NONNULL_PTR arg);
10161         export function CResult_PaymentSecretAPIErrorZ_clone_ptr(arg: number): number {
10162                 if(!isWasmInitialized) {
10163                         throw new Error("initializeWasm() must be awaited first!");
10164                 }
10165                 const nativeResponseValue = wasm.TS_CResult_PaymentSecretAPIErrorZ_clone_ptr(arg);
10166                 return nativeResponseValue;
10167         }
10168         // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_clone(const struct LDKCResult_PaymentSecretAPIErrorZ *NONNULL_PTR orig);
10169         export function CResult_PaymentSecretAPIErrorZ_clone(orig: number): number {
10170                 if(!isWasmInitialized) {
10171                         throw new Error("initializeWasm() must be awaited first!");
10172                 }
10173                 const nativeResponseValue = wasm.TS_CResult_PaymentSecretAPIErrorZ_clone(orig);
10174                 return nativeResponseValue;
10175         }
10176         // struct LDKCResult_PaymentPreimageAPIErrorZ CResult_PaymentPreimageAPIErrorZ_ok(struct LDKThirtyTwoBytes o);
10177         export function CResult_PaymentPreimageAPIErrorZ_ok(o: Uint8Array): number {
10178                 if(!isWasmInitialized) {
10179                         throw new Error("initializeWasm() must be awaited first!");
10180                 }
10181                 const nativeResponseValue = wasm.TS_CResult_PaymentPreimageAPIErrorZ_ok(encodeUint8Array(o));
10182                 return nativeResponseValue;
10183         }
10184         // struct LDKCResult_PaymentPreimageAPIErrorZ CResult_PaymentPreimageAPIErrorZ_err(struct LDKAPIError e);
10185         export function CResult_PaymentPreimageAPIErrorZ_err(e: number): number {
10186                 if(!isWasmInitialized) {
10187                         throw new Error("initializeWasm() must be awaited first!");
10188                 }
10189                 const nativeResponseValue = wasm.TS_CResult_PaymentPreimageAPIErrorZ_err(e);
10190                 return nativeResponseValue;
10191         }
10192         // bool CResult_PaymentPreimageAPIErrorZ_is_ok(const struct LDKCResult_PaymentPreimageAPIErrorZ *NONNULL_PTR o);
10193         export function CResult_PaymentPreimageAPIErrorZ_is_ok(o: number): boolean {
10194                 if(!isWasmInitialized) {
10195                         throw new Error("initializeWasm() must be awaited first!");
10196                 }
10197                 const nativeResponseValue = wasm.TS_CResult_PaymentPreimageAPIErrorZ_is_ok(o);
10198                 return nativeResponseValue;
10199         }
10200         // void CResult_PaymentPreimageAPIErrorZ_free(struct LDKCResult_PaymentPreimageAPIErrorZ _res);
10201         export function CResult_PaymentPreimageAPIErrorZ_free(_res: number): void {
10202                 if(!isWasmInitialized) {
10203                         throw new Error("initializeWasm() must be awaited first!");
10204                 }
10205                 const nativeResponseValue = wasm.TS_CResult_PaymentPreimageAPIErrorZ_free(_res);
10206                 // debug statements here
10207         }
10208         // uint64_t CResult_PaymentPreimageAPIErrorZ_clone_ptr(LDKCResult_PaymentPreimageAPIErrorZ *NONNULL_PTR arg);
10209         export function CResult_PaymentPreimageAPIErrorZ_clone_ptr(arg: number): number {
10210                 if(!isWasmInitialized) {
10211                         throw new Error("initializeWasm() must be awaited first!");
10212                 }
10213                 const nativeResponseValue = wasm.TS_CResult_PaymentPreimageAPIErrorZ_clone_ptr(arg);
10214                 return nativeResponseValue;
10215         }
10216         // struct LDKCResult_PaymentPreimageAPIErrorZ CResult_PaymentPreimageAPIErrorZ_clone(const struct LDKCResult_PaymentPreimageAPIErrorZ *NONNULL_PTR orig);
10217         export function CResult_PaymentPreimageAPIErrorZ_clone(orig: number): number {
10218                 if(!isWasmInitialized) {
10219                         throw new Error("initializeWasm() must be awaited first!");
10220                 }
10221                 const nativeResponseValue = wasm.TS_CResult_PaymentPreimageAPIErrorZ_clone(orig);
10222                 return nativeResponseValue;
10223         }
10224         // void CVec_ChannelMonitorZ_free(struct LDKCVec_ChannelMonitorZ _res);
10225         export function CVec_ChannelMonitorZ_free(_res: number[]): void {
10226                 if(!isWasmInitialized) {
10227                         throw new Error("initializeWasm() must be awaited first!");
10228                 }
10229                 const nativeResponseValue = wasm.TS_CVec_ChannelMonitorZ_free(_res);
10230                 // debug statements here
10231         }
10232         // struct LDKC2Tuple_BlockHashChannelManagerZ C2Tuple_BlockHashChannelManagerZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelManager b);
10233         export function C2Tuple_BlockHashChannelManagerZ_new(a: Uint8Array, b: number): number {
10234                 if(!isWasmInitialized) {
10235                         throw new Error("initializeWasm() must be awaited first!");
10236                 }
10237                 const nativeResponseValue = wasm.TS_C2Tuple_BlockHashChannelManagerZ_new(encodeUint8Array(a), b);
10238                 return nativeResponseValue;
10239         }
10240         // void C2Tuple_BlockHashChannelManagerZ_free(struct LDKC2Tuple_BlockHashChannelManagerZ _res);
10241         export function C2Tuple_BlockHashChannelManagerZ_free(_res: number): void {
10242                 if(!isWasmInitialized) {
10243                         throw new Error("initializeWasm() must be awaited first!");
10244                 }
10245                 const nativeResponseValue = wasm.TS_C2Tuple_BlockHashChannelManagerZ_free(_res);
10246                 // debug statements here
10247         }
10248         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelManagerZ o);
10249         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o: number): number {
10250                 if(!isWasmInitialized) {
10251                         throw new Error("initializeWasm() must be awaited first!");
10252                 }
10253                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o);
10254                 return nativeResponseValue;
10255         }
10256         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(struct LDKDecodeError e);
10257         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e: number): number {
10258                 if(!isWasmInitialized) {
10259                         throw new Error("initializeWasm() must be awaited first!");
10260                 }
10261                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e);
10262                 return nativeResponseValue;
10263         }
10264         // bool CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_is_ok(const struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *NONNULL_PTR o);
10265         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_is_ok(o: number): boolean {
10266                 if(!isWasmInitialized) {
10267                         throw new Error("initializeWasm() must be awaited first!");
10268                 }
10269                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_is_ok(o);
10270                 return nativeResponseValue;
10271         }
10272         // void CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res);
10273         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res: number): void {
10274                 if(!isWasmInitialized) {
10275                         throw new Error("initializeWasm() must be awaited first!");
10276                 }
10277                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res);
10278                 // debug statements here
10279         }
10280         // void PaymentPurpose_free(struct LDKPaymentPurpose this_ptr);
10281         export function PaymentPurpose_free(this_ptr: number): void {
10282                 if(!isWasmInitialized) {
10283                         throw new Error("initializeWasm() must be awaited first!");
10284                 }
10285                 const nativeResponseValue = wasm.TS_PaymentPurpose_free(this_ptr);
10286                 // debug statements here
10287         }
10288         // uint64_t PaymentPurpose_clone_ptr(LDKPaymentPurpose *NONNULL_PTR arg);
10289         export function PaymentPurpose_clone_ptr(arg: number): number {
10290                 if(!isWasmInitialized) {
10291                         throw new Error("initializeWasm() must be awaited first!");
10292                 }
10293                 const nativeResponseValue = wasm.TS_PaymentPurpose_clone_ptr(arg);
10294                 return nativeResponseValue;
10295         }
10296         // struct LDKPaymentPurpose PaymentPurpose_clone(const struct LDKPaymentPurpose *NONNULL_PTR orig);
10297         export function PaymentPurpose_clone(orig: number): number {
10298                 if(!isWasmInitialized) {
10299                         throw new Error("initializeWasm() must be awaited first!");
10300                 }
10301                 const nativeResponseValue = wasm.TS_PaymentPurpose_clone(orig);
10302                 return nativeResponseValue;
10303         }
10304         // struct LDKPaymentPurpose PaymentPurpose_invoice_payment(struct LDKThirtyTwoBytes payment_preimage, struct LDKThirtyTwoBytes payment_secret);
10305         export function PaymentPurpose_invoice_payment(payment_preimage: Uint8Array, payment_secret: Uint8Array): number {
10306                 if(!isWasmInitialized) {
10307                         throw new Error("initializeWasm() must be awaited first!");
10308                 }
10309                 const nativeResponseValue = wasm.TS_PaymentPurpose_invoice_payment(encodeUint8Array(payment_preimage), encodeUint8Array(payment_secret));
10310                 return nativeResponseValue;
10311         }
10312         // struct LDKPaymentPurpose PaymentPurpose_spontaneous_payment(struct LDKThirtyTwoBytes a);
10313         export function PaymentPurpose_spontaneous_payment(a: Uint8Array): number {
10314                 if(!isWasmInitialized) {
10315                         throw new Error("initializeWasm() must be awaited first!");
10316                 }
10317                 const nativeResponseValue = wasm.TS_PaymentPurpose_spontaneous_payment(encodeUint8Array(a));
10318                 return nativeResponseValue;
10319         }
10320         // void ClosureReason_free(struct LDKClosureReason this_ptr);
10321         export function ClosureReason_free(this_ptr: number): void {
10322                 if(!isWasmInitialized) {
10323                         throw new Error("initializeWasm() must be awaited first!");
10324                 }
10325                 const nativeResponseValue = wasm.TS_ClosureReason_free(this_ptr);
10326                 // debug statements here
10327         }
10328         // uint64_t ClosureReason_clone_ptr(LDKClosureReason *NONNULL_PTR arg);
10329         export function ClosureReason_clone_ptr(arg: number): number {
10330                 if(!isWasmInitialized) {
10331                         throw new Error("initializeWasm() must be awaited first!");
10332                 }
10333                 const nativeResponseValue = wasm.TS_ClosureReason_clone_ptr(arg);
10334                 return nativeResponseValue;
10335         }
10336         // struct LDKClosureReason ClosureReason_clone(const struct LDKClosureReason *NONNULL_PTR orig);
10337         export function ClosureReason_clone(orig: number): number {
10338                 if(!isWasmInitialized) {
10339                         throw new Error("initializeWasm() must be awaited first!");
10340                 }
10341                 const nativeResponseValue = wasm.TS_ClosureReason_clone(orig);
10342                 return nativeResponseValue;
10343         }
10344         // struct LDKClosureReason ClosureReason_counterparty_force_closed(struct LDKStr peer_msg);
10345         export function ClosureReason_counterparty_force_closed(peer_msg: String): number {
10346                 if(!isWasmInitialized) {
10347                         throw new Error("initializeWasm() must be awaited first!");
10348                 }
10349                 const nativeResponseValue = wasm.TS_ClosureReason_counterparty_force_closed(peer_msg);
10350                 return nativeResponseValue;
10351         }
10352         // struct LDKClosureReason ClosureReason_holder_force_closed(void);
10353         export function ClosureReason_holder_force_closed(): number {
10354                 if(!isWasmInitialized) {
10355                         throw new Error("initializeWasm() must be awaited first!");
10356                 }
10357                 const nativeResponseValue = wasm.TS_ClosureReason_holder_force_closed();
10358                 return nativeResponseValue;
10359         }
10360         // struct LDKClosureReason ClosureReason_cooperative_closure(void);
10361         export function ClosureReason_cooperative_closure(): number {
10362                 if(!isWasmInitialized) {
10363                         throw new Error("initializeWasm() must be awaited first!");
10364                 }
10365                 const nativeResponseValue = wasm.TS_ClosureReason_cooperative_closure();
10366                 return nativeResponseValue;
10367         }
10368         // struct LDKClosureReason ClosureReason_commitment_tx_confirmed(void);
10369         export function ClosureReason_commitment_tx_confirmed(): number {
10370                 if(!isWasmInitialized) {
10371                         throw new Error("initializeWasm() must be awaited first!");
10372                 }
10373                 const nativeResponseValue = wasm.TS_ClosureReason_commitment_tx_confirmed();
10374                 return nativeResponseValue;
10375         }
10376         // struct LDKClosureReason ClosureReason_funding_timed_out(void);
10377         export function ClosureReason_funding_timed_out(): number {
10378                 if(!isWasmInitialized) {
10379                         throw new Error("initializeWasm() must be awaited first!");
10380                 }
10381                 const nativeResponseValue = wasm.TS_ClosureReason_funding_timed_out();
10382                 return nativeResponseValue;
10383         }
10384         // struct LDKClosureReason ClosureReason_processing_error(struct LDKStr err);
10385         export function ClosureReason_processing_error(err: String): number {
10386                 if(!isWasmInitialized) {
10387                         throw new Error("initializeWasm() must be awaited first!");
10388                 }
10389                 const nativeResponseValue = wasm.TS_ClosureReason_processing_error(err);
10390                 return nativeResponseValue;
10391         }
10392         // struct LDKClosureReason ClosureReason_disconnected_peer(void);
10393         export function ClosureReason_disconnected_peer(): number {
10394                 if(!isWasmInitialized) {
10395                         throw new Error("initializeWasm() must be awaited first!");
10396                 }
10397                 const nativeResponseValue = wasm.TS_ClosureReason_disconnected_peer();
10398                 return nativeResponseValue;
10399         }
10400         // struct LDKClosureReason ClosureReason_outdated_channel_manager(void);
10401         export function ClosureReason_outdated_channel_manager(): number {
10402                 if(!isWasmInitialized) {
10403                         throw new Error("initializeWasm() must be awaited first!");
10404                 }
10405                 const nativeResponseValue = wasm.TS_ClosureReason_outdated_channel_manager();
10406                 return nativeResponseValue;
10407         }
10408         // struct LDKCVec_u8Z ClosureReason_write(const struct LDKClosureReason *NONNULL_PTR obj);
10409         export function ClosureReason_write(obj: number): Uint8Array {
10410                 if(!isWasmInitialized) {
10411                         throw new Error("initializeWasm() must be awaited first!");
10412                 }
10413                 const nativeResponseValue = wasm.TS_ClosureReason_write(obj);
10414                 return decodeUint8Array(nativeResponseValue);
10415         }
10416         // struct LDKCResult_COption_ClosureReasonZDecodeErrorZ ClosureReason_read(struct LDKu8slice ser);
10417         export function ClosureReason_read(ser: Uint8Array): number {
10418                 if(!isWasmInitialized) {
10419                         throw new Error("initializeWasm() must be awaited first!");
10420                 }
10421                 const nativeResponseValue = wasm.TS_ClosureReason_read(encodeUint8Array(ser));
10422                 return nativeResponseValue;
10423         }
10424         // void Event_free(struct LDKEvent this_ptr);
10425         export function Event_free(this_ptr: number): void {
10426                 if(!isWasmInitialized) {
10427                         throw new Error("initializeWasm() must be awaited first!");
10428                 }
10429                 const nativeResponseValue = wasm.TS_Event_free(this_ptr);
10430                 // debug statements here
10431         }
10432         // uint64_t Event_clone_ptr(LDKEvent *NONNULL_PTR arg);
10433         export function Event_clone_ptr(arg: number): number {
10434                 if(!isWasmInitialized) {
10435                         throw new Error("initializeWasm() must be awaited first!");
10436                 }
10437                 const nativeResponseValue = wasm.TS_Event_clone_ptr(arg);
10438                 return nativeResponseValue;
10439         }
10440         // struct LDKEvent Event_clone(const struct LDKEvent *NONNULL_PTR orig);
10441         export function Event_clone(orig: number): number {
10442                 if(!isWasmInitialized) {
10443                         throw new Error("initializeWasm() must be awaited first!");
10444                 }
10445                 const nativeResponseValue = wasm.TS_Event_clone(orig);
10446                 return nativeResponseValue;
10447         }
10448         // struct LDKEvent Event_funding_generation_ready(struct LDKThirtyTwoBytes temporary_channel_id, uint64_t channel_value_satoshis, struct LDKCVec_u8Z output_script, uint64_t user_channel_id);
10449         export function Event_funding_generation_ready(temporary_channel_id: Uint8Array, channel_value_satoshis: number, output_script: Uint8Array, user_channel_id: number): number {
10450                 if(!isWasmInitialized) {
10451                         throw new Error("initializeWasm() must be awaited first!");
10452                 }
10453                 const nativeResponseValue = wasm.TS_Event_funding_generation_ready(encodeUint8Array(temporary_channel_id), channel_value_satoshis, encodeUint8Array(output_script), user_channel_id);
10454                 return nativeResponseValue;
10455         }
10456         // struct LDKEvent Event_payment_received(struct LDKThirtyTwoBytes payment_hash, uint64_t amt, struct LDKPaymentPurpose purpose);
10457         export function Event_payment_received(payment_hash: Uint8Array, amt: number, purpose: number): number {
10458                 if(!isWasmInitialized) {
10459                         throw new Error("initializeWasm() must be awaited first!");
10460                 }
10461                 const nativeResponseValue = wasm.TS_Event_payment_received(encodeUint8Array(payment_hash), amt, purpose);
10462                 return nativeResponseValue;
10463         }
10464         // struct LDKEvent Event_payment_sent(struct LDKThirtyTwoBytes payment_id, struct LDKThirtyTwoBytes payment_preimage, struct LDKThirtyTwoBytes payment_hash, struct LDKCOption_u64Z fee_paid_msat);
10465         export function Event_payment_sent(payment_id: Uint8Array, payment_preimage: Uint8Array, payment_hash: Uint8Array, fee_paid_msat: number): number {
10466                 if(!isWasmInitialized) {
10467                         throw new Error("initializeWasm() must be awaited first!");
10468                 }
10469                 const nativeResponseValue = wasm.TS_Event_payment_sent(encodeUint8Array(payment_id), encodeUint8Array(payment_preimage), encodeUint8Array(payment_hash), fee_paid_msat);
10470                 return nativeResponseValue;
10471         }
10472         // struct LDKEvent Event_payment_path_failed(struct LDKThirtyTwoBytes payment_id, struct LDKThirtyTwoBytes payment_hash, bool rejected_by_dest, struct LDKCOption_NetworkUpdateZ network_update, bool all_paths_failed, struct LDKCVec_RouteHopZ path, struct LDKCOption_u64Z short_channel_id, struct LDKRouteParameters retry);
10473         export function Event_payment_path_failed(payment_id: Uint8Array, payment_hash: Uint8Array, rejected_by_dest: boolean, network_update: number, all_paths_failed: boolean, path: number[], short_channel_id: number, retry: number): number {
10474                 if(!isWasmInitialized) {
10475                         throw new Error("initializeWasm() must be awaited first!");
10476                 }
10477                 const nativeResponseValue = wasm.TS_Event_payment_path_failed(encodeUint8Array(payment_id), encodeUint8Array(payment_hash), rejected_by_dest, network_update, all_paths_failed, path, short_channel_id, retry);
10478                 return nativeResponseValue;
10479         }
10480         // struct LDKEvent Event_payment_failed(struct LDKThirtyTwoBytes payment_id, struct LDKThirtyTwoBytes payment_hash);
10481         export function Event_payment_failed(payment_id: Uint8Array, payment_hash: Uint8Array): number {
10482                 if(!isWasmInitialized) {
10483                         throw new Error("initializeWasm() must be awaited first!");
10484                 }
10485                 const nativeResponseValue = wasm.TS_Event_payment_failed(encodeUint8Array(payment_id), encodeUint8Array(payment_hash));
10486                 return nativeResponseValue;
10487         }
10488         // struct LDKEvent Event_pending_htlcs_forwardable(uint64_t time_forwardable);
10489         export function Event_pending_htlcs_forwardable(time_forwardable: number): number {
10490                 if(!isWasmInitialized) {
10491                         throw new Error("initializeWasm() must be awaited first!");
10492                 }
10493                 const nativeResponseValue = wasm.TS_Event_pending_htlcs_forwardable(time_forwardable);
10494                 return nativeResponseValue;
10495         }
10496         // struct LDKEvent Event_spendable_outputs(struct LDKCVec_SpendableOutputDescriptorZ outputs);
10497         export function Event_spendable_outputs(outputs: number[]): number {
10498                 if(!isWasmInitialized) {
10499                         throw new Error("initializeWasm() must be awaited first!");
10500                 }
10501                 const nativeResponseValue = wasm.TS_Event_spendable_outputs(outputs);
10502                 return nativeResponseValue;
10503         }
10504         // struct LDKEvent Event_payment_forwarded(struct LDKCOption_u64Z fee_earned_msat, bool claim_from_onchain_tx);
10505         export function Event_payment_forwarded(fee_earned_msat: number, claim_from_onchain_tx: boolean): number {
10506                 if(!isWasmInitialized) {
10507                         throw new Error("initializeWasm() must be awaited first!");
10508                 }
10509                 const nativeResponseValue = wasm.TS_Event_payment_forwarded(fee_earned_msat, claim_from_onchain_tx);
10510                 return nativeResponseValue;
10511         }
10512         // struct LDKEvent Event_channel_closed(struct LDKThirtyTwoBytes channel_id, uint64_t user_channel_id, struct LDKClosureReason reason);
10513         export function Event_channel_closed(channel_id: Uint8Array, user_channel_id: number, reason: number): number {
10514                 if(!isWasmInitialized) {
10515                         throw new Error("initializeWasm() must be awaited first!");
10516                 }
10517                 const nativeResponseValue = wasm.TS_Event_channel_closed(encodeUint8Array(channel_id), user_channel_id, reason);
10518                 return nativeResponseValue;
10519         }
10520         // struct LDKEvent Event_discard_funding(struct LDKThirtyTwoBytes channel_id, struct LDKTransaction transaction);
10521         export function Event_discard_funding(channel_id: Uint8Array, transaction: Uint8Array): number {
10522                 if(!isWasmInitialized) {
10523                         throw new Error("initializeWasm() must be awaited first!");
10524                 }
10525                 const nativeResponseValue = wasm.TS_Event_discard_funding(encodeUint8Array(channel_id), encodeUint8Array(transaction));
10526                 return nativeResponseValue;
10527         }
10528         // struct LDKEvent Event_payment_path_successful(struct LDKThirtyTwoBytes payment_id, struct LDKThirtyTwoBytes payment_hash, struct LDKCVec_RouteHopZ path);
10529         export function Event_payment_path_successful(payment_id: Uint8Array, payment_hash: Uint8Array, path: number[]): number {
10530                 if(!isWasmInitialized) {
10531                         throw new Error("initializeWasm() must be awaited first!");
10532                 }
10533                 const nativeResponseValue = wasm.TS_Event_payment_path_successful(encodeUint8Array(payment_id), encodeUint8Array(payment_hash), path);
10534                 return nativeResponseValue;
10535         }
10536         // struct LDKCVec_u8Z Event_write(const struct LDKEvent *NONNULL_PTR obj);
10537         export function Event_write(obj: number): Uint8Array {
10538                 if(!isWasmInitialized) {
10539                         throw new Error("initializeWasm() must be awaited first!");
10540                 }
10541                 const nativeResponseValue = wasm.TS_Event_write(obj);
10542                 return decodeUint8Array(nativeResponseValue);
10543         }
10544         // struct LDKCResult_COption_EventZDecodeErrorZ Event_read(struct LDKu8slice ser);
10545         export function Event_read(ser: Uint8Array): number {
10546                 if(!isWasmInitialized) {
10547                         throw new Error("initializeWasm() must be awaited first!");
10548                 }
10549                 const nativeResponseValue = wasm.TS_Event_read(encodeUint8Array(ser));
10550                 return nativeResponseValue;
10551         }
10552         // void MessageSendEvent_free(struct LDKMessageSendEvent this_ptr);
10553         export function MessageSendEvent_free(this_ptr: number): void {
10554                 if(!isWasmInitialized) {
10555                         throw new Error("initializeWasm() must be awaited first!");
10556                 }
10557                 const nativeResponseValue = wasm.TS_MessageSendEvent_free(this_ptr);
10558                 // debug statements here
10559         }
10560         // uint64_t MessageSendEvent_clone_ptr(LDKMessageSendEvent *NONNULL_PTR arg);
10561         export function MessageSendEvent_clone_ptr(arg: number): number {
10562                 if(!isWasmInitialized) {
10563                         throw new Error("initializeWasm() must be awaited first!");
10564                 }
10565                 const nativeResponseValue = wasm.TS_MessageSendEvent_clone_ptr(arg);
10566                 return nativeResponseValue;
10567         }
10568         // struct LDKMessageSendEvent MessageSendEvent_clone(const struct LDKMessageSendEvent *NONNULL_PTR orig);
10569         export function MessageSendEvent_clone(orig: number): number {
10570                 if(!isWasmInitialized) {
10571                         throw new Error("initializeWasm() must be awaited first!");
10572                 }
10573                 const nativeResponseValue = wasm.TS_MessageSendEvent_clone(orig);
10574                 return nativeResponseValue;
10575         }
10576         // struct LDKMessageSendEvent MessageSendEvent_send_accept_channel(struct LDKPublicKey node_id, struct LDKAcceptChannel msg);
10577         export function MessageSendEvent_send_accept_channel(node_id: Uint8Array, msg: number): number {
10578                 if(!isWasmInitialized) {
10579                         throw new Error("initializeWasm() must be awaited first!");
10580                 }
10581                 const nativeResponseValue = wasm.TS_MessageSendEvent_send_accept_channel(encodeUint8Array(node_id), msg);
10582                 return nativeResponseValue;
10583         }
10584         // struct LDKMessageSendEvent MessageSendEvent_send_open_channel(struct LDKPublicKey node_id, struct LDKOpenChannel msg);
10585         export function MessageSendEvent_send_open_channel(node_id: Uint8Array, msg: number): number {
10586                 if(!isWasmInitialized) {
10587                         throw new Error("initializeWasm() must be awaited first!");
10588                 }
10589                 const nativeResponseValue = wasm.TS_MessageSendEvent_send_open_channel(encodeUint8Array(node_id), msg);
10590                 return nativeResponseValue;
10591         }
10592         // struct LDKMessageSendEvent MessageSendEvent_send_funding_created(struct LDKPublicKey node_id, struct LDKFundingCreated msg);
10593         export function MessageSendEvent_send_funding_created(node_id: Uint8Array, msg: number): number {
10594                 if(!isWasmInitialized) {
10595                         throw new Error("initializeWasm() must be awaited first!");
10596                 }
10597                 const nativeResponseValue = wasm.TS_MessageSendEvent_send_funding_created(encodeUint8Array(node_id), msg);
10598                 return nativeResponseValue;
10599         }
10600         // struct LDKMessageSendEvent MessageSendEvent_send_funding_signed(struct LDKPublicKey node_id, struct LDKFundingSigned msg);
10601         export function MessageSendEvent_send_funding_signed(node_id: Uint8Array, msg: number): number {
10602                 if(!isWasmInitialized) {
10603                         throw new Error("initializeWasm() must be awaited first!");
10604                 }
10605                 const nativeResponseValue = wasm.TS_MessageSendEvent_send_funding_signed(encodeUint8Array(node_id), msg);
10606                 return nativeResponseValue;
10607         }
10608         // struct LDKMessageSendEvent MessageSendEvent_send_funding_locked(struct LDKPublicKey node_id, struct LDKFundingLocked msg);
10609         export function MessageSendEvent_send_funding_locked(node_id: Uint8Array, msg: number): number {
10610                 if(!isWasmInitialized) {
10611                         throw new Error("initializeWasm() must be awaited first!");
10612                 }
10613                 const nativeResponseValue = wasm.TS_MessageSendEvent_send_funding_locked(encodeUint8Array(node_id), msg);
10614                 return nativeResponseValue;
10615         }
10616         // struct LDKMessageSendEvent MessageSendEvent_send_announcement_signatures(struct LDKPublicKey node_id, struct LDKAnnouncementSignatures msg);
10617         export function MessageSendEvent_send_announcement_signatures(node_id: Uint8Array, msg: number): number {
10618                 if(!isWasmInitialized) {
10619                         throw new Error("initializeWasm() must be awaited first!");
10620                 }
10621                 const nativeResponseValue = wasm.TS_MessageSendEvent_send_announcement_signatures(encodeUint8Array(node_id), msg);
10622                 return nativeResponseValue;
10623         }
10624         // struct LDKMessageSendEvent MessageSendEvent_update_htlcs(struct LDKPublicKey node_id, struct LDKCommitmentUpdate updates);
10625         export function MessageSendEvent_update_htlcs(node_id: Uint8Array, updates: number): number {
10626                 if(!isWasmInitialized) {
10627                         throw new Error("initializeWasm() must be awaited first!");
10628                 }
10629                 const nativeResponseValue = wasm.TS_MessageSendEvent_update_htlcs(encodeUint8Array(node_id), updates);
10630                 return nativeResponseValue;
10631         }
10632         // struct LDKMessageSendEvent MessageSendEvent_send_revoke_and_ack(struct LDKPublicKey node_id, struct LDKRevokeAndACK msg);
10633         export function MessageSendEvent_send_revoke_and_ack(node_id: Uint8Array, msg: number): number {
10634                 if(!isWasmInitialized) {
10635                         throw new Error("initializeWasm() must be awaited first!");
10636                 }
10637                 const nativeResponseValue = wasm.TS_MessageSendEvent_send_revoke_and_ack(encodeUint8Array(node_id), msg);
10638                 return nativeResponseValue;
10639         }
10640         // struct LDKMessageSendEvent MessageSendEvent_send_closing_signed(struct LDKPublicKey node_id, struct LDKClosingSigned msg);
10641         export function MessageSendEvent_send_closing_signed(node_id: Uint8Array, msg: number): number {
10642                 if(!isWasmInitialized) {
10643                         throw new Error("initializeWasm() must be awaited first!");
10644                 }
10645                 const nativeResponseValue = wasm.TS_MessageSendEvent_send_closing_signed(encodeUint8Array(node_id), msg);
10646                 return nativeResponseValue;
10647         }
10648         // struct LDKMessageSendEvent MessageSendEvent_send_shutdown(struct LDKPublicKey node_id, struct LDKShutdown msg);
10649         export function MessageSendEvent_send_shutdown(node_id: Uint8Array, msg: number): number {
10650                 if(!isWasmInitialized) {
10651                         throw new Error("initializeWasm() must be awaited first!");
10652                 }
10653                 const nativeResponseValue = wasm.TS_MessageSendEvent_send_shutdown(encodeUint8Array(node_id), msg);
10654                 return nativeResponseValue;
10655         }
10656         // struct LDKMessageSendEvent MessageSendEvent_send_channel_reestablish(struct LDKPublicKey node_id, struct LDKChannelReestablish msg);
10657         export function MessageSendEvent_send_channel_reestablish(node_id: Uint8Array, msg: number): number {
10658                 if(!isWasmInitialized) {
10659                         throw new Error("initializeWasm() must be awaited first!");
10660                 }
10661                 const nativeResponseValue = wasm.TS_MessageSendEvent_send_channel_reestablish(encodeUint8Array(node_id), msg);
10662                 return nativeResponseValue;
10663         }
10664         // struct LDKMessageSendEvent MessageSendEvent_broadcast_channel_announcement(struct LDKChannelAnnouncement msg, struct LDKChannelUpdate update_msg);
10665         export function MessageSendEvent_broadcast_channel_announcement(msg: number, update_msg: number): number {
10666                 if(!isWasmInitialized) {
10667                         throw new Error("initializeWasm() must be awaited first!");
10668                 }
10669                 const nativeResponseValue = wasm.TS_MessageSendEvent_broadcast_channel_announcement(msg, update_msg);
10670                 return nativeResponseValue;
10671         }
10672         // struct LDKMessageSendEvent MessageSendEvent_broadcast_node_announcement(struct LDKNodeAnnouncement msg);
10673         export function MessageSendEvent_broadcast_node_announcement(msg: number): number {
10674                 if(!isWasmInitialized) {
10675                         throw new Error("initializeWasm() must be awaited first!");
10676                 }
10677                 const nativeResponseValue = wasm.TS_MessageSendEvent_broadcast_node_announcement(msg);
10678                 return nativeResponseValue;
10679         }
10680         // struct LDKMessageSendEvent MessageSendEvent_broadcast_channel_update(struct LDKChannelUpdate msg);
10681         export function MessageSendEvent_broadcast_channel_update(msg: number): number {
10682                 if(!isWasmInitialized) {
10683                         throw new Error("initializeWasm() must be awaited first!");
10684                 }
10685                 const nativeResponseValue = wasm.TS_MessageSendEvent_broadcast_channel_update(msg);
10686                 return nativeResponseValue;
10687         }
10688         // struct LDKMessageSendEvent MessageSendEvent_send_channel_update(struct LDKPublicKey node_id, struct LDKChannelUpdate msg);
10689         export function MessageSendEvent_send_channel_update(node_id: Uint8Array, msg: number): number {
10690                 if(!isWasmInitialized) {
10691                         throw new Error("initializeWasm() must be awaited first!");
10692                 }
10693                 const nativeResponseValue = wasm.TS_MessageSendEvent_send_channel_update(encodeUint8Array(node_id), msg);
10694                 return nativeResponseValue;
10695         }
10696         // struct LDKMessageSendEvent MessageSendEvent_handle_error(struct LDKPublicKey node_id, struct LDKErrorAction action);
10697         export function MessageSendEvent_handle_error(node_id: Uint8Array, action: number): number {
10698                 if(!isWasmInitialized) {
10699                         throw new Error("initializeWasm() must be awaited first!");
10700                 }
10701                 const nativeResponseValue = wasm.TS_MessageSendEvent_handle_error(encodeUint8Array(node_id), action);
10702                 return nativeResponseValue;
10703         }
10704         // struct LDKMessageSendEvent MessageSendEvent_send_channel_range_query(struct LDKPublicKey node_id, struct LDKQueryChannelRange msg);
10705         export function MessageSendEvent_send_channel_range_query(node_id: Uint8Array, msg: number): number {
10706                 if(!isWasmInitialized) {
10707                         throw new Error("initializeWasm() must be awaited first!");
10708                 }
10709                 const nativeResponseValue = wasm.TS_MessageSendEvent_send_channel_range_query(encodeUint8Array(node_id), msg);
10710                 return nativeResponseValue;
10711         }
10712         // struct LDKMessageSendEvent MessageSendEvent_send_short_ids_query(struct LDKPublicKey node_id, struct LDKQueryShortChannelIds msg);
10713         export function MessageSendEvent_send_short_ids_query(node_id: Uint8Array, msg: number): number {
10714                 if(!isWasmInitialized) {
10715                         throw new Error("initializeWasm() must be awaited first!");
10716                 }
10717                 const nativeResponseValue = wasm.TS_MessageSendEvent_send_short_ids_query(encodeUint8Array(node_id), msg);
10718                 return nativeResponseValue;
10719         }
10720         // struct LDKMessageSendEvent MessageSendEvent_send_reply_channel_range(struct LDKPublicKey node_id, struct LDKReplyChannelRange msg);
10721         export function MessageSendEvent_send_reply_channel_range(node_id: Uint8Array, msg: number): number {
10722                 if(!isWasmInitialized) {
10723                         throw new Error("initializeWasm() must be awaited first!");
10724                 }
10725                 const nativeResponseValue = wasm.TS_MessageSendEvent_send_reply_channel_range(encodeUint8Array(node_id), msg);
10726                 return nativeResponseValue;
10727         }
10728         // void MessageSendEventsProvider_free(struct LDKMessageSendEventsProvider this_ptr);
10729         export function MessageSendEventsProvider_free(this_ptr: number): void {
10730                 if(!isWasmInitialized) {
10731                         throw new Error("initializeWasm() must be awaited first!");
10732                 }
10733                 const nativeResponseValue = wasm.TS_MessageSendEventsProvider_free(this_ptr);
10734                 // debug statements here
10735         }
10736         // void EventsProvider_free(struct LDKEventsProvider this_ptr);
10737         export function EventsProvider_free(this_ptr: number): void {
10738                 if(!isWasmInitialized) {
10739                         throw new Error("initializeWasm() must be awaited first!");
10740                 }
10741                 const nativeResponseValue = wasm.TS_EventsProvider_free(this_ptr);
10742                 // debug statements here
10743         }
10744         // void EventHandler_free(struct LDKEventHandler this_ptr);
10745         export function EventHandler_free(this_ptr: number): void {
10746                 if(!isWasmInitialized) {
10747                         throw new Error("initializeWasm() must be awaited first!");
10748                 }
10749                 const nativeResponseValue = wasm.TS_EventHandler_free(this_ptr);
10750                 // debug statements here
10751         }
10752         // void APIError_free(struct LDKAPIError this_ptr);
10753         export function APIError_free(this_ptr: number): void {
10754                 if(!isWasmInitialized) {
10755                         throw new Error("initializeWasm() must be awaited first!");
10756                 }
10757                 const nativeResponseValue = wasm.TS_APIError_free(this_ptr);
10758                 // debug statements here
10759         }
10760         // uint64_t APIError_clone_ptr(LDKAPIError *NONNULL_PTR arg);
10761         export function APIError_clone_ptr(arg: number): number {
10762                 if(!isWasmInitialized) {
10763                         throw new Error("initializeWasm() must be awaited first!");
10764                 }
10765                 const nativeResponseValue = wasm.TS_APIError_clone_ptr(arg);
10766                 return nativeResponseValue;
10767         }
10768         // struct LDKAPIError APIError_clone(const struct LDKAPIError *NONNULL_PTR orig);
10769         export function APIError_clone(orig: number): number {
10770                 if(!isWasmInitialized) {
10771                         throw new Error("initializeWasm() must be awaited first!");
10772                 }
10773                 const nativeResponseValue = wasm.TS_APIError_clone(orig);
10774                 return nativeResponseValue;
10775         }
10776         // struct LDKAPIError APIError_apimisuse_error(struct LDKStr err);
10777         export function APIError_apimisuse_error(err: String): number {
10778                 if(!isWasmInitialized) {
10779                         throw new Error("initializeWasm() must be awaited first!");
10780                 }
10781                 const nativeResponseValue = wasm.TS_APIError_apimisuse_error(err);
10782                 return nativeResponseValue;
10783         }
10784         // struct LDKAPIError APIError_fee_rate_too_high(struct LDKStr err, uint32_t feerate);
10785         export function APIError_fee_rate_too_high(err: String, feerate: number): number {
10786                 if(!isWasmInitialized) {
10787                         throw new Error("initializeWasm() must be awaited first!");
10788                 }
10789                 const nativeResponseValue = wasm.TS_APIError_fee_rate_too_high(err, feerate);
10790                 return nativeResponseValue;
10791         }
10792         // struct LDKAPIError APIError_route_error(struct LDKStr err);
10793         export function APIError_route_error(err: String): number {
10794                 if(!isWasmInitialized) {
10795                         throw new Error("initializeWasm() must be awaited first!");
10796                 }
10797                 const nativeResponseValue = wasm.TS_APIError_route_error(err);
10798                 return nativeResponseValue;
10799         }
10800         // struct LDKAPIError APIError_channel_unavailable(struct LDKStr err);
10801         export function APIError_channel_unavailable(err: String): number {
10802                 if(!isWasmInitialized) {
10803                         throw new Error("initializeWasm() must be awaited first!");
10804                 }
10805                 const nativeResponseValue = wasm.TS_APIError_channel_unavailable(err);
10806                 return nativeResponseValue;
10807         }
10808         // struct LDKAPIError APIError_monitor_update_failed(void);
10809         export function APIError_monitor_update_failed(): number {
10810                 if(!isWasmInitialized) {
10811                         throw new Error("initializeWasm() must be awaited first!");
10812                 }
10813                 const nativeResponseValue = wasm.TS_APIError_monitor_update_failed();
10814                 return nativeResponseValue;
10815         }
10816         // struct LDKAPIError APIError_incompatible_shutdown_script(struct LDKShutdownScript script);
10817         export function APIError_incompatible_shutdown_script(script: number): number {
10818                 if(!isWasmInitialized) {
10819                         throw new Error("initializeWasm() must be awaited first!");
10820                 }
10821                 const nativeResponseValue = wasm.TS_APIError_incompatible_shutdown_script(script);
10822                 return nativeResponseValue;
10823         }
10824         // struct LDKCResult_StringErrorZ sign(struct LDKu8slice msg, const uint8_t (*sk)[32]);
10825         export function sign(msg: Uint8Array, sk: Uint8Array): number {
10826                 if(!isWasmInitialized) {
10827                         throw new Error("initializeWasm() must be awaited first!");
10828                 }
10829                 const nativeResponseValue = wasm.TS_sign(encodeUint8Array(msg), encodeUint8Array(sk));
10830                 return nativeResponseValue;
10831         }
10832         // struct LDKCResult_PublicKeyErrorZ recover_pk(struct LDKu8slice msg, struct LDKStr sig);
10833         export function recover_pk(msg: Uint8Array, sig: String): number {
10834                 if(!isWasmInitialized) {
10835                         throw new Error("initializeWasm() must be awaited first!");
10836                 }
10837                 const nativeResponseValue = wasm.TS_recover_pk(encodeUint8Array(msg), sig);
10838                 return nativeResponseValue;
10839         }
10840         // bool verify(struct LDKu8slice msg, struct LDKStr sig, struct LDKPublicKey pk);
10841         export function verify(msg: Uint8Array, sig: String, pk: Uint8Array): boolean {
10842                 if(!isWasmInitialized) {
10843                         throw new Error("initializeWasm() must be awaited first!");
10844                 }
10845                 const nativeResponseValue = wasm.TS_verify(encodeUint8Array(msg), sig, encodeUint8Array(pk));
10846                 return nativeResponseValue;
10847         }
10848         // enum LDKLevel Level_clone(const enum LDKLevel *NONNULL_PTR orig);
10849         export function Level_clone(orig: number): Level {
10850                 if(!isWasmInitialized) {
10851                         throw new Error("initializeWasm() must be awaited first!");
10852                 }
10853                 const nativeResponseValue = wasm.TS_Level_clone(orig);
10854                 return nativeResponseValue;
10855         }
10856         // enum LDKLevel Level_gossip(void);
10857         export function Level_gossip(): Level {
10858                 if(!isWasmInitialized) {
10859                         throw new Error("initializeWasm() must be awaited first!");
10860                 }
10861                 const nativeResponseValue = wasm.TS_Level_gossip();
10862                 return nativeResponseValue;
10863         }
10864         // enum LDKLevel Level_trace(void);
10865         export function Level_trace(): Level {
10866                 if(!isWasmInitialized) {
10867                         throw new Error("initializeWasm() must be awaited first!");
10868                 }
10869                 const nativeResponseValue = wasm.TS_Level_trace();
10870                 return nativeResponseValue;
10871         }
10872         // enum LDKLevel Level_debug(void);
10873         export function Level_debug(): Level {
10874                 if(!isWasmInitialized) {
10875                         throw new Error("initializeWasm() must be awaited first!");
10876                 }
10877                 const nativeResponseValue = wasm.TS_Level_debug();
10878                 return nativeResponseValue;
10879         }
10880         // enum LDKLevel Level_info(void);
10881         export function Level_info(): Level {
10882                 if(!isWasmInitialized) {
10883                         throw new Error("initializeWasm() must be awaited first!");
10884                 }
10885                 const nativeResponseValue = wasm.TS_Level_info();
10886                 return nativeResponseValue;
10887         }
10888         // enum LDKLevel Level_warn(void);
10889         export function Level_warn(): Level {
10890                 if(!isWasmInitialized) {
10891                         throw new Error("initializeWasm() must be awaited first!");
10892                 }
10893                 const nativeResponseValue = wasm.TS_Level_warn();
10894                 return nativeResponseValue;
10895         }
10896         // enum LDKLevel Level_error(void);
10897         export function Level_error(): Level {
10898                 if(!isWasmInitialized) {
10899                         throw new Error("initializeWasm() must be awaited first!");
10900                 }
10901                 const nativeResponseValue = wasm.TS_Level_error();
10902                 return nativeResponseValue;
10903         }
10904         // bool Level_eq(const enum LDKLevel *NONNULL_PTR a, const enum LDKLevel *NONNULL_PTR b);
10905         export function Level_eq(a: number, b: number): boolean {
10906                 if(!isWasmInitialized) {
10907                         throw new Error("initializeWasm() must be awaited first!");
10908                 }
10909                 const nativeResponseValue = wasm.TS_Level_eq(a, b);
10910                 return nativeResponseValue;
10911         }
10912         // uint64_t Level_hash(const enum LDKLevel *NONNULL_PTR o);
10913         export function Level_hash(o: number): number {
10914                 if(!isWasmInitialized) {
10915                         throw new Error("initializeWasm() must be awaited first!");
10916                 }
10917                 const nativeResponseValue = wasm.TS_Level_hash(o);
10918                 return nativeResponseValue;
10919         }
10920         // MUST_USE_RES enum LDKLevel Level_max(void);
10921         export function Level_max(): Level {
10922                 if(!isWasmInitialized) {
10923                         throw new Error("initializeWasm() must be awaited first!");
10924                 }
10925                 const nativeResponseValue = wasm.TS_Level_max();
10926                 return nativeResponseValue;
10927         }
10928         // void Record_free(struct LDKRecord this_obj);
10929         export function Record_free(this_obj: number): void {
10930                 if(!isWasmInitialized) {
10931                         throw new Error("initializeWasm() must be awaited first!");
10932                 }
10933                 const nativeResponseValue = wasm.TS_Record_free(this_obj);
10934                 // debug statements here
10935         }
10936         // enum LDKLevel Record_get_level(const struct LDKRecord *NONNULL_PTR this_ptr);
10937         export function Record_get_level(this_ptr: number): Level {
10938                 if(!isWasmInitialized) {
10939                         throw new Error("initializeWasm() must be awaited first!");
10940                 }
10941                 const nativeResponseValue = wasm.TS_Record_get_level(this_ptr);
10942                 return nativeResponseValue;
10943         }
10944         // void Record_set_level(struct LDKRecord *NONNULL_PTR this_ptr, enum LDKLevel val);
10945         export function Record_set_level(this_ptr: number, val: Level): void {
10946                 if(!isWasmInitialized) {
10947                         throw new Error("initializeWasm() must be awaited first!");
10948                 }
10949                 const nativeResponseValue = wasm.TS_Record_set_level(this_ptr, val);
10950                 // debug statements here
10951         }
10952         // struct LDKStr Record_get_args(const struct LDKRecord *NONNULL_PTR this_ptr);
10953         export function Record_get_args(this_ptr: number): String {
10954                 if(!isWasmInitialized) {
10955                         throw new Error("initializeWasm() must be awaited first!");
10956                 }
10957                 const nativeResponseValue = wasm.TS_Record_get_args(this_ptr);
10958                 return nativeResponseValue;
10959         }
10960         // void Record_set_args(struct LDKRecord *NONNULL_PTR this_ptr, struct LDKStr val);
10961         export function Record_set_args(this_ptr: number, val: String): void {
10962                 if(!isWasmInitialized) {
10963                         throw new Error("initializeWasm() must be awaited first!");
10964                 }
10965                 const nativeResponseValue = wasm.TS_Record_set_args(this_ptr, val);
10966                 // debug statements here
10967         }
10968         // struct LDKStr Record_get_module_path(const struct LDKRecord *NONNULL_PTR this_ptr);
10969         export function Record_get_module_path(this_ptr: number): String {
10970                 if(!isWasmInitialized) {
10971                         throw new Error("initializeWasm() must be awaited first!");
10972                 }
10973                 const nativeResponseValue = wasm.TS_Record_get_module_path(this_ptr);
10974                 return nativeResponseValue;
10975         }
10976         // void Record_set_module_path(struct LDKRecord *NONNULL_PTR this_ptr, struct LDKStr val);
10977         export function Record_set_module_path(this_ptr: number, val: String): void {
10978                 if(!isWasmInitialized) {
10979                         throw new Error("initializeWasm() must be awaited first!");
10980                 }
10981                 const nativeResponseValue = wasm.TS_Record_set_module_path(this_ptr, val);
10982                 // debug statements here
10983         }
10984         // struct LDKStr Record_get_file(const struct LDKRecord *NONNULL_PTR this_ptr);
10985         export function Record_get_file(this_ptr: number): String {
10986                 if(!isWasmInitialized) {
10987                         throw new Error("initializeWasm() must be awaited first!");
10988                 }
10989                 const nativeResponseValue = wasm.TS_Record_get_file(this_ptr);
10990                 return nativeResponseValue;
10991         }
10992         // void Record_set_file(struct LDKRecord *NONNULL_PTR this_ptr, struct LDKStr val);
10993         export function Record_set_file(this_ptr: number, val: String): void {
10994                 if(!isWasmInitialized) {
10995                         throw new Error("initializeWasm() must be awaited first!");
10996                 }
10997                 const nativeResponseValue = wasm.TS_Record_set_file(this_ptr, val);
10998                 // debug statements here
10999         }
11000         // uint32_t Record_get_line(const struct LDKRecord *NONNULL_PTR this_ptr);
11001         export function Record_get_line(this_ptr: number): number {
11002                 if(!isWasmInitialized) {
11003                         throw new Error("initializeWasm() must be awaited first!");
11004                 }
11005                 const nativeResponseValue = wasm.TS_Record_get_line(this_ptr);
11006                 return nativeResponseValue;
11007         }
11008         // void Record_set_line(struct LDKRecord *NONNULL_PTR this_ptr, uint32_t val);
11009         export function Record_set_line(this_ptr: number, val: number): void {
11010                 if(!isWasmInitialized) {
11011                         throw new Error("initializeWasm() must be awaited first!");
11012                 }
11013                 const nativeResponseValue = wasm.TS_Record_set_line(this_ptr, val);
11014                 // debug statements here
11015         }
11016         // uint64_t Record_clone_ptr(LDKRecord *NONNULL_PTR arg);
11017         export function Record_clone_ptr(arg: number): number {
11018                 if(!isWasmInitialized) {
11019                         throw new Error("initializeWasm() must be awaited first!");
11020                 }
11021                 const nativeResponseValue = wasm.TS_Record_clone_ptr(arg);
11022                 return nativeResponseValue;
11023         }
11024         // struct LDKRecord Record_clone(const struct LDKRecord *NONNULL_PTR orig);
11025         export function Record_clone(orig: number): number {
11026                 if(!isWasmInitialized) {
11027                         throw new Error("initializeWasm() must be awaited first!");
11028                 }
11029                 const nativeResponseValue = wasm.TS_Record_clone(orig);
11030                 return nativeResponseValue;
11031         }
11032         // void Logger_free(struct LDKLogger this_ptr);
11033         export function Logger_free(this_ptr: number): void {
11034                 if(!isWasmInitialized) {
11035                         throw new Error("initializeWasm() must be awaited first!");
11036                 }
11037                 const nativeResponseValue = wasm.TS_Logger_free(this_ptr);
11038                 // debug statements here
11039         }
11040         // void ChannelHandshakeConfig_free(struct LDKChannelHandshakeConfig this_obj);
11041         export function ChannelHandshakeConfig_free(this_obj: number): void {
11042                 if(!isWasmInitialized) {
11043                         throw new Error("initializeWasm() must be awaited first!");
11044                 }
11045                 const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_free(this_obj);
11046                 // debug statements here
11047         }
11048         // uint32_t ChannelHandshakeConfig_get_minimum_depth(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
11049         export function ChannelHandshakeConfig_get_minimum_depth(this_ptr: number): number {
11050                 if(!isWasmInitialized) {
11051                         throw new Error("initializeWasm() must be awaited first!");
11052                 }
11053                 const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_get_minimum_depth(this_ptr);
11054                 return nativeResponseValue;
11055         }
11056         // void ChannelHandshakeConfig_set_minimum_depth(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint32_t val);
11057         export function ChannelHandshakeConfig_set_minimum_depth(this_ptr: number, val: number): void {
11058                 if(!isWasmInitialized) {
11059                         throw new Error("initializeWasm() must be awaited first!");
11060                 }
11061                 const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_set_minimum_depth(this_ptr, val);
11062                 // debug statements here
11063         }
11064         // uint16_t ChannelHandshakeConfig_get_our_to_self_delay(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
11065         export function ChannelHandshakeConfig_get_our_to_self_delay(this_ptr: number): number {
11066                 if(!isWasmInitialized) {
11067                         throw new Error("initializeWasm() must be awaited first!");
11068                 }
11069                 const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_get_our_to_self_delay(this_ptr);
11070                 return nativeResponseValue;
11071         }
11072         // void ChannelHandshakeConfig_set_our_to_self_delay(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint16_t val);
11073         export function ChannelHandshakeConfig_set_our_to_self_delay(this_ptr: number, val: number): void {
11074                 if(!isWasmInitialized) {
11075                         throw new Error("initializeWasm() must be awaited first!");
11076                 }
11077                 const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_set_our_to_self_delay(this_ptr, val);
11078                 // debug statements here
11079         }
11080         // uint64_t ChannelHandshakeConfig_get_our_htlc_minimum_msat(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
11081         export function ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr: number): number {
11082                 if(!isWasmInitialized) {
11083                         throw new Error("initializeWasm() must be awaited first!");
11084                 }
11085                 const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr);
11086                 return nativeResponseValue;
11087         }
11088         // void ChannelHandshakeConfig_set_our_htlc_minimum_msat(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint64_t val);
11089         export function ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr: number, val: number): void {
11090                 if(!isWasmInitialized) {
11091                         throw new Error("initializeWasm() must be awaited first!");
11092                 }
11093                 const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr, val);
11094                 // debug statements here
11095         }
11096         // 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);
11097         export function ChannelHandshakeConfig_new(minimum_depth_arg: number, our_to_self_delay_arg: number, our_htlc_minimum_msat_arg: number): number {
11098                 if(!isWasmInitialized) {
11099                         throw new Error("initializeWasm() must be awaited first!");
11100                 }
11101                 const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg, our_htlc_minimum_msat_arg);
11102                 return nativeResponseValue;
11103         }
11104         // uint64_t ChannelHandshakeConfig_clone_ptr(LDKChannelHandshakeConfig *NONNULL_PTR arg);
11105         export function ChannelHandshakeConfig_clone_ptr(arg: number): number {
11106                 if(!isWasmInitialized) {
11107                         throw new Error("initializeWasm() must be awaited first!");
11108                 }
11109                 const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_clone_ptr(arg);
11110                 return nativeResponseValue;
11111         }
11112         // struct LDKChannelHandshakeConfig ChannelHandshakeConfig_clone(const struct LDKChannelHandshakeConfig *NONNULL_PTR orig);
11113         export function ChannelHandshakeConfig_clone(orig: number): number {
11114                 if(!isWasmInitialized) {
11115                         throw new Error("initializeWasm() must be awaited first!");
11116                 }
11117                 const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_clone(orig);
11118                 return nativeResponseValue;
11119         }
11120         // MUST_USE_RES struct LDKChannelHandshakeConfig ChannelHandshakeConfig_default(void);
11121         export function ChannelHandshakeConfig_default(): number {
11122                 if(!isWasmInitialized) {
11123                         throw new Error("initializeWasm() must be awaited first!");
11124                 }
11125                 const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_default();
11126                 return nativeResponseValue;
11127         }
11128         // void ChannelHandshakeLimits_free(struct LDKChannelHandshakeLimits this_obj);
11129         export function ChannelHandshakeLimits_free(this_obj: number): void {
11130                 if(!isWasmInitialized) {
11131                         throw new Error("initializeWasm() must be awaited first!");
11132                 }
11133                 const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_free(this_obj);
11134                 // debug statements here
11135         }
11136         // uint64_t ChannelHandshakeLimits_get_min_funding_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
11137         export function ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr: number): number {
11138                 if(!isWasmInitialized) {
11139                         throw new Error("initializeWasm() must be awaited first!");
11140                 }
11141                 const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr);
11142                 return nativeResponseValue;
11143         }
11144         // void ChannelHandshakeLimits_set_min_funding_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
11145         export function ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr: number, val: number): void {
11146                 if(!isWasmInitialized) {
11147                         throw new Error("initializeWasm() must be awaited first!");
11148                 }
11149                 const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr, val);
11150                 // debug statements here
11151         }
11152         // uint64_t ChannelHandshakeLimits_get_max_htlc_minimum_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
11153         export function ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr: number): number {
11154                 if(!isWasmInitialized) {
11155                         throw new Error("initializeWasm() must be awaited first!");
11156                 }
11157                 const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr);
11158                 return nativeResponseValue;
11159         }
11160         // void ChannelHandshakeLimits_set_max_htlc_minimum_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
11161         export function ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr: number, val: number): void {
11162                 if(!isWasmInitialized) {
11163                         throw new Error("initializeWasm() must be awaited first!");
11164                 }
11165                 const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr, val);
11166                 // debug statements here
11167         }
11168         // uint64_t ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
11169         export function ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr: number): number {
11170                 if(!isWasmInitialized) {
11171                         throw new Error("initializeWasm() must be awaited first!");
11172                 }
11173                 const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr);
11174                 return nativeResponseValue;
11175         }
11176         // void ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
11177         export function ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
11178                 if(!isWasmInitialized) {
11179                         throw new Error("initializeWasm() must be awaited first!");
11180                 }
11181                 const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr, val);
11182                 // debug statements here
11183         }
11184         // uint64_t ChannelHandshakeLimits_get_max_channel_reserve_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
11185         export function ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr: number): number {
11186                 if(!isWasmInitialized) {
11187                         throw new Error("initializeWasm() must be awaited first!");
11188                 }
11189                 const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr);
11190                 return nativeResponseValue;
11191         }
11192         // void ChannelHandshakeLimits_set_max_channel_reserve_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
11193         export function ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr: number, val: number): void {
11194                 if(!isWasmInitialized) {
11195                         throw new Error("initializeWasm() must be awaited first!");
11196                 }
11197                 const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr, val);
11198                 // debug statements here
11199         }
11200         // uint16_t ChannelHandshakeLimits_get_min_max_accepted_htlcs(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
11201         export function ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr: number): number {
11202                 if(!isWasmInitialized) {
11203                         throw new Error("initializeWasm() must be awaited first!");
11204                 }
11205                 const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr);
11206                 return nativeResponseValue;
11207         }
11208         // void ChannelHandshakeLimits_set_min_max_accepted_htlcs(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
11209         export function ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr: number, val: number): void {
11210                 if(!isWasmInitialized) {
11211                         throw new Error("initializeWasm() must be awaited first!");
11212                 }
11213                 const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr, val);
11214                 // debug statements here
11215         }
11216         // uint32_t ChannelHandshakeLimits_get_max_minimum_depth(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
11217         export function ChannelHandshakeLimits_get_max_minimum_depth(this_ptr: number): number {
11218                 if(!isWasmInitialized) {
11219                         throw new Error("initializeWasm() must be awaited first!");
11220                 }
11221                 const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_get_max_minimum_depth(this_ptr);
11222                 return nativeResponseValue;
11223         }
11224         // void ChannelHandshakeLimits_set_max_minimum_depth(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint32_t val);
11225         export function ChannelHandshakeLimits_set_max_minimum_depth(this_ptr: number, val: number): void {
11226                 if(!isWasmInitialized) {
11227                         throw new Error("initializeWasm() must be awaited first!");
11228                 }
11229                 const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_set_max_minimum_depth(this_ptr, val);
11230                 // debug statements here
11231         }
11232         // bool ChannelHandshakeLimits_get_force_announced_channel_preference(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
11233         export function ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr: number): boolean {
11234                 if(!isWasmInitialized) {
11235                         throw new Error("initializeWasm() must be awaited first!");
11236                 }
11237                 const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr);
11238                 return nativeResponseValue;
11239         }
11240         // void ChannelHandshakeLimits_set_force_announced_channel_preference(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, bool val);
11241         export function ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr: number, val: boolean): void {
11242                 if(!isWasmInitialized) {
11243                         throw new Error("initializeWasm() must be awaited first!");
11244                 }
11245                 const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr, val);
11246                 // debug statements here
11247         }
11248         // uint16_t ChannelHandshakeLimits_get_their_to_self_delay(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
11249         export function ChannelHandshakeLimits_get_their_to_self_delay(this_ptr: number): number {
11250                 if(!isWasmInitialized) {
11251                         throw new Error("initializeWasm() must be awaited first!");
11252                 }
11253                 const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_get_their_to_self_delay(this_ptr);
11254                 return nativeResponseValue;
11255         }
11256         // void ChannelHandshakeLimits_set_their_to_self_delay(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
11257         export function ChannelHandshakeLimits_set_their_to_self_delay(this_ptr: number, val: number): void {
11258                 if(!isWasmInitialized) {
11259                         throw new Error("initializeWasm() must be awaited first!");
11260                 }
11261                 const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_set_their_to_self_delay(this_ptr, val);
11262                 // debug statements here
11263         }
11264         // MUST_USE_RES struct LDKChannelHandshakeLimits ChannelHandshakeLimits_new(uint64_t min_funding_satoshis_arg, uint64_t max_htlc_minimum_msat_arg, uint64_t min_max_htlc_value_in_flight_msat_arg, uint64_t max_channel_reserve_satoshis_arg, uint16_t min_max_accepted_htlcs_arg, uint32_t max_minimum_depth_arg, bool force_announced_channel_preference_arg, uint16_t their_to_self_delay_arg);
11265         export function ChannelHandshakeLimits_new(min_funding_satoshis_arg: number, max_htlc_minimum_msat_arg: number, min_max_htlc_value_in_flight_msat_arg: number, max_channel_reserve_satoshis_arg: number, min_max_accepted_htlcs_arg: number, max_minimum_depth_arg: number, force_announced_channel_preference_arg: boolean, their_to_self_delay_arg: number): number {
11266                 if(!isWasmInitialized) {
11267                         throw new Error("initializeWasm() must be awaited first!");
11268                 }
11269                 const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_new(min_funding_satoshis_arg, max_htlc_minimum_msat_arg, min_max_htlc_value_in_flight_msat_arg, max_channel_reserve_satoshis_arg, min_max_accepted_htlcs_arg, max_minimum_depth_arg, force_announced_channel_preference_arg, their_to_self_delay_arg);
11270                 return nativeResponseValue;
11271         }
11272         // uint64_t ChannelHandshakeLimits_clone_ptr(LDKChannelHandshakeLimits *NONNULL_PTR arg);
11273         export function ChannelHandshakeLimits_clone_ptr(arg: number): number {
11274                 if(!isWasmInitialized) {
11275                         throw new Error("initializeWasm() must be awaited first!");
11276                 }
11277                 const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_clone_ptr(arg);
11278                 return nativeResponseValue;
11279         }
11280         // struct LDKChannelHandshakeLimits ChannelHandshakeLimits_clone(const struct LDKChannelHandshakeLimits *NONNULL_PTR orig);
11281         export function ChannelHandshakeLimits_clone(orig: number): number {
11282                 if(!isWasmInitialized) {
11283                         throw new Error("initializeWasm() must be awaited first!");
11284                 }
11285                 const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_clone(orig);
11286                 return nativeResponseValue;
11287         }
11288         // MUST_USE_RES struct LDKChannelHandshakeLimits ChannelHandshakeLimits_default(void);
11289         export function ChannelHandshakeLimits_default(): number {
11290                 if(!isWasmInitialized) {
11291                         throw new Error("initializeWasm() must be awaited first!");
11292                 }
11293                 const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_default();
11294                 return nativeResponseValue;
11295         }
11296         // void ChannelConfig_free(struct LDKChannelConfig this_obj);
11297         export function ChannelConfig_free(this_obj: number): void {
11298                 if(!isWasmInitialized) {
11299                         throw new Error("initializeWasm() must be awaited first!");
11300                 }
11301                 const nativeResponseValue = wasm.TS_ChannelConfig_free(this_obj);
11302                 // debug statements here
11303         }
11304         // uint32_t ChannelConfig_get_forwarding_fee_proportional_millionths(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
11305         export function ChannelConfig_get_forwarding_fee_proportional_millionths(this_ptr: number): number {
11306                 if(!isWasmInitialized) {
11307                         throw new Error("initializeWasm() must be awaited first!");
11308                 }
11309                 const nativeResponseValue = wasm.TS_ChannelConfig_get_forwarding_fee_proportional_millionths(this_ptr);
11310                 return nativeResponseValue;
11311         }
11312         // void ChannelConfig_set_forwarding_fee_proportional_millionths(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
11313         export function ChannelConfig_set_forwarding_fee_proportional_millionths(this_ptr: number, val: number): void {
11314                 if(!isWasmInitialized) {
11315                         throw new Error("initializeWasm() must be awaited first!");
11316                 }
11317                 const nativeResponseValue = wasm.TS_ChannelConfig_set_forwarding_fee_proportional_millionths(this_ptr, val);
11318                 // debug statements here
11319         }
11320         // uint32_t ChannelConfig_get_forwarding_fee_base_msat(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
11321         export function ChannelConfig_get_forwarding_fee_base_msat(this_ptr: number): number {
11322                 if(!isWasmInitialized) {
11323                         throw new Error("initializeWasm() must be awaited first!");
11324                 }
11325                 const nativeResponseValue = wasm.TS_ChannelConfig_get_forwarding_fee_base_msat(this_ptr);
11326                 return nativeResponseValue;
11327         }
11328         // void ChannelConfig_set_forwarding_fee_base_msat(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
11329         export function ChannelConfig_set_forwarding_fee_base_msat(this_ptr: number, val: number): void {
11330                 if(!isWasmInitialized) {
11331                         throw new Error("initializeWasm() must be awaited first!");
11332                 }
11333                 const nativeResponseValue = wasm.TS_ChannelConfig_set_forwarding_fee_base_msat(this_ptr, val);
11334                 // debug statements here
11335         }
11336         // uint16_t ChannelConfig_get_cltv_expiry_delta(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
11337         export function ChannelConfig_get_cltv_expiry_delta(this_ptr: number): number {
11338                 if(!isWasmInitialized) {
11339                         throw new Error("initializeWasm() must be awaited first!");
11340                 }
11341                 const nativeResponseValue = wasm.TS_ChannelConfig_get_cltv_expiry_delta(this_ptr);
11342                 return nativeResponseValue;
11343         }
11344         // void ChannelConfig_set_cltv_expiry_delta(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint16_t val);
11345         export function ChannelConfig_set_cltv_expiry_delta(this_ptr: number, val: number): void {
11346                 if(!isWasmInitialized) {
11347                         throw new Error("initializeWasm() must be awaited first!");
11348                 }
11349                 const nativeResponseValue = wasm.TS_ChannelConfig_set_cltv_expiry_delta(this_ptr, val);
11350                 // debug statements here
11351         }
11352         // bool ChannelConfig_get_announced_channel(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
11353         export function ChannelConfig_get_announced_channel(this_ptr: number): boolean {
11354                 if(!isWasmInitialized) {
11355                         throw new Error("initializeWasm() must be awaited first!");
11356                 }
11357                 const nativeResponseValue = wasm.TS_ChannelConfig_get_announced_channel(this_ptr);
11358                 return nativeResponseValue;
11359         }
11360         // void ChannelConfig_set_announced_channel(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
11361         export function ChannelConfig_set_announced_channel(this_ptr: number, val: boolean): void {
11362                 if(!isWasmInitialized) {
11363                         throw new Error("initializeWasm() must be awaited first!");
11364                 }
11365                 const nativeResponseValue = wasm.TS_ChannelConfig_set_announced_channel(this_ptr, val);
11366                 // debug statements here
11367         }
11368         // bool ChannelConfig_get_commit_upfront_shutdown_pubkey(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
11369         export function ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr: number): boolean {
11370                 if(!isWasmInitialized) {
11371                         throw new Error("initializeWasm() must be awaited first!");
11372                 }
11373                 const nativeResponseValue = wasm.TS_ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr);
11374                 return nativeResponseValue;
11375         }
11376         // void ChannelConfig_set_commit_upfront_shutdown_pubkey(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
11377         export function ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr: number, val: boolean): void {
11378                 if(!isWasmInitialized) {
11379                         throw new Error("initializeWasm() must be awaited first!");
11380                 }
11381                 const nativeResponseValue = wasm.TS_ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr, val);
11382                 // debug statements here
11383         }
11384         // uint64_t ChannelConfig_get_max_dust_htlc_exposure_msat(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
11385         export function ChannelConfig_get_max_dust_htlc_exposure_msat(this_ptr: number): number {
11386                 if(!isWasmInitialized) {
11387                         throw new Error("initializeWasm() must be awaited first!");
11388                 }
11389                 const nativeResponseValue = wasm.TS_ChannelConfig_get_max_dust_htlc_exposure_msat(this_ptr);
11390                 return nativeResponseValue;
11391         }
11392         // void ChannelConfig_set_max_dust_htlc_exposure_msat(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint64_t val);
11393         export function ChannelConfig_set_max_dust_htlc_exposure_msat(this_ptr: number, val: number): void {
11394                 if(!isWasmInitialized) {
11395                         throw new Error("initializeWasm() must be awaited first!");
11396                 }
11397                 const nativeResponseValue = wasm.TS_ChannelConfig_set_max_dust_htlc_exposure_msat(this_ptr, val);
11398                 // debug statements here
11399         }
11400         // uint64_t ChannelConfig_get_force_close_avoidance_max_fee_satoshis(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
11401         export function ChannelConfig_get_force_close_avoidance_max_fee_satoshis(this_ptr: number): number {
11402                 if(!isWasmInitialized) {
11403                         throw new Error("initializeWasm() must be awaited first!");
11404                 }
11405                 const nativeResponseValue = wasm.TS_ChannelConfig_get_force_close_avoidance_max_fee_satoshis(this_ptr);
11406                 return nativeResponseValue;
11407         }
11408         // void ChannelConfig_set_force_close_avoidance_max_fee_satoshis(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint64_t val);
11409         export function ChannelConfig_set_force_close_avoidance_max_fee_satoshis(this_ptr: number, val: number): void {
11410                 if(!isWasmInitialized) {
11411                         throw new Error("initializeWasm() must be awaited first!");
11412                 }
11413                 const nativeResponseValue = wasm.TS_ChannelConfig_set_force_close_avoidance_max_fee_satoshis(this_ptr, val);
11414                 // debug statements here
11415         }
11416         // MUST_USE_RES struct LDKChannelConfig ChannelConfig_new(uint32_t forwarding_fee_proportional_millionths_arg, uint32_t forwarding_fee_base_msat_arg, uint16_t cltv_expiry_delta_arg, bool announced_channel_arg, bool commit_upfront_shutdown_pubkey_arg, uint64_t max_dust_htlc_exposure_msat_arg, uint64_t force_close_avoidance_max_fee_satoshis_arg);
11417         export function ChannelConfig_new(forwarding_fee_proportional_millionths_arg: number, forwarding_fee_base_msat_arg: number, cltv_expiry_delta_arg: number, announced_channel_arg: boolean, commit_upfront_shutdown_pubkey_arg: boolean, max_dust_htlc_exposure_msat_arg: number, force_close_avoidance_max_fee_satoshis_arg: number): number {
11418                 if(!isWasmInitialized) {
11419                         throw new Error("initializeWasm() must be awaited first!");
11420                 }
11421                 const nativeResponseValue = wasm.TS_ChannelConfig_new(forwarding_fee_proportional_millionths_arg, forwarding_fee_base_msat_arg, cltv_expiry_delta_arg, announced_channel_arg, commit_upfront_shutdown_pubkey_arg, max_dust_htlc_exposure_msat_arg, force_close_avoidance_max_fee_satoshis_arg);
11422                 return nativeResponseValue;
11423         }
11424         // uint64_t ChannelConfig_clone_ptr(LDKChannelConfig *NONNULL_PTR arg);
11425         export function ChannelConfig_clone_ptr(arg: number): number {
11426                 if(!isWasmInitialized) {
11427                         throw new Error("initializeWasm() must be awaited first!");
11428                 }
11429                 const nativeResponseValue = wasm.TS_ChannelConfig_clone_ptr(arg);
11430                 return nativeResponseValue;
11431         }
11432         // struct LDKChannelConfig ChannelConfig_clone(const struct LDKChannelConfig *NONNULL_PTR orig);
11433         export function ChannelConfig_clone(orig: number): number {
11434                 if(!isWasmInitialized) {
11435                         throw new Error("initializeWasm() must be awaited first!");
11436                 }
11437                 const nativeResponseValue = wasm.TS_ChannelConfig_clone(orig);
11438                 return nativeResponseValue;
11439         }
11440         // MUST_USE_RES struct LDKChannelConfig ChannelConfig_default(void);
11441         export function ChannelConfig_default(): number {
11442                 if(!isWasmInitialized) {
11443                         throw new Error("initializeWasm() must be awaited first!");
11444                 }
11445                 const nativeResponseValue = wasm.TS_ChannelConfig_default();
11446                 return nativeResponseValue;
11447         }
11448         // struct LDKCVec_u8Z ChannelConfig_write(const struct LDKChannelConfig *NONNULL_PTR obj);
11449         export function ChannelConfig_write(obj: number): Uint8Array {
11450                 if(!isWasmInitialized) {
11451                         throw new Error("initializeWasm() must be awaited first!");
11452                 }
11453                 const nativeResponseValue = wasm.TS_ChannelConfig_write(obj);
11454                 return decodeUint8Array(nativeResponseValue);
11455         }
11456         // struct LDKCResult_ChannelConfigDecodeErrorZ ChannelConfig_read(struct LDKu8slice ser);
11457         export function ChannelConfig_read(ser: Uint8Array): number {
11458                 if(!isWasmInitialized) {
11459                         throw new Error("initializeWasm() must be awaited first!");
11460                 }
11461                 const nativeResponseValue = wasm.TS_ChannelConfig_read(encodeUint8Array(ser));
11462                 return nativeResponseValue;
11463         }
11464         // void UserConfig_free(struct LDKUserConfig this_obj);
11465         export function UserConfig_free(this_obj: number): void {
11466                 if(!isWasmInitialized) {
11467                         throw new Error("initializeWasm() must be awaited first!");
11468                 }
11469                 const nativeResponseValue = wasm.TS_UserConfig_free(this_obj);
11470                 // debug statements here
11471         }
11472         // struct LDKChannelHandshakeConfig UserConfig_get_own_channel_config(const struct LDKUserConfig *NONNULL_PTR this_ptr);
11473         export function UserConfig_get_own_channel_config(this_ptr: number): number {
11474                 if(!isWasmInitialized) {
11475                         throw new Error("initializeWasm() must be awaited first!");
11476                 }
11477                 const nativeResponseValue = wasm.TS_UserConfig_get_own_channel_config(this_ptr);
11478                 return nativeResponseValue;
11479         }
11480         // void UserConfig_set_own_channel_config(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeConfig val);
11481         export function UserConfig_set_own_channel_config(this_ptr: number, val: number): void {
11482                 if(!isWasmInitialized) {
11483                         throw new Error("initializeWasm() must be awaited first!");
11484                 }
11485                 const nativeResponseValue = wasm.TS_UserConfig_set_own_channel_config(this_ptr, val);
11486                 // debug statements here
11487         }
11488         // struct LDKChannelHandshakeLimits UserConfig_get_peer_channel_config_limits(const struct LDKUserConfig *NONNULL_PTR this_ptr);
11489         export function UserConfig_get_peer_channel_config_limits(this_ptr: number): number {
11490                 if(!isWasmInitialized) {
11491                         throw new Error("initializeWasm() must be awaited first!");
11492                 }
11493                 const nativeResponseValue = wasm.TS_UserConfig_get_peer_channel_config_limits(this_ptr);
11494                 return nativeResponseValue;
11495         }
11496         // void UserConfig_set_peer_channel_config_limits(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeLimits val);
11497         export function UserConfig_set_peer_channel_config_limits(this_ptr: number, val: number): void {
11498                 if(!isWasmInitialized) {
11499                         throw new Error("initializeWasm() must be awaited first!");
11500                 }
11501                 const nativeResponseValue = wasm.TS_UserConfig_set_peer_channel_config_limits(this_ptr, val);
11502                 // debug statements here
11503         }
11504         // struct LDKChannelConfig UserConfig_get_channel_options(const struct LDKUserConfig *NONNULL_PTR this_ptr);
11505         export function UserConfig_get_channel_options(this_ptr: number): number {
11506                 if(!isWasmInitialized) {
11507                         throw new Error("initializeWasm() must be awaited first!");
11508                 }
11509                 const nativeResponseValue = wasm.TS_UserConfig_get_channel_options(this_ptr);
11510                 return nativeResponseValue;
11511         }
11512         // void UserConfig_set_channel_options(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelConfig val);
11513         export function UserConfig_set_channel_options(this_ptr: number, val: number): void {
11514                 if(!isWasmInitialized) {
11515                         throw new Error("initializeWasm() must be awaited first!");
11516                 }
11517                 const nativeResponseValue = wasm.TS_UserConfig_set_channel_options(this_ptr, val);
11518                 // debug statements here
11519         }
11520         // bool UserConfig_get_accept_forwards_to_priv_channels(const struct LDKUserConfig *NONNULL_PTR this_ptr);
11521         export function UserConfig_get_accept_forwards_to_priv_channels(this_ptr: number): boolean {
11522                 if(!isWasmInitialized) {
11523                         throw new Error("initializeWasm() must be awaited first!");
11524                 }
11525                 const nativeResponseValue = wasm.TS_UserConfig_get_accept_forwards_to_priv_channels(this_ptr);
11526                 return nativeResponseValue;
11527         }
11528         // void UserConfig_set_accept_forwards_to_priv_channels(struct LDKUserConfig *NONNULL_PTR this_ptr, bool val);
11529         export function UserConfig_set_accept_forwards_to_priv_channels(this_ptr: number, val: boolean): void {
11530                 if(!isWasmInitialized) {
11531                         throw new Error("initializeWasm() must be awaited first!");
11532                 }
11533                 const nativeResponseValue = wasm.TS_UserConfig_set_accept_forwards_to_priv_channels(this_ptr, val);
11534                 // debug statements here
11535         }
11536         // bool UserConfig_get_accept_inbound_channels(const struct LDKUserConfig *NONNULL_PTR this_ptr);
11537         export function UserConfig_get_accept_inbound_channels(this_ptr: number): boolean {
11538                 if(!isWasmInitialized) {
11539                         throw new Error("initializeWasm() must be awaited first!");
11540                 }
11541                 const nativeResponseValue = wasm.TS_UserConfig_get_accept_inbound_channels(this_ptr);
11542                 return nativeResponseValue;
11543         }
11544         // void UserConfig_set_accept_inbound_channels(struct LDKUserConfig *NONNULL_PTR this_ptr, bool val);
11545         export function UserConfig_set_accept_inbound_channels(this_ptr: number, val: boolean): void {
11546                 if(!isWasmInitialized) {
11547                         throw new Error("initializeWasm() must be awaited first!");
11548                 }
11549                 const nativeResponseValue = wasm.TS_UserConfig_set_accept_inbound_channels(this_ptr, val);
11550                 // debug statements here
11551         }
11552         // MUST_USE_RES struct LDKUserConfig UserConfig_new(struct LDKChannelHandshakeConfig own_channel_config_arg, struct LDKChannelHandshakeLimits peer_channel_config_limits_arg, struct LDKChannelConfig channel_options_arg, bool accept_forwards_to_priv_channels_arg, bool accept_inbound_channels_arg);
11553         export function UserConfig_new(own_channel_config_arg: number, peer_channel_config_limits_arg: number, channel_options_arg: number, accept_forwards_to_priv_channels_arg: boolean, accept_inbound_channels_arg: boolean): number {
11554                 if(!isWasmInitialized) {
11555                         throw new Error("initializeWasm() must be awaited first!");
11556                 }
11557                 const nativeResponseValue = wasm.TS_UserConfig_new(own_channel_config_arg, peer_channel_config_limits_arg, channel_options_arg, accept_forwards_to_priv_channels_arg, accept_inbound_channels_arg);
11558                 return nativeResponseValue;
11559         }
11560         // uint64_t UserConfig_clone_ptr(LDKUserConfig *NONNULL_PTR arg);
11561         export function UserConfig_clone_ptr(arg: number): number {
11562                 if(!isWasmInitialized) {
11563                         throw new Error("initializeWasm() must be awaited first!");
11564                 }
11565                 const nativeResponseValue = wasm.TS_UserConfig_clone_ptr(arg);
11566                 return nativeResponseValue;
11567         }
11568         // struct LDKUserConfig UserConfig_clone(const struct LDKUserConfig *NONNULL_PTR orig);
11569         export function UserConfig_clone(orig: number): number {
11570                 if(!isWasmInitialized) {
11571                         throw new Error("initializeWasm() must be awaited first!");
11572                 }
11573                 const nativeResponseValue = wasm.TS_UserConfig_clone(orig);
11574                 return nativeResponseValue;
11575         }
11576         // MUST_USE_RES struct LDKUserConfig UserConfig_default(void);
11577         export function UserConfig_default(): number {
11578                 if(!isWasmInitialized) {
11579                         throw new Error("initializeWasm() must be awaited first!");
11580                 }
11581                 const nativeResponseValue = wasm.TS_UserConfig_default();
11582                 return nativeResponseValue;
11583         }
11584         // void BestBlock_free(struct LDKBestBlock this_obj);
11585         export function BestBlock_free(this_obj: number): void {
11586                 if(!isWasmInitialized) {
11587                         throw new Error("initializeWasm() must be awaited first!");
11588                 }
11589                 const nativeResponseValue = wasm.TS_BestBlock_free(this_obj);
11590                 // debug statements here
11591         }
11592         // uint64_t BestBlock_clone_ptr(LDKBestBlock *NONNULL_PTR arg);
11593         export function BestBlock_clone_ptr(arg: number): number {
11594                 if(!isWasmInitialized) {
11595                         throw new Error("initializeWasm() must be awaited first!");
11596                 }
11597                 const nativeResponseValue = wasm.TS_BestBlock_clone_ptr(arg);
11598                 return nativeResponseValue;
11599         }
11600         // struct LDKBestBlock BestBlock_clone(const struct LDKBestBlock *NONNULL_PTR orig);
11601         export function BestBlock_clone(orig: number): number {
11602                 if(!isWasmInitialized) {
11603                         throw new Error("initializeWasm() must be awaited first!");
11604                 }
11605                 const nativeResponseValue = wasm.TS_BestBlock_clone(orig);
11606                 return nativeResponseValue;
11607         }
11608         // MUST_USE_RES struct LDKBestBlock BestBlock_from_genesis(enum LDKNetwork network);
11609         export function BestBlock_from_genesis(network: Network): number {
11610                 if(!isWasmInitialized) {
11611                         throw new Error("initializeWasm() must be awaited first!");
11612                 }
11613                 const nativeResponseValue = wasm.TS_BestBlock_from_genesis(network);
11614                 return nativeResponseValue;
11615         }
11616         // MUST_USE_RES struct LDKBestBlock BestBlock_new(struct LDKThirtyTwoBytes block_hash, uint32_t height);
11617         export function BestBlock_new(block_hash: Uint8Array, height: number): number {
11618                 if(!isWasmInitialized) {
11619                         throw new Error("initializeWasm() must be awaited first!");
11620                 }
11621                 const nativeResponseValue = wasm.TS_BestBlock_new(encodeUint8Array(block_hash), height);
11622                 return nativeResponseValue;
11623         }
11624         // MUST_USE_RES struct LDKThirtyTwoBytes BestBlock_block_hash(const struct LDKBestBlock *NONNULL_PTR this_arg);
11625         export function BestBlock_block_hash(this_arg: number): Uint8Array {
11626                 if(!isWasmInitialized) {
11627                         throw new Error("initializeWasm() must be awaited first!");
11628                 }
11629                 const nativeResponseValue = wasm.TS_BestBlock_block_hash(this_arg);
11630                 return decodeUint8Array(nativeResponseValue);
11631         }
11632         // MUST_USE_RES uint32_t BestBlock_height(const struct LDKBestBlock *NONNULL_PTR this_arg);
11633         export function BestBlock_height(this_arg: number): number {
11634                 if(!isWasmInitialized) {
11635                         throw new Error("initializeWasm() must be awaited first!");
11636                 }
11637                 const nativeResponseValue = wasm.TS_BestBlock_height(this_arg);
11638                 return nativeResponseValue;
11639         }
11640         // enum LDKAccessError AccessError_clone(const enum LDKAccessError *NONNULL_PTR orig);
11641         export function AccessError_clone(orig: number): AccessError {
11642                 if(!isWasmInitialized) {
11643                         throw new Error("initializeWasm() must be awaited first!");
11644                 }
11645                 const nativeResponseValue = wasm.TS_AccessError_clone(orig);
11646                 return nativeResponseValue;
11647         }
11648         // enum LDKAccessError AccessError_unknown_chain(void);
11649         export function AccessError_unknown_chain(): AccessError {
11650                 if(!isWasmInitialized) {
11651                         throw new Error("initializeWasm() must be awaited first!");
11652                 }
11653                 const nativeResponseValue = wasm.TS_AccessError_unknown_chain();
11654                 return nativeResponseValue;
11655         }
11656         // enum LDKAccessError AccessError_unknown_tx(void);
11657         export function AccessError_unknown_tx(): AccessError {
11658                 if(!isWasmInitialized) {
11659                         throw new Error("initializeWasm() must be awaited first!");
11660                 }
11661                 const nativeResponseValue = wasm.TS_AccessError_unknown_tx();
11662                 return nativeResponseValue;
11663         }
11664         // void Access_free(struct LDKAccess this_ptr);
11665         export function Access_free(this_ptr: number): void {
11666                 if(!isWasmInitialized) {
11667                         throw new Error("initializeWasm() must be awaited first!");
11668                 }
11669                 const nativeResponseValue = wasm.TS_Access_free(this_ptr);
11670                 // debug statements here
11671         }
11672         // void Listen_free(struct LDKListen this_ptr);
11673         export function Listen_free(this_ptr: number): void {
11674                 if(!isWasmInitialized) {
11675                         throw new Error("initializeWasm() must be awaited first!");
11676                 }
11677                 const nativeResponseValue = wasm.TS_Listen_free(this_ptr);
11678                 // debug statements here
11679         }
11680         // void Confirm_free(struct LDKConfirm this_ptr);
11681         export function Confirm_free(this_ptr: number): void {
11682                 if(!isWasmInitialized) {
11683                         throw new Error("initializeWasm() must be awaited first!");
11684                 }
11685                 const nativeResponseValue = wasm.TS_Confirm_free(this_ptr);
11686                 // debug statements here
11687         }
11688         // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_clone(const enum LDKChannelMonitorUpdateErr *NONNULL_PTR orig);
11689         export function ChannelMonitorUpdateErr_clone(orig: number): ChannelMonitorUpdateErr {
11690                 if(!isWasmInitialized) {
11691                         throw new Error("initializeWasm() must be awaited first!");
11692                 }
11693                 const nativeResponseValue = wasm.TS_ChannelMonitorUpdateErr_clone(orig);
11694                 return nativeResponseValue;
11695         }
11696         // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_temporary_failure(void);
11697         export function ChannelMonitorUpdateErr_temporary_failure(): ChannelMonitorUpdateErr {
11698                 if(!isWasmInitialized) {
11699                         throw new Error("initializeWasm() must be awaited first!");
11700                 }
11701                 const nativeResponseValue = wasm.TS_ChannelMonitorUpdateErr_temporary_failure();
11702                 return nativeResponseValue;
11703         }
11704         // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_permanent_failure(void);
11705         export function ChannelMonitorUpdateErr_permanent_failure(): ChannelMonitorUpdateErr {
11706                 if(!isWasmInitialized) {
11707                         throw new Error("initializeWasm() must be awaited first!");
11708                 }
11709                 const nativeResponseValue = wasm.TS_ChannelMonitorUpdateErr_permanent_failure();
11710                 return nativeResponseValue;
11711         }
11712         // void Watch_free(struct LDKWatch this_ptr);
11713         export function Watch_free(this_ptr: number): void {
11714                 if(!isWasmInitialized) {
11715                         throw new Error("initializeWasm() must be awaited first!");
11716                 }
11717                 const nativeResponseValue = wasm.TS_Watch_free(this_ptr);
11718                 // debug statements here
11719         }
11720         // void Filter_free(struct LDKFilter this_ptr);
11721         export function Filter_free(this_ptr: number): void {
11722                 if(!isWasmInitialized) {
11723                         throw new Error("initializeWasm() must be awaited first!");
11724                 }
11725                 const nativeResponseValue = wasm.TS_Filter_free(this_ptr);
11726                 // debug statements here
11727         }
11728         // void WatchedOutput_free(struct LDKWatchedOutput this_obj);
11729         export function WatchedOutput_free(this_obj: number): void {
11730                 if(!isWasmInitialized) {
11731                         throw new Error("initializeWasm() must be awaited first!");
11732                 }
11733                 const nativeResponseValue = wasm.TS_WatchedOutput_free(this_obj);
11734                 // debug statements here
11735         }
11736         // struct LDKThirtyTwoBytes WatchedOutput_get_block_hash(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
11737         export function WatchedOutput_get_block_hash(this_ptr: number): Uint8Array {
11738                 if(!isWasmInitialized) {
11739                         throw new Error("initializeWasm() must be awaited first!");
11740                 }
11741                 const nativeResponseValue = wasm.TS_WatchedOutput_get_block_hash(this_ptr);
11742                 return decodeUint8Array(nativeResponseValue);
11743         }
11744         // void WatchedOutput_set_block_hash(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11745         export function WatchedOutput_set_block_hash(this_ptr: number, val: Uint8Array): void {
11746                 if(!isWasmInitialized) {
11747                         throw new Error("initializeWasm() must be awaited first!");
11748                 }
11749                 const nativeResponseValue = wasm.TS_WatchedOutput_set_block_hash(this_ptr, encodeUint8Array(val));
11750                 // debug statements here
11751         }
11752         // struct LDKOutPoint WatchedOutput_get_outpoint(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
11753         export function WatchedOutput_get_outpoint(this_ptr: number): number {
11754                 if(!isWasmInitialized) {
11755                         throw new Error("initializeWasm() must be awaited first!");
11756                 }
11757                 const nativeResponseValue = wasm.TS_WatchedOutput_get_outpoint(this_ptr);
11758                 return nativeResponseValue;
11759         }
11760         // void WatchedOutput_set_outpoint(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKOutPoint val);
11761         export function WatchedOutput_set_outpoint(this_ptr: number, val: number): void {
11762                 if(!isWasmInitialized) {
11763                         throw new Error("initializeWasm() must be awaited first!");
11764                 }
11765                 const nativeResponseValue = wasm.TS_WatchedOutput_set_outpoint(this_ptr, val);
11766                 // debug statements here
11767         }
11768         // struct LDKu8slice WatchedOutput_get_script_pubkey(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
11769         export function WatchedOutput_get_script_pubkey(this_ptr: number): Uint8Array {
11770                 if(!isWasmInitialized) {
11771                         throw new Error("initializeWasm() must be awaited first!");
11772                 }
11773                 const nativeResponseValue = wasm.TS_WatchedOutput_get_script_pubkey(this_ptr);
11774                 return decodeUint8Array(nativeResponseValue);
11775         }
11776         // void WatchedOutput_set_script_pubkey(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
11777         export function WatchedOutput_set_script_pubkey(this_ptr: number, val: Uint8Array): void {
11778                 if(!isWasmInitialized) {
11779                         throw new Error("initializeWasm() must be awaited first!");
11780                 }
11781                 const nativeResponseValue = wasm.TS_WatchedOutput_set_script_pubkey(this_ptr, encodeUint8Array(val));
11782                 // debug statements here
11783         }
11784         // MUST_USE_RES struct LDKWatchedOutput WatchedOutput_new(struct LDKThirtyTwoBytes block_hash_arg, struct LDKOutPoint outpoint_arg, struct LDKCVec_u8Z script_pubkey_arg);
11785         export function WatchedOutput_new(block_hash_arg: Uint8Array, outpoint_arg: number, script_pubkey_arg: Uint8Array): number {
11786                 if(!isWasmInitialized) {
11787                         throw new Error("initializeWasm() must be awaited first!");
11788                 }
11789                 const nativeResponseValue = wasm.TS_WatchedOutput_new(encodeUint8Array(block_hash_arg), outpoint_arg, encodeUint8Array(script_pubkey_arg));
11790                 return nativeResponseValue;
11791         }
11792         // uint64_t WatchedOutput_clone_ptr(LDKWatchedOutput *NONNULL_PTR arg);
11793         export function WatchedOutput_clone_ptr(arg: number): number {
11794                 if(!isWasmInitialized) {
11795                         throw new Error("initializeWasm() must be awaited first!");
11796                 }
11797                 const nativeResponseValue = wasm.TS_WatchedOutput_clone_ptr(arg);
11798                 return nativeResponseValue;
11799         }
11800         // struct LDKWatchedOutput WatchedOutput_clone(const struct LDKWatchedOutput *NONNULL_PTR orig);
11801         export function WatchedOutput_clone(orig: number): number {
11802                 if(!isWasmInitialized) {
11803                         throw new Error("initializeWasm() must be awaited first!");
11804                 }
11805                 const nativeResponseValue = wasm.TS_WatchedOutput_clone(orig);
11806                 return nativeResponseValue;
11807         }
11808         // uint64_t WatchedOutput_hash(const struct LDKWatchedOutput *NONNULL_PTR o);
11809         export function WatchedOutput_hash(o: number): number {
11810                 if(!isWasmInitialized) {
11811                         throw new Error("initializeWasm() must be awaited first!");
11812                 }
11813                 const nativeResponseValue = wasm.TS_WatchedOutput_hash(o);
11814                 return nativeResponseValue;
11815         }
11816         // void BroadcasterInterface_free(struct LDKBroadcasterInterface this_ptr);
11817         export function BroadcasterInterface_free(this_ptr: number): void {
11818                 if(!isWasmInitialized) {
11819                         throw new Error("initializeWasm() must be awaited first!");
11820                 }
11821                 const nativeResponseValue = wasm.TS_BroadcasterInterface_free(this_ptr);
11822                 // debug statements here
11823         }
11824         // enum LDKConfirmationTarget ConfirmationTarget_clone(const enum LDKConfirmationTarget *NONNULL_PTR orig);
11825         export function ConfirmationTarget_clone(orig: number): ConfirmationTarget {
11826                 if(!isWasmInitialized) {
11827                         throw new Error("initializeWasm() must be awaited first!");
11828                 }
11829                 const nativeResponseValue = wasm.TS_ConfirmationTarget_clone(orig);
11830                 return nativeResponseValue;
11831         }
11832         // enum LDKConfirmationTarget ConfirmationTarget_background(void);
11833         export function ConfirmationTarget_background(): ConfirmationTarget {
11834                 if(!isWasmInitialized) {
11835                         throw new Error("initializeWasm() must be awaited first!");
11836                 }
11837                 const nativeResponseValue = wasm.TS_ConfirmationTarget_background();
11838                 return nativeResponseValue;
11839         }
11840         // enum LDKConfirmationTarget ConfirmationTarget_normal(void);
11841         export function ConfirmationTarget_normal(): ConfirmationTarget {
11842                 if(!isWasmInitialized) {
11843                         throw new Error("initializeWasm() must be awaited first!");
11844                 }
11845                 const nativeResponseValue = wasm.TS_ConfirmationTarget_normal();
11846                 return nativeResponseValue;
11847         }
11848         // enum LDKConfirmationTarget ConfirmationTarget_high_priority(void);
11849         export function ConfirmationTarget_high_priority(): ConfirmationTarget {
11850                 if(!isWasmInitialized) {
11851                         throw new Error("initializeWasm() must be awaited first!");
11852                 }
11853                 const nativeResponseValue = wasm.TS_ConfirmationTarget_high_priority();
11854                 return nativeResponseValue;
11855         }
11856         // bool ConfirmationTarget_eq(const enum LDKConfirmationTarget *NONNULL_PTR a, const enum LDKConfirmationTarget *NONNULL_PTR b);
11857         export function ConfirmationTarget_eq(a: number, b: number): boolean {
11858                 if(!isWasmInitialized) {
11859                         throw new Error("initializeWasm() must be awaited first!");
11860                 }
11861                 const nativeResponseValue = wasm.TS_ConfirmationTarget_eq(a, b);
11862                 return nativeResponseValue;
11863         }
11864         // void FeeEstimator_free(struct LDKFeeEstimator this_ptr);
11865         export function FeeEstimator_free(this_ptr: number): void {
11866                 if(!isWasmInitialized) {
11867                         throw new Error("initializeWasm() must be awaited first!");
11868                 }
11869                 const nativeResponseValue = wasm.TS_FeeEstimator_free(this_ptr);
11870                 // debug statements here
11871         }
11872         // void MonitorUpdateId_free(struct LDKMonitorUpdateId this_obj);
11873         export function MonitorUpdateId_free(this_obj: number): void {
11874                 if(!isWasmInitialized) {
11875                         throw new Error("initializeWasm() must be awaited first!");
11876                 }
11877                 const nativeResponseValue = wasm.TS_MonitorUpdateId_free(this_obj);
11878                 // debug statements here
11879         }
11880         // uint64_t MonitorUpdateId_clone_ptr(LDKMonitorUpdateId *NONNULL_PTR arg);
11881         export function MonitorUpdateId_clone_ptr(arg: number): number {
11882                 if(!isWasmInitialized) {
11883                         throw new Error("initializeWasm() must be awaited first!");
11884                 }
11885                 const nativeResponseValue = wasm.TS_MonitorUpdateId_clone_ptr(arg);
11886                 return nativeResponseValue;
11887         }
11888         // struct LDKMonitorUpdateId MonitorUpdateId_clone(const struct LDKMonitorUpdateId *NONNULL_PTR orig);
11889         export function MonitorUpdateId_clone(orig: number): number {
11890                 if(!isWasmInitialized) {
11891                         throw new Error("initializeWasm() must be awaited first!");
11892                 }
11893                 const nativeResponseValue = wasm.TS_MonitorUpdateId_clone(orig);
11894                 return nativeResponseValue;
11895         }
11896         // uint64_t MonitorUpdateId_hash(const struct LDKMonitorUpdateId *NONNULL_PTR o);
11897         export function MonitorUpdateId_hash(o: number): number {
11898                 if(!isWasmInitialized) {
11899                         throw new Error("initializeWasm() must be awaited first!");
11900                 }
11901                 const nativeResponseValue = wasm.TS_MonitorUpdateId_hash(o);
11902                 return nativeResponseValue;
11903         }
11904         // bool MonitorUpdateId_eq(const struct LDKMonitorUpdateId *NONNULL_PTR a, const struct LDKMonitorUpdateId *NONNULL_PTR b);
11905         export function MonitorUpdateId_eq(a: number, b: number): boolean {
11906                 if(!isWasmInitialized) {
11907                         throw new Error("initializeWasm() must be awaited first!");
11908                 }
11909                 const nativeResponseValue = wasm.TS_MonitorUpdateId_eq(a, b);
11910                 return nativeResponseValue;
11911         }
11912         // void Persist_free(struct LDKPersist this_ptr);
11913         export function Persist_free(this_ptr: number): void {
11914                 if(!isWasmInitialized) {
11915                         throw new Error("initializeWasm() must be awaited first!");
11916                 }
11917                 const nativeResponseValue = wasm.TS_Persist_free(this_ptr);
11918                 // debug statements here
11919         }
11920         // void LockedChannelMonitor_free(struct LDKLockedChannelMonitor this_obj);
11921         export function LockedChannelMonitor_free(this_obj: number): void {
11922                 if(!isWasmInitialized) {
11923                         throw new Error("initializeWasm() must be awaited first!");
11924                 }
11925                 const nativeResponseValue = wasm.TS_LockedChannelMonitor_free(this_obj);
11926                 // debug statements here
11927         }
11928         // void ChainMonitor_free(struct LDKChainMonitor this_obj);
11929         export function ChainMonitor_free(this_obj: number): void {
11930                 if(!isWasmInitialized) {
11931                         throw new Error("initializeWasm() must be awaited first!");
11932                 }
11933                 const nativeResponseValue = wasm.TS_ChainMonitor_free(this_obj);
11934                 // debug statements here
11935         }
11936         // MUST_USE_RES struct LDKChainMonitor ChainMonitor_new(struct LDKCOption_FilterZ chain_source, struct LDKBroadcasterInterface broadcaster, struct LDKLogger logger, struct LDKFeeEstimator feeest, struct LDKPersist persister);
11937         export function ChainMonitor_new(chain_source: number, broadcaster: number, logger: number, feeest: number, persister: number): number {
11938                 if(!isWasmInitialized) {
11939                         throw new Error("initializeWasm() must be awaited first!");
11940                 }
11941                 const nativeResponseValue = wasm.TS_ChainMonitor_new(chain_source, broadcaster, logger, feeest, persister);
11942                 return nativeResponseValue;
11943         }
11944         // MUST_USE_RES struct LDKCVec_BalanceZ ChainMonitor_get_claimable_balances(const struct LDKChainMonitor *NONNULL_PTR this_arg, struct LDKCVec_ChannelDetailsZ ignored_channels);
11945         export function ChainMonitor_get_claimable_balances(this_arg: number, ignored_channels: number[]): number[] {
11946                 if(!isWasmInitialized) {
11947                         throw new Error("initializeWasm() must be awaited first!");
11948                 }
11949                 const nativeResponseValue = wasm.TS_ChainMonitor_get_claimable_balances(this_arg, ignored_channels);
11950                 return nativeResponseValue;
11951         }
11952         // MUST_USE_RES struct LDKCResult_LockedChannelMonitorNoneZ ChainMonitor_get_monitor(const struct LDKChainMonitor *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo);
11953         export function ChainMonitor_get_monitor(this_arg: number, funding_txo: number): number {
11954                 if(!isWasmInitialized) {
11955                         throw new Error("initializeWasm() must be awaited first!");
11956                 }
11957                 const nativeResponseValue = wasm.TS_ChainMonitor_get_monitor(this_arg, funding_txo);
11958                 return nativeResponseValue;
11959         }
11960         // MUST_USE_RES struct LDKCVec_OutPointZ ChainMonitor_list_monitors(const struct LDKChainMonitor *NONNULL_PTR this_arg);
11961         export function ChainMonitor_list_monitors(this_arg: number): number[] {
11962                 if(!isWasmInitialized) {
11963                         throw new Error("initializeWasm() must be awaited first!");
11964                 }
11965                 const nativeResponseValue = wasm.TS_ChainMonitor_list_monitors(this_arg);
11966                 return nativeResponseValue;
11967         }
11968         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChainMonitor_channel_monitor_updated(const struct LDKChainMonitor *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKMonitorUpdateId completed_update_id);
11969         export function ChainMonitor_channel_monitor_updated(this_arg: number, funding_txo: number, completed_update_id: number): number {
11970                 if(!isWasmInitialized) {
11971                         throw new Error("initializeWasm() must be awaited first!");
11972                 }
11973                 const nativeResponseValue = wasm.TS_ChainMonitor_channel_monitor_updated(this_arg, funding_txo, completed_update_id);
11974                 return nativeResponseValue;
11975         }
11976         // struct LDKListen ChainMonitor_as_Listen(const struct LDKChainMonitor *NONNULL_PTR this_arg);
11977         export function ChainMonitor_as_Listen(this_arg: number): number {
11978                 if(!isWasmInitialized) {
11979                         throw new Error("initializeWasm() must be awaited first!");
11980                 }
11981                 const nativeResponseValue = wasm.TS_ChainMonitor_as_Listen(this_arg);
11982                 return nativeResponseValue;
11983         }
11984         // struct LDKConfirm ChainMonitor_as_Confirm(const struct LDKChainMonitor *NONNULL_PTR this_arg);
11985         export function ChainMonitor_as_Confirm(this_arg: number): number {
11986                 if(!isWasmInitialized) {
11987                         throw new Error("initializeWasm() must be awaited first!");
11988                 }
11989                 const nativeResponseValue = wasm.TS_ChainMonitor_as_Confirm(this_arg);
11990                 return nativeResponseValue;
11991         }
11992         // struct LDKWatch ChainMonitor_as_Watch(const struct LDKChainMonitor *NONNULL_PTR this_arg);
11993         export function ChainMonitor_as_Watch(this_arg: number): number {
11994                 if(!isWasmInitialized) {
11995                         throw new Error("initializeWasm() must be awaited first!");
11996                 }
11997                 const nativeResponseValue = wasm.TS_ChainMonitor_as_Watch(this_arg);
11998                 return nativeResponseValue;
11999         }
12000         // struct LDKEventsProvider ChainMonitor_as_EventsProvider(const struct LDKChainMonitor *NONNULL_PTR this_arg);
12001         export function ChainMonitor_as_EventsProvider(this_arg: number): number {
12002                 if(!isWasmInitialized) {
12003                         throw new Error("initializeWasm() must be awaited first!");
12004                 }
12005                 const nativeResponseValue = wasm.TS_ChainMonitor_as_EventsProvider(this_arg);
12006                 return nativeResponseValue;
12007         }
12008         // void ChannelMonitorUpdate_free(struct LDKChannelMonitorUpdate this_obj);
12009         export function ChannelMonitorUpdate_free(this_obj: number): void {
12010                 if(!isWasmInitialized) {
12011                         throw new Error("initializeWasm() must be awaited first!");
12012                 }
12013                 const nativeResponseValue = wasm.TS_ChannelMonitorUpdate_free(this_obj);
12014                 // debug statements here
12015         }
12016         // uint64_t ChannelMonitorUpdate_get_update_id(const struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr);
12017         export function ChannelMonitorUpdate_get_update_id(this_ptr: number): number {
12018                 if(!isWasmInitialized) {
12019                         throw new Error("initializeWasm() must be awaited first!");
12020                 }
12021                 const nativeResponseValue = wasm.TS_ChannelMonitorUpdate_get_update_id(this_ptr);
12022                 return nativeResponseValue;
12023         }
12024         // void ChannelMonitorUpdate_set_update_id(struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr, uint64_t val);
12025         export function ChannelMonitorUpdate_set_update_id(this_ptr: number, val: number): void {
12026                 if(!isWasmInitialized) {
12027                         throw new Error("initializeWasm() must be awaited first!");
12028                 }
12029                 const nativeResponseValue = wasm.TS_ChannelMonitorUpdate_set_update_id(this_ptr, val);
12030                 // debug statements here
12031         }
12032         // uint64_t ChannelMonitorUpdate_clone_ptr(LDKChannelMonitorUpdate *NONNULL_PTR arg);
12033         export function ChannelMonitorUpdate_clone_ptr(arg: number): number {
12034                 if(!isWasmInitialized) {
12035                         throw new Error("initializeWasm() must be awaited first!");
12036                 }
12037                 const nativeResponseValue = wasm.TS_ChannelMonitorUpdate_clone_ptr(arg);
12038                 return nativeResponseValue;
12039         }
12040         // struct LDKChannelMonitorUpdate ChannelMonitorUpdate_clone(const struct LDKChannelMonitorUpdate *NONNULL_PTR orig);
12041         export function ChannelMonitorUpdate_clone(orig: number): number {
12042                 if(!isWasmInitialized) {
12043                         throw new Error("initializeWasm() must be awaited first!");
12044                 }
12045                 const nativeResponseValue = wasm.TS_ChannelMonitorUpdate_clone(orig);
12046                 return nativeResponseValue;
12047         }
12048         // struct LDKCVec_u8Z ChannelMonitorUpdate_write(const struct LDKChannelMonitorUpdate *NONNULL_PTR obj);
12049         export function ChannelMonitorUpdate_write(obj: number): Uint8Array {
12050                 if(!isWasmInitialized) {
12051                         throw new Error("initializeWasm() must be awaited first!");
12052                 }
12053                 const nativeResponseValue = wasm.TS_ChannelMonitorUpdate_write(obj);
12054                 return decodeUint8Array(nativeResponseValue);
12055         }
12056         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ ChannelMonitorUpdate_read(struct LDKu8slice ser);
12057         export function ChannelMonitorUpdate_read(ser: Uint8Array): number {
12058                 if(!isWasmInitialized) {
12059                         throw new Error("initializeWasm() must be awaited first!");
12060                 }
12061                 const nativeResponseValue = wasm.TS_ChannelMonitorUpdate_read(encodeUint8Array(ser));
12062                 return nativeResponseValue;
12063         }
12064         // void MonitorEvent_free(struct LDKMonitorEvent this_ptr);
12065         export function MonitorEvent_free(this_ptr: number): void {
12066                 if(!isWasmInitialized) {
12067                         throw new Error("initializeWasm() must be awaited first!");
12068                 }
12069                 const nativeResponseValue = wasm.TS_MonitorEvent_free(this_ptr);
12070                 // debug statements here
12071         }
12072         // uint64_t MonitorEvent_clone_ptr(LDKMonitorEvent *NONNULL_PTR arg);
12073         export function MonitorEvent_clone_ptr(arg: number): number {
12074                 if(!isWasmInitialized) {
12075                         throw new Error("initializeWasm() must be awaited first!");
12076                 }
12077                 const nativeResponseValue = wasm.TS_MonitorEvent_clone_ptr(arg);
12078                 return nativeResponseValue;
12079         }
12080         // struct LDKMonitorEvent MonitorEvent_clone(const struct LDKMonitorEvent *NONNULL_PTR orig);
12081         export function MonitorEvent_clone(orig: number): number {
12082                 if(!isWasmInitialized) {
12083                         throw new Error("initializeWasm() must be awaited first!");
12084                 }
12085                 const nativeResponseValue = wasm.TS_MonitorEvent_clone(orig);
12086                 return nativeResponseValue;
12087         }
12088         // struct LDKMonitorEvent MonitorEvent_htlcevent(struct LDKHTLCUpdate a);
12089         export function MonitorEvent_htlcevent(a: number): number {
12090                 if(!isWasmInitialized) {
12091                         throw new Error("initializeWasm() must be awaited first!");
12092                 }
12093                 const nativeResponseValue = wasm.TS_MonitorEvent_htlcevent(a);
12094                 return nativeResponseValue;
12095         }
12096         // struct LDKMonitorEvent MonitorEvent_commitment_tx_confirmed(struct LDKOutPoint a);
12097         export function MonitorEvent_commitment_tx_confirmed(a: number): number {
12098                 if(!isWasmInitialized) {
12099                         throw new Error("initializeWasm() must be awaited first!");
12100                 }
12101                 const nativeResponseValue = wasm.TS_MonitorEvent_commitment_tx_confirmed(a);
12102                 return nativeResponseValue;
12103         }
12104         // struct LDKMonitorEvent MonitorEvent_update_completed(struct LDKOutPoint funding_txo, uint64_t monitor_update_id);
12105         export function MonitorEvent_update_completed(funding_txo: number, monitor_update_id: number): number {
12106                 if(!isWasmInitialized) {
12107                         throw new Error("initializeWasm() must be awaited first!");
12108                 }
12109                 const nativeResponseValue = wasm.TS_MonitorEvent_update_completed(funding_txo, monitor_update_id);
12110                 return nativeResponseValue;
12111         }
12112         // struct LDKMonitorEvent MonitorEvent_update_failed(struct LDKOutPoint a);
12113         export function MonitorEvent_update_failed(a: number): number {
12114                 if(!isWasmInitialized) {
12115                         throw new Error("initializeWasm() must be awaited first!");
12116                 }
12117                 const nativeResponseValue = wasm.TS_MonitorEvent_update_failed(a);
12118                 return nativeResponseValue;
12119         }
12120         // struct LDKCVec_u8Z MonitorEvent_write(const struct LDKMonitorEvent *NONNULL_PTR obj);
12121         export function MonitorEvent_write(obj: number): Uint8Array {
12122                 if(!isWasmInitialized) {
12123                         throw new Error("initializeWasm() must be awaited first!");
12124                 }
12125                 const nativeResponseValue = wasm.TS_MonitorEvent_write(obj);
12126                 return decodeUint8Array(nativeResponseValue);
12127         }
12128         // struct LDKCResult_COption_MonitorEventZDecodeErrorZ MonitorEvent_read(struct LDKu8slice ser);
12129         export function MonitorEvent_read(ser: Uint8Array): number {
12130                 if(!isWasmInitialized) {
12131                         throw new Error("initializeWasm() must be awaited first!");
12132                 }
12133                 const nativeResponseValue = wasm.TS_MonitorEvent_read(encodeUint8Array(ser));
12134                 return nativeResponseValue;
12135         }
12136         // void HTLCUpdate_free(struct LDKHTLCUpdate this_obj);
12137         export function HTLCUpdate_free(this_obj: number): void {
12138                 if(!isWasmInitialized) {
12139                         throw new Error("initializeWasm() must be awaited first!");
12140                 }
12141                 const nativeResponseValue = wasm.TS_HTLCUpdate_free(this_obj);
12142                 // debug statements here
12143         }
12144         // uint64_t HTLCUpdate_clone_ptr(LDKHTLCUpdate *NONNULL_PTR arg);
12145         export function HTLCUpdate_clone_ptr(arg: number): number {
12146                 if(!isWasmInitialized) {
12147                         throw new Error("initializeWasm() must be awaited first!");
12148                 }
12149                 const nativeResponseValue = wasm.TS_HTLCUpdate_clone_ptr(arg);
12150                 return nativeResponseValue;
12151         }
12152         // struct LDKHTLCUpdate HTLCUpdate_clone(const struct LDKHTLCUpdate *NONNULL_PTR orig);
12153         export function HTLCUpdate_clone(orig: number): number {
12154                 if(!isWasmInitialized) {
12155                         throw new Error("initializeWasm() must be awaited first!");
12156                 }
12157                 const nativeResponseValue = wasm.TS_HTLCUpdate_clone(orig);
12158                 return nativeResponseValue;
12159         }
12160         // struct LDKCVec_u8Z HTLCUpdate_write(const struct LDKHTLCUpdate *NONNULL_PTR obj);
12161         export function HTLCUpdate_write(obj: number): Uint8Array {
12162                 if(!isWasmInitialized) {
12163                         throw new Error("initializeWasm() must be awaited first!");
12164                 }
12165                 const nativeResponseValue = wasm.TS_HTLCUpdate_write(obj);
12166                 return decodeUint8Array(nativeResponseValue);
12167         }
12168         // struct LDKCResult_HTLCUpdateDecodeErrorZ HTLCUpdate_read(struct LDKu8slice ser);
12169         export function HTLCUpdate_read(ser: Uint8Array): number {
12170                 if(!isWasmInitialized) {
12171                         throw new Error("initializeWasm() must be awaited first!");
12172                 }
12173                 const nativeResponseValue = wasm.TS_HTLCUpdate_read(encodeUint8Array(ser));
12174                 return nativeResponseValue;
12175         }
12176         // void Balance_free(struct LDKBalance this_ptr);
12177         export function Balance_free(this_ptr: number): void {
12178                 if(!isWasmInitialized) {
12179                         throw new Error("initializeWasm() must be awaited first!");
12180                 }
12181                 const nativeResponseValue = wasm.TS_Balance_free(this_ptr);
12182                 // debug statements here
12183         }
12184         // uint64_t Balance_clone_ptr(LDKBalance *NONNULL_PTR arg);
12185         export function Balance_clone_ptr(arg: number): number {
12186                 if(!isWasmInitialized) {
12187                         throw new Error("initializeWasm() must be awaited first!");
12188                 }
12189                 const nativeResponseValue = wasm.TS_Balance_clone_ptr(arg);
12190                 return nativeResponseValue;
12191         }
12192         // struct LDKBalance Balance_clone(const struct LDKBalance *NONNULL_PTR orig);
12193         export function Balance_clone(orig: number): number {
12194                 if(!isWasmInitialized) {
12195                         throw new Error("initializeWasm() must be awaited first!");
12196                 }
12197                 const nativeResponseValue = wasm.TS_Balance_clone(orig);
12198                 return nativeResponseValue;
12199         }
12200         // struct LDKBalance Balance_claimable_on_channel_close(uint64_t claimable_amount_satoshis);
12201         export function Balance_claimable_on_channel_close(claimable_amount_satoshis: number): number {
12202                 if(!isWasmInitialized) {
12203                         throw new Error("initializeWasm() must be awaited first!");
12204                 }
12205                 const nativeResponseValue = wasm.TS_Balance_claimable_on_channel_close(claimable_amount_satoshis);
12206                 return nativeResponseValue;
12207         }
12208         // struct LDKBalance Balance_claimable_awaiting_confirmations(uint64_t claimable_amount_satoshis, uint32_t confirmation_height);
12209         export function Balance_claimable_awaiting_confirmations(claimable_amount_satoshis: number, confirmation_height: number): number {
12210                 if(!isWasmInitialized) {
12211                         throw new Error("initializeWasm() must be awaited first!");
12212                 }
12213                 const nativeResponseValue = wasm.TS_Balance_claimable_awaiting_confirmations(claimable_amount_satoshis, confirmation_height);
12214                 return nativeResponseValue;
12215         }
12216         // struct LDKBalance Balance_contentious_claimable(uint64_t claimable_amount_satoshis, uint32_t timeout_height);
12217         export function Balance_contentious_claimable(claimable_amount_satoshis: number, timeout_height: number): number {
12218                 if(!isWasmInitialized) {
12219                         throw new Error("initializeWasm() must be awaited first!");
12220                 }
12221                 const nativeResponseValue = wasm.TS_Balance_contentious_claimable(claimable_amount_satoshis, timeout_height);
12222                 return nativeResponseValue;
12223         }
12224         // struct LDKBalance Balance_maybe_claimable_htlcawaiting_timeout(uint64_t claimable_amount_satoshis, uint32_t claimable_height);
12225         export function Balance_maybe_claimable_htlcawaiting_timeout(claimable_amount_satoshis: number, claimable_height: number): number {
12226                 if(!isWasmInitialized) {
12227                         throw new Error("initializeWasm() must be awaited first!");
12228                 }
12229                 const nativeResponseValue = wasm.TS_Balance_maybe_claimable_htlcawaiting_timeout(claimable_amount_satoshis, claimable_height);
12230                 return nativeResponseValue;
12231         }
12232         // bool Balance_eq(const struct LDKBalance *NONNULL_PTR a, const struct LDKBalance *NONNULL_PTR b);
12233         export function Balance_eq(a: number, b: number): boolean {
12234                 if(!isWasmInitialized) {
12235                         throw new Error("initializeWasm() must be awaited first!");
12236                 }
12237                 const nativeResponseValue = wasm.TS_Balance_eq(a, b);
12238                 return nativeResponseValue;
12239         }
12240         // void ChannelMonitor_free(struct LDKChannelMonitor this_obj);
12241         export function ChannelMonitor_free(this_obj: number): void {
12242                 if(!isWasmInitialized) {
12243                         throw new Error("initializeWasm() must be awaited first!");
12244                 }
12245                 const nativeResponseValue = wasm.TS_ChannelMonitor_free(this_obj);
12246                 // debug statements here
12247         }
12248         // uint64_t ChannelMonitor_clone_ptr(LDKChannelMonitor *NONNULL_PTR arg);
12249         export function ChannelMonitor_clone_ptr(arg: number): number {
12250                 if(!isWasmInitialized) {
12251                         throw new Error("initializeWasm() must be awaited first!");
12252                 }
12253                 const nativeResponseValue = wasm.TS_ChannelMonitor_clone_ptr(arg);
12254                 return nativeResponseValue;
12255         }
12256         // struct LDKChannelMonitor ChannelMonitor_clone(const struct LDKChannelMonitor *NONNULL_PTR orig);
12257         export function ChannelMonitor_clone(orig: number): number {
12258                 if(!isWasmInitialized) {
12259                         throw new Error("initializeWasm() must be awaited first!");
12260                 }
12261                 const nativeResponseValue = wasm.TS_ChannelMonitor_clone(orig);
12262                 return nativeResponseValue;
12263         }
12264         // struct LDKCVec_u8Z ChannelMonitor_write(const struct LDKChannelMonitor *NONNULL_PTR obj);
12265         export function ChannelMonitor_write(obj: number): Uint8Array {
12266                 if(!isWasmInitialized) {
12267                         throw new Error("initializeWasm() must be awaited first!");
12268                 }
12269                 const nativeResponseValue = wasm.TS_ChannelMonitor_write(obj);
12270                 return decodeUint8Array(nativeResponseValue);
12271         }
12272         // MUST_USE_RES struct LDKCResult_NoneNoneZ ChannelMonitor_update_monitor(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKChannelMonitorUpdate *NONNULL_PTR updates, const struct LDKBroadcasterInterface *NONNULL_PTR broadcaster, const struct LDKFeeEstimator *NONNULL_PTR fee_estimator, const struct LDKLogger *NONNULL_PTR logger);
12273         export function ChannelMonitor_update_monitor(this_arg: number, updates: number, broadcaster: number, fee_estimator: number, logger: number): number {
12274                 if(!isWasmInitialized) {
12275                         throw new Error("initializeWasm() must be awaited first!");
12276                 }
12277                 const nativeResponseValue = wasm.TS_ChannelMonitor_update_monitor(this_arg, updates, broadcaster, fee_estimator, logger);
12278                 return nativeResponseValue;
12279         }
12280         // MUST_USE_RES uint64_t ChannelMonitor_get_latest_update_id(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
12281         export function ChannelMonitor_get_latest_update_id(this_arg: number): number {
12282                 if(!isWasmInitialized) {
12283                         throw new Error("initializeWasm() must be awaited first!");
12284                 }
12285                 const nativeResponseValue = wasm.TS_ChannelMonitor_get_latest_update_id(this_arg);
12286                 return nativeResponseValue;
12287         }
12288         // MUST_USE_RES struct LDKC2Tuple_OutPointScriptZ ChannelMonitor_get_funding_txo(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
12289         export function ChannelMonitor_get_funding_txo(this_arg: number): number {
12290                 if(!isWasmInitialized) {
12291                         throw new Error("initializeWasm() must be awaited first!");
12292                 }
12293                 const nativeResponseValue = wasm.TS_ChannelMonitor_get_funding_txo(this_arg);
12294                 return nativeResponseValue;
12295         }
12296         // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ ChannelMonitor_get_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
12297         export function ChannelMonitor_get_outputs_to_watch(this_arg: number): number[] {
12298                 if(!isWasmInitialized) {
12299                         throw new Error("initializeWasm() must be awaited first!");
12300                 }
12301                 const nativeResponseValue = wasm.TS_ChannelMonitor_get_outputs_to_watch(this_arg);
12302                 return nativeResponseValue;
12303         }
12304         // void ChannelMonitor_load_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKFilter *NONNULL_PTR filter);
12305         export function ChannelMonitor_load_outputs_to_watch(this_arg: number, filter: number): void {
12306                 if(!isWasmInitialized) {
12307                         throw new Error("initializeWasm() must be awaited first!");
12308                 }
12309                 const nativeResponseValue = wasm.TS_ChannelMonitor_load_outputs_to_watch(this_arg, filter);
12310                 // debug statements here
12311         }
12312         // MUST_USE_RES struct LDKCVec_MonitorEventZ ChannelMonitor_get_and_clear_pending_monitor_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
12313         export function ChannelMonitor_get_and_clear_pending_monitor_events(this_arg: number): number[] {
12314                 if(!isWasmInitialized) {
12315                         throw new Error("initializeWasm() must be awaited first!");
12316                 }
12317                 const nativeResponseValue = wasm.TS_ChannelMonitor_get_and_clear_pending_monitor_events(this_arg);
12318                 return nativeResponseValue;
12319         }
12320         // MUST_USE_RES struct LDKCVec_EventZ ChannelMonitor_get_and_clear_pending_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
12321         export function ChannelMonitor_get_and_clear_pending_events(this_arg: number): number[] {
12322                 if(!isWasmInitialized) {
12323                         throw new Error("initializeWasm() must be awaited first!");
12324                 }
12325                 const nativeResponseValue = wasm.TS_ChannelMonitor_get_and_clear_pending_events(this_arg);
12326                 return nativeResponseValue;
12327         }
12328         // 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);
12329         export function ChannelMonitor_get_latest_holder_commitment_txn(this_arg: number, logger: number): Uint8Array[] {
12330                 if(!isWasmInitialized) {
12331                         throw new Error("initializeWasm() must be awaited first!");
12332                 }
12333                 const nativeResponseValue = wasm.TS_ChannelMonitor_get_latest_holder_commitment_txn(this_arg, logger);
12334                 return nativeResponseValue;
12335         }
12336         // 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);
12337         export function ChannelMonitor_block_connected(this_arg: number, header: Uint8Array, txdata: number[], height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
12338                 if(!isWasmInitialized) {
12339                         throw new Error("initializeWasm() must be awaited first!");
12340                 }
12341                 const nativeResponseValue = wasm.TS_ChannelMonitor_block_connected(this_arg, encodeUint8Array(header), txdata, height, broadcaster, fee_estimator, logger);
12342                 return nativeResponseValue;
12343         }
12344         // 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);
12345         export function ChannelMonitor_block_disconnected(this_arg: number, header: Uint8Array, height: number, broadcaster: number, fee_estimator: number, logger: number): void {
12346                 if(!isWasmInitialized) {
12347                         throw new Error("initializeWasm() must be awaited first!");
12348                 }
12349                 const nativeResponseValue = wasm.TS_ChannelMonitor_block_disconnected(this_arg, encodeUint8Array(header), height, broadcaster, fee_estimator, logger);
12350                 // debug statements here
12351         }
12352         // 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);
12353         export function ChannelMonitor_transactions_confirmed(this_arg: number, header: Uint8Array, txdata: number[], height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
12354                 if(!isWasmInitialized) {
12355                         throw new Error("initializeWasm() must be awaited first!");
12356                 }
12357                 const nativeResponseValue = wasm.TS_ChannelMonitor_transactions_confirmed(this_arg, encodeUint8Array(header), txdata, height, broadcaster, fee_estimator, logger);
12358                 return nativeResponseValue;
12359         }
12360         // 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);
12361         export function ChannelMonitor_transaction_unconfirmed(this_arg: number, txid: Uint8Array, broadcaster: number, fee_estimator: number, logger: number): void {
12362                 if(!isWasmInitialized) {
12363                         throw new Error("initializeWasm() must be awaited first!");
12364                 }
12365                 const nativeResponseValue = wasm.TS_ChannelMonitor_transaction_unconfirmed(this_arg, encodeUint8Array(txid), broadcaster, fee_estimator, logger);
12366                 // debug statements here
12367         }
12368         // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ChannelMonitor_best_block_updated(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, struct LDKLogger logger);
12369         export function ChannelMonitor_best_block_updated(this_arg: number, header: Uint8Array, height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
12370                 if(!isWasmInitialized) {
12371                         throw new Error("initializeWasm() must be awaited first!");
12372                 }
12373                 const nativeResponseValue = wasm.TS_ChannelMonitor_best_block_updated(this_arg, encodeUint8Array(header), height, broadcaster, fee_estimator, logger);
12374                 return nativeResponseValue;
12375         }
12376         // MUST_USE_RES struct LDKCVec_TxidZ ChannelMonitor_get_relevant_txids(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
12377         export function ChannelMonitor_get_relevant_txids(this_arg: number): Uint8Array[] {
12378                 if(!isWasmInitialized) {
12379                         throw new Error("initializeWasm() must be awaited first!");
12380                 }
12381                 const nativeResponseValue = wasm.TS_ChannelMonitor_get_relevant_txids(this_arg);
12382                 return nativeResponseValue;
12383         }
12384         // MUST_USE_RES struct LDKBestBlock ChannelMonitor_current_best_block(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
12385         export function ChannelMonitor_current_best_block(this_arg: number): number {
12386                 if(!isWasmInitialized) {
12387                         throw new Error("initializeWasm() must be awaited first!");
12388                 }
12389                 const nativeResponseValue = wasm.TS_ChannelMonitor_current_best_block(this_arg);
12390                 return nativeResponseValue;
12391         }
12392         // MUST_USE_RES struct LDKCVec_BalanceZ ChannelMonitor_get_claimable_balances(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
12393         export function ChannelMonitor_get_claimable_balances(this_arg: number): number[] {
12394                 if(!isWasmInitialized) {
12395                         throw new Error("initializeWasm() must be awaited first!");
12396                 }
12397                 const nativeResponseValue = wasm.TS_ChannelMonitor_get_claimable_balances(this_arg);
12398                 return nativeResponseValue;
12399         }
12400         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ C2Tuple_BlockHashChannelMonitorZ_read(struct LDKu8slice ser, const struct LDKKeysInterface *NONNULL_PTR arg);
12401         export function C2Tuple_BlockHashChannelMonitorZ_read(ser: Uint8Array, arg: number): number {
12402                 if(!isWasmInitialized) {
12403                         throw new Error("initializeWasm() must be awaited first!");
12404                 }
12405                 const nativeResponseValue = wasm.TS_C2Tuple_BlockHashChannelMonitorZ_read(encodeUint8Array(ser), arg);
12406                 return nativeResponseValue;
12407         }
12408         // void OutPoint_free(struct LDKOutPoint this_obj);
12409         export function OutPoint_free(this_obj: number): void {
12410                 if(!isWasmInitialized) {
12411                         throw new Error("initializeWasm() must be awaited first!");
12412                 }
12413                 const nativeResponseValue = wasm.TS_OutPoint_free(this_obj);
12414                 // debug statements here
12415         }
12416         // const uint8_t (*OutPoint_get_txid(const struct LDKOutPoint *NONNULL_PTR this_ptr))[32];
12417         export function OutPoint_get_txid(this_ptr: number): Uint8Array {
12418                 if(!isWasmInitialized) {
12419                         throw new Error("initializeWasm() must be awaited first!");
12420                 }
12421                 const nativeResponseValue = wasm.TS_OutPoint_get_txid(this_ptr);
12422                 return decodeUint8Array(nativeResponseValue);
12423         }
12424         // void OutPoint_set_txid(struct LDKOutPoint *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12425         export function OutPoint_set_txid(this_ptr: number, val: Uint8Array): void {
12426                 if(!isWasmInitialized) {
12427                         throw new Error("initializeWasm() must be awaited first!");
12428                 }
12429                 const nativeResponseValue = wasm.TS_OutPoint_set_txid(this_ptr, encodeUint8Array(val));
12430                 // debug statements here
12431         }
12432         // uint16_t OutPoint_get_index(const struct LDKOutPoint *NONNULL_PTR this_ptr);
12433         export function OutPoint_get_index(this_ptr: number): number {
12434                 if(!isWasmInitialized) {
12435                         throw new Error("initializeWasm() must be awaited first!");
12436                 }
12437                 const nativeResponseValue = wasm.TS_OutPoint_get_index(this_ptr);
12438                 return nativeResponseValue;
12439         }
12440         // void OutPoint_set_index(struct LDKOutPoint *NONNULL_PTR this_ptr, uint16_t val);
12441         export function OutPoint_set_index(this_ptr: number, val: number): void {
12442                 if(!isWasmInitialized) {
12443                         throw new Error("initializeWasm() must be awaited first!");
12444                 }
12445                 const nativeResponseValue = wasm.TS_OutPoint_set_index(this_ptr, val);
12446                 // debug statements here
12447         }
12448         // MUST_USE_RES struct LDKOutPoint OutPoint_new(struct LDKThirtyTwoBytes txid_arg, uint16_t index_arg);
12449         export function OutPoint_new(txid_arg: Uint8Array, index_arg: number): number {
12450                 if(!isWasmInitialized) {
12451                         throw new Error("initializeWasm() must be awaited first!");
12452                 }
12453                 const nativeResponseValue = wasm.TS_OutPoint_new(encodeUint8Array(txid_arg), index_arg);
12454                 return nativeResponseValue;
12455         }
12456         // uint64_t OutPoint_clone_ptr(LDKOutPoint *NONNULL_PTR arg);
12457         export function OutPoint_clone_ptr(arg: number): number {
12458                 if(!isWasmInitialized) {
12459                         throw new Error("initializeWasm() must be awaited first!");
12460                 }
12461                 const nativeResponseValue = wasm.TS_OutPoint_clone_ptr(arg);
12462                 return nativeResponseValue;
12463         }
12464         // struct LDKOutPoint OutPoint_clone(const struct LDKOutPoint *NONNULL_PTR orig);
12465         export function OutPoint_clone(orig: number): number {
12466                 if(!isWasmInitialized) {
12467                         throw new Error("initializeWasm() must be awaited first!");
12468                 }
12469                 const nativeResponseValue = wasm.TS_OutPoint_clone(orig);
12470                 return nativeResponseValue;
12471         }
12472         // bool OutPoint_eq(const struct LDKOutPoint *NONNULL_PTR a, const struct LDKOutPoint *NONNULL_PTR b);
12473         export function OutPoint_eq(a: number, b: number): boolean {
12474                 if(!isWasmInitialized) {
12475                         throw new Error("initializeWasm() must be awaited first!");
12476                 }
12477                 const nativeResponseValue = wasm.TS_OutPoint_eq(a, b);
12478                 return nativeResponseValue;
12479         }
12480         // uint64_t OutPoint_hash(const struct LDKOutPoint *NONNULL_PTR o);
12481         export function OutPoint_hash(o: number): number {
12482                 if(!isWasmInitialized) {
12483                         throw new Error("initializeWasm() must be awaited first!");
12484                 }
12485                 const nativeResponseValue = wasm.TS_OutPoint_hash(o);
12486                 return nativeResponseValue;
12487         }
12488         // MUST_USE_RES struct LDKThirtyTwoBytes OutPoint_to_channel_id(const struct LDKOutPoint *NONNULL_PTR this_arg);
12489         export function OutPoint_to_channel_id(this_arg: number): Uint8Array {
12490                 if(!isWasmInitialized) {
12491                         throw new Error("initializeWasm() must be awaited first!");
12492                 }
12493                 const nativeResponseValue = wasm.TS_OutPoint_to_channel_id(this_arg);
12494                 return decodeUint8Array(nativeResponseValue);
12495         }
12496         // struct LDKCVec_u8Z OutPoint_write(const struct LDKOutPoint *NONNULL_PTR obj);
12497         export function OutPoint_write(obj: number): Uint8Array {
12498                 if(!isWasmInitialized) {
12499                         throw new Error("initializeWasm() must be awaited first!");
12500                 }
12501                 const nativeResponseValue = wasm.TS_OutPoint_write(obj);
12502                 return decodeUint8Array(nativeResponseValue);
12503         }
12504         // struct LDKCResult_OutPointDecodeErrorZ OutPoint_read(struct LDKu8slice ser);
12505         export function OutPoint_read(ser: Uint8Array): number {
12506                 if(!isWasmInitialized) {
12507                         throw new Error("initializeWasm() must be awaited first!");
12508                 }
12509                 const nativeResponseValue = wasm.TS_OutPoint_read(encodeUint8Array(ser));
12510                 return nativeResponseValue;
12511         }
12512         // void DelayedPaymentOutputDescriptor_free(struct LDKDelayedPaymentOutputDescriptor this_obj);
12513         export function DelayedPaymentOutputDescriptor_free(this_obj: number): void {
12514                 if(!isWasmInitialized) {
12515                         throw new Error("initializeWasm() must be awaited first!");
12516                 }
12517                 const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_free(this_obj);
12518                 // debug statements here
12519         }
12520         // struct LDKOutPoint DelayedPaymentOutputDescriptor_get_outpoint(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
12521         export function DelayedPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
12522                 if(!isWasmInitialized) {
12523                         throw new Error("initializeWasm() must be awaited first!");
12524                 }
12525                 const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_get_outpoint(this_ptr);
12526                 return nativeResponseValue;
12527         }
12528         // void DelayedPaymentOutputDescriptor_set_outpoint(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
12529         export function DelayedPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
12530                 if(!isWasmInitialized) {
12531                         throw new Error("initializeWasm() must be awaited first!");
12532                 }
12533                 const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_set_outpoint(this_ptr, val);
12534                 // debug statements here
12535         }
12536         // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_per_commitment_point(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
12537         export function DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr: number): Uint8Array {
12538                 if(!isWasmInitialized) {
12539                         throw new Error("initializeWasm() must be awaited first!");
12540                 }
12541                 const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr);
12542                 return decodeUint8Array(nativeResponseValue);
12543         }
12544         // void DelayedPaymentOutputDescriptor_set_per_commitment_point(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12545         export function DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
12546                 if(!isWasmInitialized) {
12547                         throw new Error("initializeWasm() must be awaited first!");
12548                 }
12549                 const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr, encodeUint8Array(val));
12550                 // debug statements here
12551         }
12552         // uint16_t DelayedPaymentOutputDescriptor_get_to_self_delay(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
12553         export function DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr: number): number {
12554                 if(!isWasmInitialized) {
12555                         throw new Error("initializeWasm() must be awaited first!");
12556                 }
12557                 const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr);
12558                 return nativeResponseValue;
12559         }
12560         // void DelayedPaymentOutputDescriptor_set_to_self_delay(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint16_t val);
12561         export function DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr: number, val: number): void {
12562                 if(!isWasmInitialized) {
12563                         throw new Error("initializeWasm() must be awaited first!");
12564                 }
12565                 const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr, val);
12566                 // debug statements here
12567         }
12568         // void DelayedPaymentOutputDescriptor_set_output(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
12569         export function DelayedPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
12570                 if(!isWasmInitialized) {
12571                         throw new Error("initializeWasm() must be awaited first!");
12572                 }
12573                 const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_set_output(this_ptr, val);
12574                 // debug statements here
12575         }
12576         // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_revocation_pubkey(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
12577         export function DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr: number): Uint8Array {
12578                 if(!isWasmInitialized) {
12579                         throw new Error("initializeWasm() must be awaited first!");
12580                 }
12581                 const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr);
12582                 return decodeUint8Array(nativeResponseValue);
12583         }
12584         // void DelayedPaymentOutputDescriptor_set_revocation_pubkey(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12585         export function DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr: number, val: Uint8Array): void {
12586                 if(!isWasmInitialized) {
12587                         throw new Error("initializeWasm() must be awaited first!");
12588                 }
12589                 const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr, encodeUint8Array(val));
12590                 // debug statements here
12591         }
12592         // const uint8_t (*DelayedPaymentOutputDescriptor_get_channel_keys_id(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
12593         export function DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): Uint8Array {
12594                 if(!isWasmInitialized) {
12595                         throw new Error("initializeWasm() must be awaited first!");
12596                 }
12597                 const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
12598                 return decodeUint8Array(nativeResponseValue);
12599         }
12600         // void DelayedPaymentOutputDescriptor_set_channel_keys_id(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12601         export function DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: Uint8Array): void {
12602                 if(!isWasmInitialized) {
12603                         throw new Error("initializeWasm() must be awaited first!");
12604                 }
12605                 const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr, encodeUint8Array(val));
12606                 // debug statements here
12607         }
12608         // uint64_t DelayedPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
12609         export function DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): number {
12610                 if(!isWasmInitialized) {
12611                         throw new Error("initializeWasm() must be awaited first!");
12612                 }
12613                 const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
12614                 return nativeResponseValue;
12615         }
12616         // void DelayedPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
12617         export function DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: number): void {
12618                 if(!isWasmInitialized) {
12619                         throw new Error("initializeWasm() must be awaited first!");
12620                 }
12621                 const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
12622                 // debug statements here
12623         }
12624         // 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);
12625         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 {
12626                 if(!isWasmInitialized) {
12627                         throw new Error("initializeWasm() must be awaited first!");
12628                 }
12629                 const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_new(outpoint_arg, encodeUint8Array(per_commitment_point_arg), to_self_delay_arg, output_arg, encodeUint8Array(revocation_pubkey_arg), encodeUint8Array(channel_keys_id_arg), channel_value_satoshis_arg);
12630                 return nativeResponseValue;
12631         }
12632         // uint64_t DelayedPaymentOutputDescriptor_clone_ptr(LDKDelayedPaymentOutputDescriptor *NONNULL_PTR arg);
12633         export function DelayedPaymentOutputDescriptor_clone_ptr(arg: number): number {
12634                 if(!isWasmInitialized) {
12635                         throw new Error("initializeWasm() must be awaited first!");
12636                 }
12637                 const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_clone_ptr(arg);
12638                 return nativeResponseValue;
12639         }
12640         // struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_clone(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR orig);
12641         export function DelayedPaymentOutputDescriptor_clone(orig: number): number {
12642                 if(!isWasmInitialized) {
12643                         throw new Error("initializeWasm() must be awaited first!");
12644                 }
12645                 const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_clone(orig);
12646                 return nativeResponseValue;
12647         }
12648         // struct LDKCVec_u8Z DelayedPaymentOutputDescriptor_write(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR obj);
12649         export function DelayedPaymentOutputDescriptor_write(obj: number): Uint8Array {
12650                 if(!isWasmInitialized) {
12651                         throw new Error("initializeWasm() must be awaited first!");
12652                 }
12653                 const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_write(obj);
12654                 return decodeUint8Array(nativeResponseValue);
12655         }
12656         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ DelayedPaymentOutputDescriptor_read(struct LDKu8slice ser);
12657         export function DelayedPaymentOutputDescriptor_read(ser: Uint8Array): number {
12658                 if(!isWasmInitialized) {
12659                         throw new Error("initializeWasm() must be awaited first!");
12660                 }
12661                 const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_read(encodeUint8Array(ser));
12662                 return nativeResponseValue;
12663         }
12664         // void StaticPaymentOutputDescriptor_free(struct LDKStaticPaymentOutputDescriptor this_obj);
12665         export function StaticPaymentOutputDescriptor_free(this_obj: number): void {
12666                 if(!isWasmInitialized) {
12667                         throw new Error("initializeWasm() must be awaited first!");
12668                 }
12669                 const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_free(this_obj);
12670                 // debug statements here
12671         }
12672         // struct LDKOutPoint StaticPaymentOutputDescriptor_get_outpoint(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
12673         export function StaticPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
12674                 if(!isWasmInitialized) {
12675                         throw new Error("initializeWasm() must be awaited first!");
12676                 }
12677                 const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_get_outpoint(this_ptr);
12678                 return nativeResponseValue;
12679         }
12680         // void StaticPaymentOutputDescriptor_set_outpoint(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
12681         export function StaticPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
12682                 if(!isWasmInitialized) {
12683                         throw new Error("initializeWasm() must be awaited first!");
12684                 }
12685                 const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_set_outpoint(this_ptr, val);
12686                 // debug statements here
12687         }
12688         // void StaticPaymentOutputDescriptor_set_output(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
12689         export function StaticPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
12690                 if(!isWasmInitialized) {
12691                         throw new Error("initializeWasm() must be awaited first!");
12692                 }
12693                 const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_set_output(this_ptr, val);
12694                 // debug statements here
12695         }
12696         // const uint8_t (*StaticPaymentOutputDescriptor_get_channel_keys_id(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
12697         export function StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): Uint8Array {
12698                 if(!isWasmInitialized) {
12699                         throw new Error("initializeWasm() must be awaited first!");
12700                 }
12701                 const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
12702                 return decodeUint8Array(nativeResponseValue);
12703         }
12704         // void StaticPaymentOutputDescriptor_set_channel_keys_id(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12705         export function StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: Uint8Array): void {
12706                 if(!isWasmInitialized) {
12707                         throw new Error("initializeWasm() must be awaited first!");
12708                 }
12709                 const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr, encodeUint8Array(val));
12710                 // debug statements here
12711         }
12712         // uint64_t StaticPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
12713         export function StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): number {
12714                 if(!isWasmInitialized) {
12715                         throw new Error("initializeWasm() must be awaited first!");
12716                 }
12717                 const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
12718                 return nativeResponseValue;
12719         }
12720         // void StaticPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
12721         export function StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: number): void {
12722                 if(!isWasmInitialized) {
12723                         throw new Error("initializeWasm() must be awaited first!");
12724                 }
12725                 const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
12726                 // debug statements here
12727         }
12728         // 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);
12729         export function StaticPaymentOutputDescriptor_new(outpoint_arg: number, output_arg: number, channel_keys_id_arg: Uint8Array, channel_value_satoshis_arg: number): number {
12730                 if(!isWasmInitialized) {
12731                         throw new Error("initializeWasm() must be awaited first!");
12732                 }
12733                 const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_new(outpoint_arg, output_arg, encodeUint8Array(channel_keys_id_arg), channel_value_satoshis_arg);
12734                 return nativeResponseValue;
12735         }
12736         // uint64_t StaticPaymentOutputDescriptor_clone_ptr(LDKStaticPaymentOutputDescriptor *NONNULL_PTR arg);
12737         export function StaticPaymentOutputDescriptor_clone_ptr(arg: number): number {
12738                 if(!isWasmInitialized) {
12739                         throw new Error("initializeWasm() must be awaited first!");
12740                 }
12741                 const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_clone_ptr(arg);
12742                 return nativeResponseValue;
12743         }
12744         // struct LDKStaticPaymentOutputDescriptor StaticPaymentOutputDescriptor_clone(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR orig);
12745         export function StaticPaymentOutputDescriptor_clone(orig: number): number {
12746                 if(!isWasmInitialized) {
12747                         throw new Error("initializeWasm() must be awaited first!");
12748                 }
12749                 const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_clone(orig);
12750                 return nativeResponseValue;
12751         }
12752         // struct LDKCVec_u8Z StaticPaymentOutputDescriptor_write(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR obj);
12753         export function StaticPaymentOutputDescriptor_write(obj: number): Uint8Array {
12754                 if(!isWasmInitialized) {
12755                         throw new Error("initializeWasm() must be awaited first!");
12756                 }
12757                 const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_write(obj);
12758                 return decodeUint8Array(nativeResponseValue);
12759         }
12760         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ StaticPaymentOutputDescriptor_read(struct LDKu8slice ser);
12761         export function StaticPaymentOutputDescriptor_read(ser: Uint8Array): number {
12762                 if(!isWasmInitialized) {
12763                         throw new Error("initializeWasm() must be awaited first!");
12764                 }
12765                 const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_read(encodeUint8Array(ser));
12766                 return nativeResponseValue;
12767         }
12768         // void SpendableOutputDescriptor_free(struct LDKSpendableOutputDescriptor this_ptr);
12769         export function SpendableOutputDescriptor_free(this_ptr: number): void {
12770                 if(!isWasmInitialized) {
12771                         throw new Error("initializeWasm() must be awaited first!");
12772                 }
12773                 const nativeResponseValue = wasm.TS_SpendableOutputDescriptor_free(this_ptr);
12774                 // debug statements here
12775         }
12776         // uint64_t SpendableOutputDescriptor_clone_ptr(LDKSpendableOutputDescriptor *NONNULL_PTR arg);
12777         export function SpendableOutputDescriptor_clone_ptr(arg: number): number {
12778                 if(!isWasmInitialized) {
12779                         throw new Error("initializeWasm() must be awaited first!");
12780                 }
12781                 const nativeResponseValue = wasm.TS_SpendableOutputDescriptor_clone_ptr(arg);
12782                 return nativeResponseValue;
12783         }
12784         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_clone(const struct LDKSpendableOutputDescriptor *NONNULL_PTR orig);
12785         export function SpendableOutputDescriptor_clone(orig: number): number {
12786                 if(!isWasmInitialized) {
12787                         throw new Error("initializeWasm() must be awaited first!");
12788                 }
12789                 const nativeResponseValue = wasm.TS_SpendableOutputDescriptor_clone(orig);
12790                 return nativeResponseValue;
12791         }
12792         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_static_output(struct LDKOutPoint outpoint, struct LDKTxOut output);
12793         export function SpendableOutputDescriptor_static_output(outpoint: number, output: number): number {
12794                 if(!isWasmInitialized) {
12795                         throw new Error("initializeWasm() must be awaited first!");
12796                 }
12797                 const nativeResponseValue = wasm.TS_SpendableOutputDescriptor_static_output(outpoint, output);
12798                 return nativeResponseValue;
12799         }
12800         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_delayed_payment_output(struct LDKDelayedPaymentOutputDescriptor a);
12801         export function SpendableOutputDescriptor_delayed_payment_output(a: number): number {
12802                 if(!isWasmInitialized) {
12803                         throw new Error("initializeWasm() must be awaited first!");
12804                 }
12805                 const nativeResponseValue = wasm.TS_SpendableOutputDescriptor_delayed_payment_output(a);
12806                 return nativeResponseValue;
12807         }
12808         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_static_payment_output(struct LDKStaticPaymentOutputDescriptor a);
12809         export function SpendableOutputDescriptor_static_payment_output(a: number): number {
12810                 if(!isWasmInitialized) {
12811                         throw new Error("initializeWasm() must be awaited first!");
12812                 }
12813                 const nativeResponseValue = wasm.TS_SpendableOutputDescriptor_static_payment_output(a);
12814                 return nativeResponseValue;
12815         }
12816         // struct LDKCVec_u8Z SpendableOutputDescriptor_write(const struct LDKSpendableOutputDescriptor *NONNULL_PTR obj);
12817         export function SpendableOutputDescriptor_write(obj: number): Uint8Array {
12818                 if(!isWasmInitialized) {
12819                         throw new Error("initializeWasm() must be awaited first!");
12820                 }
12821                 const nativeResponseValue = wasm.TS_SpendableOutputDescriptor_write(obj);
12822                 return decodeUint8Array(nativeResponseValue);
12823         }
12824         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ SpendableOutputDescriptor_read(struct LDKu8slice ser);
12825         export function SpendableOutputDescriptor_read(ser: Uint8Array): number {
12826                 if(!isWasmInitialized) {
12827                         throw new Error("initializeWasm() must be awaited first!");
12828                 }
12829                 const nativeResponseValue = wasm.TS_SpendableOutputDescriptor_read(encodeUint8Array(ser));
12830                 return nativeResponseValue;
12831         }
12832         // void BaseSign_free(struct LDKBaseSign this_ptr);
12833         export function BaseSign_free(this_ptr: number): void {
12834                 if(!isWasmInitialized) {
12835                         throw new Error("initializeWasm() must be awaited first!");
12836                 }
12837                 const nativeResponseValue = wasm.TS_BaseSign_free(this_ptr);
12838                 // debug statements here
12839         }
12840         // uint64_t Sign_clone_ptr(LDKSign *NONNULL_PTR arg);
12841         export function Sign_clone_ptr(arg: number): number {
12842                 if(!isWasmInitialized) {
12843                         throw new Error("initializeWasm() must be awaited first!");
12844                 }
12845                 const nativeResponseValue = wasm.TS_Sign_clone_ptr(arg);
12846                 return nativeResponseValue;
12847         }
12848         // struct LDKSign Sign_clone(const struct LDKSign *NONNULL_PTR orig);
12849         export function Sign_clone(orig: number): number {
12850                 if(!isWasmInitialized) {
12851                         throw new Error("initializeWasm() must be awaited first!");
12852                 }
12853                 const nativeResponseValue = wasm.TS_Sign_clone(orig);
12854                 return nativeResponseValue;
12855         }
12856         // void Sign_free(struct LDKSign this_ptr);
12857         export function Sign_free(this_ptr: number): void {
12858                 if(!isWasmInitialized) {
12859                         throw new Error("initializeWasm() must be awaited first!");
12860                 }
12861                 const nativeResponseValue = wasm.TS_Sign_free(this_ptr);
12862                 // debug statements here
12863         }
12864         // void KeysInterface_free(struct LDKKeysInterface this_ptr);
12865         export function KeysInterface_free(this_ptr: number): void {
12866                 if(!isWasmInitialized) {
12867                         throw new Error("initializeWasm() must be awaited first!");
12868                 }
12869                 const nativeResponseValue = wasm.TS_KeysInterface_free(this_ptr);
12870                 // debug statements here
12871         }
12872         // void InMemorySigner_free(struct LDKInMemorySigner this_obj);
12873         export function InMemorySigner_free(this_obj: number): void {
12874                 if(!isWasmInitialized) {
12875                         throw new Error("initializeWasm() must be awaited first!");
12876                 }
12877                 const nativeResponseValue = wasm.TS_InMemorySigner_free(this_obj);
12878                 // debug statements here
12879         }
12880         // const uint8_t (*InMemorySigner_get_funding_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
12881         export function InMemorySigner_get_funding_key(this_ptr: number): Uint8Array {
12882                 if(!isWasmInitialized) {
12883                         throw new Error("initializeWasm() must be awaited first!");
12884                 }
12885                 const nativeResponseValue = wasm.TS_InMemorySigner_get_funding_key(this_ptr);
12886                 return decodeUint8Array(nativeResponseValue);
12887         }
12888         // void InMemorySigner_set_funding_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
12889         export function InMemorySigner_set_funding_key(this_ptr: number, val: Uint8Array): void {
12890                 if(!isWasmInitialized) {
12891                         throw new Error("initializeWasm() must be awaited first!");
12892                 }
12893                 const nativeResponseValue = wasm.TS_InMemorySigner_set_funding_key(this_ptr, encodeUint8Array(val));
12894                 // debug statements here
12895         }
12896         // const uint8_t (*InMemorySigner_get_revocation_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
12897         export function InMemorySigner_get_revocation_base_key(this_ptr: number): Uint8Array {
12898                 if(!isWasmInitialized) {
12899                         throw new Error("initializeWasm() must be awaited first!");
12900                 }
12901                 const nativeResponseValue = wasm.TS_InMemorySigner_get_revocation_base_key(this_ptr);
12902                 return decodeUint8Array(nativeResponseValue);
12903         }
12904         // void InMemorySigner_set_revocation_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
12905         export function InMemorySigner_set_revocation_base_key(this_ptr: number, val: Uint8Array): void {
12906                 if(!isWasmInitialized) {
12907                         throw new Error("initializeWasm() must be awaited first!");
12908                 }
12909                 const nativeResponseValue = wasm.TS_InMemorySigner_set_revocation_base_key(this_ptr, encodeUint8Array(val));
12910                 // debug statements here
12911         }
12912         // const uint8_t (*InMemorySigner_get_payment_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
12913         export function InMemorySigner_get_payment_key(this_ptr: number): Uint8Array {
12914                 if(!isWasmInitialized) {
12915                         throw new Error("initializeWasm() must be awaited first!");
12916                 }
12917                 const nativeResponseValue = wasm.TS_InMemorySigner_get_payment_key(this_ptr);
12918                 return decodeUint8Array(nativeResponseValue);
12919         }
12920         // void InMemorySigner_set_payment_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
12921         export function InMemorySigner_set_payment_key(this_ptr: number, val: Uint8Array): void {
12922                 if(!isWasmInitialized) {
12923                         throw new Error("initializeWasm() must be awaited first!");
12924                 }
12925                 const nativeResponseValue = wasm.TS_InMemorySigner_set_payment_key(this_ptr, encodeUint8Array(val));
12926                 // debug statements here
12927         }
12928         // const uint8_t (*InMemorySigner_get_delayed_payment_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
12929         export function InMemorySigner_get_delayed_payment_base_key(this_ptr: number): Uint8Array {
12930                 if(!isWasmInitialized) {
12931                         throw new Error("initializeWasm() must be awaited first!");
12932                 }
12933                 const nativeResponseValue = wasm.TS_InMemorySigner_get_delayed_payment_base_key(this_ptr);
12934                 return decodeUint8Array(nativeResponseValue);
12935         }
12936         // void InMemorySigner_set_delayed_payment_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
12937         export function InMemorySigner_set_delayed_payment_base_key(this_ptr: number, val: Uint8Array): void {
12938                 if(!isWasmInitialized) {
12939                         throw new Error("initializeWasm() must be awaited first!");
12940                 }
12941                 const nativeResponseValue = wasm.TS_InMemorySigner_set_delayed_payment_base_key(this_ptr, encodeUint8Array(val));
12942                 // debug statements here
12943         }
12944         // const uint8_t (*InMemorySigner_get_htlc_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
12945         export function InMemorySigner_get_htlc_base_key(this_ptr: number): Uint8Array {
12946                 if(!isWasmInitialized) {
12947                         throw new Error("initializeWasm() must be awaited first!");
12948                 }
12949                 const nativeResponseValue = wasm.TS_InMemorySigner_get_htlc_base_key(this_ptr);
12950                 return decodeUint8Array(nativeResponseValue);
12951         }
12952         // void InMemorySigner_set_htlc_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
12953         export function InMemorySigner_set_htlc_base_key(this_ptr: number, val: Uint8Array): void {
12954                 if(!isWasmInitialized) {
12955                         throw new Error("initializeWasm() must be awaited first!");
12956                 }
12957                 const nativeResponseValue = wasm.TS_InMemorySigner_set_htlc_base_key(this_ptr, encodeUint8Array(val));
12958                 // debug statements here
12959         }
12960         // const uint8_t (*InMemorySigner_get_commitment_seed(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
12961         export function InMemorySigner_get_commitment_seed(this_ptr: number): Uint8Array {
12962                 if(!isWasmInitialized) {
12963                         throw new Error("initializeWasm() must be awaited first!");
12964                 }
12965                 const nativeResponseValue = wasm.TS_InMemorySigner_get_commitment_seed(this_ptr);
12966                 return decodeUint8Array(nativeResponseValue);
12967         }
12968         // void InMemorySigner_set_commitment_seed(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12969         export function InMemorySigner_set_commitment_seed(this_ptr: number, val: Uint8Array): void {
12970                 if(!isWasmInitialized) {
12971                         throw new Error("initializeWasm() must be awaited first!");
12972                 }
12973                 const nativeResponseValue = wasm.TS_InMemorySigner_set_commitment_seed(this_ptr, encodeUint8Array(val));
12974                 // debug statements here
12975         }
12976         // uint64_t InMemorySigner_clone_ptr(LDKInMemorySigner *NONNULL_PTR arg);
12977         export function InMemorySigner_clone_ptr(arg: number): number {
12978                 if(!isWasmInitialized) {
12979                         throw new Error("initializeWasm() must be awaited first!");
12980                 }
12981                 const nativeResponseValue = wasm.TS_InMemorySigner_clone_ptr(arg);
12982                 return nativeResponseValue;
12983         }
12984         // struct LDKInMemorySigner InMemorySigner_clone(const struct LDKInMemorySigner *NONNULL_PTR orig);
12985         export function InMemorySigner_clone(orig: number): number {
12986                 if(!isWasmInitialized) {
12987                         throw new Error("initializeWasm() must be awaited first!");
12988                 }
12989                 const nativeResponseValue = wasm.TS_InMemorySigner_clone(orig);
12990                 return nativeResponseValue;
12991         }
12992         // 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);
12993         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 {
12994                 if(!isWasmInitialized) {
12995                         throw new Error("initializeWasm() must be awaited first!");
12996                 }
12997                 const nativeResponseValue = wasm.TS_InMemorySigner_new(encodeUint8Array(funding_key), encodeUint8Array(revocation_base_key), encodeUint8Array(payment_key), encodeUint8Array(delayed_payment_base_key), encodeUint8Array(htlc_base_key), encodeUint8Array(commitment_seed), channel_value_satoshis, encodeUint8Array(channel_keys_id));
12998                 return nativeResponseValue;
12999         }
13000         // MUST_USE_RES struct LDKChannelPublicKeys InMemorySigner_counterparty_pubkeys(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
13001         export function InMemorySigner_counterparty_pubkeys(this_arg: number): number {
13002                 if(!isWasmInitialized) {
13003                         throw new Error("initializeWasm() must be awaited first!");
13004                 }
13005                 const nativeResponseValue = wasm.TS_InMemorySigner_counterparty_pubkeys(this_arg);
13006                 return nativeResponseValue;
13007         }
13008         // MUST_USE_RES uint16_t InMemorySigner_counterparty_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
13009         export function InMemorySigner_counterparty_selected_contest_delay(this_arg: number): number {
13010                 if(!isWasmInitialized) {
13011                         throw new Error("initializeWasm() must be awaited first!");
13012                 }
13013                 const nativeResponseValue = wasm.TS_InMemorySigner_counterparty_selected_contest_delay(this_arg);
13014                 return nativeResponseValue;
13015         }
13016         // MUST_USE_RES uint16_t InMemorySigner_holder_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
13017         export function InMemorySigner_holder_selected_contest_delay(this_arg: number): number {
13018                 if(!isWasmInitialized) {
13019                         throw new Error("initializeWasm() must be awaited first!");
13020                 }
13021                 const nativeResponseValue = wasm.TS_InMemorySigner_holder_selected_contest_delay(this_arg);
13022                 return nativeResponseValue;
13023         }
13024         // MUST_USE_RES bool InMemorySigner_is_outbound(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
13025         export function InMemorySigner_is_outbound(this_arg: number): boolean {
13026                 if(!isWasmInitialized) {
13027                         throw new Error("initializeWasm() must be awaited first!");
13028                 }
13029                 const nativeResponseValue = wasm.TS_InMemorySigner_is_outbound(this_arg);
13030                 return nativeResponseValue;
13031         }
13032         // MUST_USE_RES struct LDKOutPoint InMemorySigner_funding_outpoint(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
13033         export function InMemorySigner_funding_outpoint(this_arg: number): number {
13034                 if(!isWasmInitialized) {
13035                         throw new Error("initializeWasm() must be awaited first!");
13036                 }
13037                 const nativeResponseValue = wasm.TS_InMemorySigner_funding_outpoint(this_arg);
13038                 return nativeResponseValue;
13039         }
13040         // MUST_USE_RES struct LDKChannelTransactionParameters InMemorySigner_get_channel_parameters(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
13041         export function InMemorySigner_get_channel_parameters(this_arg: number): number {
13042                 if(!isWasmInitialized) {
13043                         throw new Error("initializeWasm() must be awaited first!");
13044                 }
13045                 const nativeResponseValue = wasm.TS_InMemorySigner_get_channel_parameters(this_arg);
13046                 return nativeResponseValue;
13047         }
13048         // MUST_USE_RES bool InMemorySigner_opt_anchors(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
13049         export function InMemorySigner_opt_anchors(this_arg: number): boolean {
13050                 if(!isWasmInitialized) {
13051                         throw new Error("initializeWasm() must be awaited first!");
13052                 }
13053                 const nativeResponseValue = wasm.TS_InMemorySigner_opt_anchors(this_arg);
13054                 return nativeResponseValue;
13055         }
13056         // 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);
13057         export function InMemorySigner_sign_counterparty_payment_input(this_arg: number, spend_tx: Uint8Array, input_idx: number, descriptor: number): number {
13058                 if(!isWasmInitialized) {
13059                         throw new Error("initializeWasm() must be awaited first!");
13060                 }
13061                 const nativeResponseValue = wasm.TS_InMemorySigner_sign_counterparty_payment_input(this_arg, encodeUint8Array(spend_tx), input_idx, descriptor);
13062                 return nativeResponseValue;
13063         }
13064         // 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);
13065         export function InMemorySigner_sign_dynamic_p2wsh_input(this_arg: number, spend_tx: Uint8Array, input_idx: number, descriptor: number): number {
13066                 if(!isWasmInitialized) {
13067                         throw new Error("initializeWasm() must be awaited first!");
13068                 }
13069                 const nativeResponseValue = wasm.TS_InMemorySigner_sign_dynamic_p2wsh_input(this_arg, encodeUint8Array(spend_tx), input_idx, descriptor);
13070                 return nativeResponseValue;
13071         }
13072         // struct LDKBaseSign InMemorySigner_as_BaseSign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
13073         export function InMemorySigner_as_BaseSign(this_arg: number): number {
13074                 if(!isWasmInitialized) {
13075                         throw new Error("initializeWasm() must be awaited first!");
13076                 }
13077                 const nativeResponseValue = wasm.TS_InMemorySigner_as_BaseSign(this_arg);
13078                 return nativeResponseValue;
13079         }
13080         // struct LDKSign InMemorySigner_as_Sign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
13081         export function InMemorySigner_as_Sign(this_arg: number): number {
13082                 if(!isWasmInitialized) {
13083                         throw new Error("initializeWasm() must be awaited first!");
13084                 }
13085                 const nativeResponseValue = wasm.TS_InMemorySigner_as_Sign(this_arg);
13086                 return nativeResponseValue;
13087         }
13088         // struct LDKCVec_u8Z InMemorySigner_write(const struct LDKInMemorySigner *NONNULL_PTR obj);
13089         export function InMemorySigner_write(obj: number): Uint8Array {
13090                 if(!isWasmInitialized) {
13091                         throw new Error("initializeWasm() must be awaited first!");
13092                 }
13093                 const nativeResponseValue = wasm.TS_InMemorySigner_write(obj);
13094                 return decodeUint8Array(nativeResponseValue);
13095         }
13096         // struct LDKCResult_InMemorySignerDecodeErrorZ InMemorySigner_read(struct LDKu8slice ser);
13097         export function InMemorySigner_read(ser: Uint8Array): number {
13098                 if(!isWasmInitialized) {
13099                         throw new Error("initializeWasm() must be awaited first!");
13100                 }
13101                 const nativeResponseValue = wasm.TS_InMemorySigner_read(encodeUint8Array(ser));
13102                 return nativeResponseValue;
13103         }
13104         // void KeysManager_free(struct LDKKeysManager this_obj);
13105         export function KeysManager_free(this_obj: number): void {
13106                 if(!isWasmInitialized) {
13107                         throw new Error("initializeWasm() must be awaited first!");
13108                 }
13109                 const nativeResponseValue = wasm.TS_KeysManager_free(this_obj);
13110                 // debug statements here
13111         }
13112         // MUST_USE_RES struct LDKKeysManager KeysManager_new(const uint8_t (*seed)[32], uint64_t starting_time_secs, uint32_t starting_time_nanos);
13113         export function KeysManager_new(seed: Uint8Array, starting_time_secs: number, starting_time_nanos: number): number {
13114                 if(!isWasmInitialized) {
13115                         throw new Error("initializeWasm() must be awaited first!");
13116                 }
13117                 const nativeResponseValue = wasm.TS_KeysManager_new(encodeUint8Array(seed), starting_time_secs, starting_time_nanos);
13118                 return nativeResponseValue;
13119         }
13120         // 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]);
13121         export function KeysManager_derive_channel_keys(this_arg: number, channel_value_satoshis: number, params: Uint8Array): number {
13122                 if(!isWasmInitialized) {
13123                         throw new Error("initializeWasm() must be awaited first!");
13124                 }
13125                 const nativeResponseValue = wasm.TS_KeysManager_derive_channel_keys(this_arg, channel_value_satoshis, encodeUint8Array(params));
13126                 return nativeResponseValue;
13127         }
13128         // 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);
13129         export function KeysManager_spend_spendable_outputs(this_arg: number, descriptors: number[], outputs: number[], change_destination_script: Uint8Array, feerate_sat_per_1000_weight: number): number {
13130                 if(!isWasmInitialized) {
13131                         throw new Error("initializeWasm() must be awaited first!");
13132                 }
13133                 const nativeResponseValue = wasm.TS_KeysManager_spend_spendable_outputs(this_arg, descriptors, outputs, encodeUint8Array(change_destination_script), feerate_sat_per_1000_weight);
13134                 return nativeResponseValue;
13135         }
13136         // struct LDKKeysInterface KeysManager_as_KeysInterface(const struct LDKKeysManager *NONNULL_PTR this_arg);
13137         export function KeysManager_as_KeysInterface(this_arg: number): number {
13138                 if(!isWasmInitialized) {
13139                         throw new Error("initializeWasm() must be awaited first!");
13140                 }
13141                 const nativeResponseValue = wasm.TS_KeysManager_as_KeysInterface(this_arg);
13142                 return nativeResponseValue;
13143         }
13144         // void ChannelManager_free(struct LDKChannelManager this_obj);
13145         export function ChannelManager_free(this_obj: number): void {
13146                 if(!isWasmInitialized) {
13147                         throw new Error("initializeWasm() must be awaited first!");
13148                 }
13149                 const nativeResponseValue = wasm.TS_ChannelManager_free(this_obj);
13150                 // debug statements here
13151         }
13152         // void ChainParameters_free(struct LDKChainParameters this_obj);
13153         export function ChainParameters_free(this_obj: number): void {
13154                 if(!isWasmInitialized) {
13155                         throw new Error("initializeWasm() must be awaited first!");
13156                 }
13157                 const nativeResponseValue = wasm.TS_ChainParameters_free(this_obj);
13158                 // debug statements here
13159         }
13160         // enum LDKNetwork ChainParameters_get_network(const struct LDKChainParameters *NONNULL_PTR this_ptr);
13161         export function ChainParameters_get_network(this_ptr: number): Network {
13162                 if(!isWasmInitialized) {
13163                         throw new Error("initializeWasm() must be awaited first!");
13164                 }
13165                 const nativeResponseValue = wasm.TS_ChainParameters_get_network(this_ptr);
13166                 return nativeResponseValue;
13167         }
13168         // void ChainParameters_set_network(struct LDKChainParameters *NONNULL_PTR this_ptr, enum LDKNetwork val);
13169         export function ChainParameters_set_network(this_ptr: number, val: Network): void {
13170                 if(!isWasmInitialized) {
13171                         throw new Error("initializeWasm() must be awaited first!");
13172                 }
13173                 const nativeResponseValue = wasm.TS_ChainParameters_set_network(this_ptr, val);
13174                 // debug statements here
13175         }
13176         // struct LDKBestBlock ChainParameters_get_best_block(const struct LDKChainParameters *NONNULL_PTR this_ptr);
13177         export function ChainParameters_get_best_block(this_ptr: number): number {
13178                 if(!isWasmInitialized) {
13179                         throw new Error("initializeWasm() must be awaited first!");
13180                 }
13181                 const nativeResponseValue = wasm.TS_ChainParameters_get_best_block(this_ptr);
13182                 return nativeResponseValue;
13183         }
13184         // void ChainParameters_set_best_block(struct LDKChainParameters *NONNULL_PTR this_ptr, struct LDKBestBlock val);
13185         export function ChainParameters_set_best_block(this_ptr: number, val: number): void {
13186                 if(!isWasmInitialized) {
13187                         throw new Error("initializeWasm() must be awaited first!");
13188                 }
13189                 const nativeResponseValue = wasm.TS_ChainParameters_set_best_block(this_ptr, val);
13190                 // debug statements here
13191         }
13192         // MUST_USE_RES struct LDKChainParameters ChainParameters_new(enum LDKNetwork network_arg, struct LDKBestBlock best_block_arg);
13193         export function ChainParameters_new(network_arg: Network, best_block_arg: number): number {
13194                 if(!isWasmInitialized) {
13195                         throw new Error("initializeWasm() must be awaited first!");
13196                 }
13197                 const nativeResponseValue = wasm.TS_ChainParameters_new(network_arg, best_block_arg);
13198                 return nativeResponseValue;
13199         }
13200         // uint64_t ChainParameters_clone_ptr(LDKChainParameters *NONNULL_PTR arg);
13201         export function ChainParameters_clone_ptr(arg: number): number {
13202                 if(!isWasmInitialized) {
13203                         throw new Error("initializeWasm() must be awaited first!");
13204                 }
13205                 const nativeResponseValue = wasm.TS_ChainParameters_clone_ptr(arg);
13206                 return nativeResponseValue;
13207         }
13208         // struct LDKChainParameters ChainParameters_clone(const struct LDKChainParameters *NONNULL_PTR orig);
13209         export function ChainParameters_clone(orig: number): number {
13210                 if(!isWasmInitialized) {
13211                         throw new Error("initializeWasm() must be awaited first!");
13212                 }
13213                 const nativeResponseValue = wasm.TS_ChainParameters_clone(orig);
13214                 return nativeResponseValue;
13215         }
13216         // void CounterpartyForwardingInfo_free(struct LDKCounterpartyForwardingInfo this_obj);
13217         export function CounterpartyForwardingInfo_free(this_obj: number): void {
13218                 if(!isWasmInitialized) {
13219                         throw new Error("initializeWasm() must be awaited first!");
13220                 }
13221                 const nativeResponseValue = wasm.TS_CounterpartyForwardingInfo_free(this_obj);
13222                 // debug statements here
13223         }
13224         // uint32_t CounterpartyForwardingInfo_get_fee_base_msat(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr);
13225         export function CounterpartyForwardingInfo_get_fee_base_msat(this_ptr: number): number {
13226                 if(!isWasmInitialized) {
13227                         throw new Error("initializeWasm() must be awaited first!");
13228                 }
13229                 const nativeResponseValue = wasm.TS_CounterpartyForwardingInfo_get_fee_base_msat(this_ptr);
13230                 return nativeResponseValue;
13231         }
13232         // void CounterpartyForwardingInfo_set_fee_base_msat(struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr, uint32_t val);
13233         export function CounterpartyForwardingInfo_set_fee_base_msat(this_ptr: number, val: number): void {
13234                 if(!isWasmInitialized) {
13235                         throw new Error("initializeWasm() must be awaited first!");
13236                 }
13237                 const nativeResponseValue = wasm.TS_CounterpartyForwardingInfo_set_fee_base_msat(this_ptr, val);
13238                 // debug statements here
13239         }
13240         // uint32_t CounterpartyForwardingInfo_get_fee_proportional_millionths(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr);
13241         export function CounterpartyForwardingInfo_get_fee_proportional_millionths(this_ptr: number): number {
13242                 if(!isWasmInitialized) {
13243                         throw new Error("initializeWasm() must be awaited first!");
13244                 }
13245                 const nativeResponseValue = wasm.TS_CounterpartyForwardingInfo_get_fee_proportional_millionths(this_ptr);
13246                 return nativeResponseValue;
13247         }
13248         // void CounterpartyForwardingInfo_set_fee_proportional_millionths(struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr, uint32_t val);
13249         export function CounterpartyForwardingInfo_set_fee_proportional_millionths(this_ptr: number, val: number): void {
13250                 if(!isWasmInitialized) {
13251                         throw new Error("initializeWasm() must be awaited first!");
13252                 }
13253                 const nativeResponseValue = wasm.TS_CounterpartyForwardingInfo_set_fee_proportional_millionths(this_ptr, val);
13254                 // debug statements here
13255         }
13256         // uint16_t CounterpartyForwardingInfo_get_cltv_expiry_delta(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr);
13257         export function CounterpartyForwardingInfo_get_cltv_expiry_delta(this_ptr: number): number {
13258                 if(!isWasmInitialized) {
13259                         throw new Error("initializeWasm() must be awaited first!");
13260                 }
13261                 const nativeResponseValue = wasm.TS_CounterpartyForwardingInfo_get_cltv_expiry_delta(this_ptr);
13262                 return nativeResponseValue;
13263         }
13264         // void CounterpartyForwardingInfo_set_cltv_expiry_delta(struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr, uint16_t val);
13265         export function CounterpartyForwardingInfo_set_cltv_expiry_delta(this_ptr: number, val: number): void {
13266                 if(!isWasmInitialized) {
13267                         throw new Error("initializeWasm() must be awaited first!");
13268                 }
13269                 const nativeResponseValue = wasm.TS_CounterpartyForwardingInfo_set_cltv_expiry_delta(this_ptr, val);
13270                 // debug statements here
13271         }
13272         // MUST_USE_RES struct LDKCounterpartyForwardingInfo CounterpartyForwardingInfo_new(uint32_t fee_base_msat_arg, uint32_t fee_proportional_millionths_arg, uint16_t cltv_expiry_delta_arg);
13273         export function CounterpartyForwardingInfo_new(fee_base_msat_arg: number, fee_proportional_millionths_arg: number, cltv_expiry_delta_arg: number): number {
13274                 if(!isWasmInitialized) {
13275                         throw new Error("initializeWasm() must be awaited first!");
13276                 }
13277                 const nativeResponseValue = wasm.TS_CounterpartyForwardingInfo_new(fee_base_msat_arg, fee_proportional_millionths_arg, cltv_expiry_delta_arg);
13278                 return nativeResponseValue;
13279         }
13280         // uint64_t CounterpartyForwardingInfo_clone_ptr(LDKCounterpartyForwardingInfo *NONNULL_PTR arg);
13281         export function CounterpartyForwardingInfo_clone_ptr(arg: number): number {
13282                 if(!isWasmInitialized) {
13283                         throw new Error("initializeWasm() must be awaited first!");
13284                 }
13285                 const nativeResponseValue = wasm.TS_CounterpartyForwardingInfo_clone_ptr(arg);
13286                 return nativeResponseValue;
13287         }
13288         // struct LDKCounterpartyForwardingInfo CounterpartyForwardingInfo_clone(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR orig);
13289         export function CounterpartyForwardingInfo_clone(orig: number): number {
13290                 if(!isWasmInitialized) {
13291                         throw new Error("initializeWasm() must be awaited first!");
13292                 }
13293                 const nativeResponseValue = wasm.TS_CounterpartyForwardingInfo_clone(orig);
13294                 return nativeResponseValue;
13295         }
13296         // void ChannelCounterparty_free(struct LDKChannelCounterparty this_obj);
13297         export function ChannelCounterparty_free(this_obj: number): void {
13298                 if(!isWasmInitialized) {
13299                         throw new Error("initializeWasm() must be awaited first!");
13300                 }
13301                 const nativeResponseValue = wasm.TS_ChannelCounterparty_free(this_obj);
13302                 // debug statements here
13303         }
13304         // struct LDKPublicKey ChannelCounterparty_get_node_id(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
13305         export function ChannelCounterparty_get_node_id(this_ptr: number): Uint8Array {
13306                 if(!isWasmInitialized) {
13307                         throw new Error("initializeWasm() must be awaited first!");
13308                 }
13309                 const nativeResponseValue = wasm.TS_ChannelCounterparty_get_node_id(this_ptr);
13310                 return decodeUint8Array(nativeResponseValue);
13311         }
13312         // void ChannelCounterparty_set_node_id(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13313         export function ChannelCounterparty_set_node_id(this_ptr: number, val: Uint8Array): void {
13314                 if(!isWasmInitialized) {
13315                         throw new Error("initializeWasm() must be awaited first!");
13316                 }
13317                 const nativeResponseValue = wasm.TS_ChannelCounterparty_set_node_id(this_ptr, encodeUint8Array(val));
13318                 // debug statements here
13319         }
13320         // struct LDKInitFeatures ChannelCounterparty_get_features(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
13321         export function ChannelCounterparty_get_features(this_ptr: number): number {
13322                 if(!isWasmInitialized) {
13323                         throw new Error("initializeWasm() must be awaited first!");
13324                 }
13325                 const nativeResponseValue = wasm.TS_ChannelCounterparty_get_features(this_ptr);
13326                 return nativeResponseValue;
13327         }
13328         // void ChannelCounterparty_set_features(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
13329         export function ChannelCounterparty_set_features(this_ptr: number, val: number): void {
13330                 if(!isWasmInitialized) {
13331                         throw new Error("initializeWasm() must be awaited first!");
13332                 }
13333                 const nativeResponseValue = wasm.TS_ChannelCounterparty_set_features(this_ptr, val);
13334                 // debug statements here
13335         }
13336         // uint64_t ChannelCounterparty_get_unspendable_punishment_reserve(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
13337         export function ChannelCounterparty_get_unspendable_punishment_reserve(this_ptr: number): number {
13338                 if(!isWasmInitialized) {
13339                         throw new Error("initializeWasm() must be awaited first!");
13340                 }
13341                 const nativeResponseValue = wasm.TS_ChannelCounterparty_get_unspendable_punishment_reserve(this_ptr);
13342                 return nativeResponseValue;
13343         }
13344         // void ChannelCounterparty_set_unspendable_punishment_reserve(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, uint64_t val);
13345         export function ChannelCounterparty_set_unspendable_punishment_reserve(this_ptr: number, val: number): void {
13346                 if(!isWasmInitialized) {
13347                         throw new Error("initializeWasm() must be awaited first!");
13348                 }
13349                 const nativeResponseValue = wasm.TS_ChannelCounterparty_set_unspendable_punishment_reserve(this_ptr, val);
13350                 // debug statements here
13351         }
13352         // struct LDKCounterpartyForwardingInfo ChannelCounterparty_get_forwarding_info(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
13353         export function ChannelCounterparty_get_forwarding_info(this_ptr: number): number {
13354                 if(!isWasmInitialized) {
13355                         throw new Error("initializeWasm() must be awaited first!");
13356                 }
13357                 const nativeResponseValue = wasm.TS_ChannelCounterparty_get_forwarding_info(this_ptr);
13358                 return nativeResponseValue;
13359         }
13360         // void ChannelCounterparty_set_forwarding_info(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKCounterpartyForwardingInfo val);
13361         export function ChannelCounterparty_set_forwarding_info(this_ptr: number, val: number): void {
13362                 if(!isWasmInitialized) {
13363                         throw new Error("initializeWasm() must be awaited first!");
13364                 }
13365                 const nativeResponseValue = wasm.TS_ChannelCounterparty_set_forwarding_info(this_ptr, val);
13366                 // debug statements here
13367         }
13368         // MUST_USE_RES struct LDKChannelCounterparty ChannelCounterparty_new(struct LDKPublicKey node_id_arg, struct LDKInitFeatures features_arg, uint64_t unspendable_punishment_reserve_arg, struct LDKCounterpartyForwardingInfo forwarding_info_arg);
13369         export function ChannelCounterparty_new(node_id_arg: Uint8Array, features_arg: number, unspendable_punishment_reserve_arg: number, forwarding_info_arg: number): number {
13370                 if(!isWasmInitialized) {
13371                         throw new Error("initializeWasm() must be awaited first!");
13372                 }
13373                 const nativeResponseValue = wasm.TS_ChannelCounterparty_new(encodeUint8Array(node_id_arg), features_arg, unspendable_punishment_reserve_arg, forwarding_info_arg);
13374                 return nativeResponseValue;
13375         }
13376         // uint64_t ChannelCounterparty_clone_ptr(LDKChannelCounterparty *NONNULL_PTR arg);
13377         export function ChannelCounterparty_clone_ptr(arg: number): number {
13378                 if(!isWasmInitialized) {
13379                         throw new Error("initializeWasm() must be awaited first!");
13380                 }
13381                 const nativeResponseValue = wasm.TS_ChannelCounterparty_clone_ptr(arg);
13382                 return nativeResponseValue;
13383         }
13384         // struct LDKChannelCounterparty ChannelCounterparty_clone(const struct LDKChannelCounterparty *NONNULL_PTR orig);
13385         export function ChannelCounterparty_clone(orig: number): number {
13386                 if(!isWasmInitialized) {
13387                         throw new Error("initializeWasm() must be awaited first!");
13388                 }
13389                 const nativeResponseValue = wasm.TS_ChannelCounterparty_clone(orig);
13390                 return nativeResponseValue;
13391         }
13392         // void ChannelDetails_free(struct LDKChannelDetails this_obj);
13393         export function ChannelDetails_free(this_obj: number): void {
13394                 if(!isWasmInitialized) {
13395                         throw new Error("initializeWasm() must be awaited first!");
13396                 }
13397                 const nativeResponseValue = wasm.TS_ChannelDetails_free(this_obj);
13398                 // debug statements here
13399         }
13400         // const uint8_t (*ChannelDetails_get_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr))[32];
13401         export function ChannelDetails_get_channel_id(this_ptr: number): Uint8Array {
13402                 if(!isWasmInitialized) {
13403                         throw new Error("initializeWasm() must be awaited first!");
13404                 }
13405                 const nativeResponseValue = wasm.TS_ChannelDetails_get_channel_id(this_ptr);
13406                 return decodeUint8Array(nativeResponseValue);
13407         }
13408         // void ChannelDetails_set_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
13409         export function ChannelDetails_set_channel_id(this_ptr: number, val: Uint8Array): void {
13410                 if(!isWasmInitialized) {
13411                         throw new Error("initializeWasm() must be awaited first!");
13412                 }
13413                 const nativeResponseValue = wasm.TS_ChannelDetails_set_channel_id(this_ptr, encodeUint8Array(val));
13414                 // debug statements here
13415         }
13416         // struct LDKChannelCounterparty ChannelDetails_get_counterparty(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
13417         export function ChannelDetails_get_counterparty(this_ptr: number): number {
13418                 if(!isWasmInitialized) {
13419                         throw new Error("initializeWasm() must be awaited first!");
13420                 }
13421                 const nativeResponseValue = wasm.TS_ChannelDetails_get_counterparty(this_ptr);
13422                 return nativeResponseValue;
13423         }
13424         // void ChannelDetails_set_counterparty(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKChannelCounterparty val);
13425         export function ChannelDetails_set_counterparty(this_ptr: number, val: number): void {
13426                 if(!isWasmInitialized) {
13427                         throw new Error("initializeWasm() must be awaited first!");
13428                 }
13429                 const nativeResponseValue = wasm.TS_ChannelDetails_set_counterparty(this_ptr, val);
13430                 // debug statements here
13431         }
13432         // struct LDKOutPoint ChannelDetails_get_funding_txo(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
13433         export function ChannelDetails_get_funding_txo(this_ptr: number): number {
13434                 if(!isWasmInitialized) {
13435                         throw new Error("initializeWasm() must be awaited first!");
13436                 }
13437                 const nativeResponseValue = wasm.TS_ChannelDetails_get_funding_txo(this_ptr);
13438                 return nativeResponseValue;
13439         }
13440         // void ChannelDetails_set_funding_txo(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKOutPoint val);
13441         export function ChannelDetails_set_funding_txo(this_ptr: number, val: number): void {
13442                 if(!isWasmInitialized) {
13443                         throw new Error("initializeWasm() must be awaited first!");
13444                 }
13445                 const nativeResponseValue = wasm.TS_ChannelDetails_set_funding_txo(this_ptr, val);
13446                 // debug statements here
13447         }
13448         // struct LDKCOption_u64Z ChannelDetails_get_short_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
13449         export function ChannelDetails_get_short_channel_id(this_ptr: number): number {
13450                 if(!isWasmInitialized) {
13451                         throw new Error("initializeWasm() must be awaited first!");
13452                 }
13453                 const nativeResponseValue = wasm.TS_ChannelDetails_get_short_channel_id(this_ptr);
13454                 return nativeResponseValue;
13455         }
13456         // void ChannelDetails_set_short_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
13457         export function ChannelDetails_set_short_channel_id(this_ptr: number, val: number): void {
13458                 if(!isWasmInitialized) {
13459                         throw new Error("initializeWasm() must be awaited first!");
13460                 }
13461                 const nativeResponseValue = wasm.TS_ChannelDetails_set_short_channel_id(this_ptr, val);
13462                 // debug statements here
13463         }
13464         // uint64_t ChannelDetails_get_channel_value_satoshis(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
13465         export function ChannelDetails_get_channel_value_satoshis(this_ptr: number): number {
13466                 if(!isWasmInitialized) {
13467                         throw new Error("initializeWasm() must be awaited first!");
13468                 }
13469                 const nativeResponseValue = wasm.TS_ChannelDetails_get_channel_value_satoshis(this_ptr);
13470                 return nativeResponseValue;
13471         }
13472         // void ChannelDetails_set_channel_value_satoshis(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
13473         export function ChannelDetails_set_channel_value_satoshis(this_ptr: number, val: number): void {
13474                 if(!isWasmInitialized) {
13475                         throw new Error("initializeWasm() must be awaited first!");
13476                 }
13477                 const nativeResponseValue = wasm.TS_ChannelDetails_set_channel_value_satoshis(this_ptr, val);
13478                 // debug statements here
13479         }
13480         // struct LDKCOption_u64Z ChannelDetails_get_unspendable_punishment_reserve(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
13481         export function ChannelDetails_get_unspendable_punishment_reserve(this_ptr: number): number {
13482                 if(!isWasmInitialized) {
13483                         throw new Error("initializeWasm() must be awaited first!");
13484                 }
13485                 const nativeResponseValue = wasm.TS_ChannelDetails_get_unspendable_punishment_reserve(this_ptr);
13486                 return nativeResponseValue;
13487         }
13488         // void ChannelDetails_set_unspendable_punishment_reserve(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
13489         export function ChannelDetails_set_unspendable_punishment_reserve(this_ptr: number, val: number): void {
13490                 if(!isWasmInitialized) {
13491                         throw new Error("initializeWasm() must be awaited first!");
13492                 }
13493                 const nativeResponseValue = wasm.TS_ChannelDetails_set_unspendable_punishment_reserve(this_ptr, val);
13494                 // debug statements here
13495         }
13496         // uint64_t ChannelDetails_get_user_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
13497         export function ChannelDetails_get_user_channel_id(this_ptr: number): number {
13498                 if(!isWasmInitialized) {
13499                         throw new Error("initializeWasm() must be awaited first!");
13500                 }
13501                 const nativeResponseValue = wasm.TS_ChannelDetails_get_user_channel_id(this_ptr);
13502                 return nativeResponseValue;
13503         }
13504         // void ChannelDetails_set_user_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
13505         export function ChannelDetails_set_user_channel_id(this_ptr: number, val: number): void {
13506                 if(!isWasmInitialized) {
13507                         throw new Error("initializeWasm() must be awaited first!");
13508                 }
13509                 const nativeResponseValue = wasm.TS_ChannelDetails_set_user_channel_id(this_ptr, val);
13510                 // debug statements here
13511         }
13512         // uint64_t ChannelDetails_get_balance_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
13513         export function ChannelDetails_get_balance_msat(this_ptr: number): number {
13514                 if(!isWasmInitialized) {
13515                         throw new Error("initializeWasm() must be awaited first!");
13516                 }
13517                 const nativeResponseValue = wasm.TS_ChannelDetails_get_balance_msat(this_ptr);
13518                 return nativeResponseValue;
13519         }
13520         // void ChannelDetails_set_balance_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
13521         export function ChannelDetails_set_balance_msat(this_ptr: number, val: number): void {
13522                 if(!isWasmInitialized) {
13523                         throw new Error("initializeWasm() must be awaited first!");
13524                 }
13525                 const nativeResponseValue = wasm.TS_ChannelDetails_set_balance_msat(this_ptr, val);
13526                 // debug statements here
13527         }
13528         // uint64_t ChannelDetails_get_outbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
13529         export function ChannelDetails_get_outbound_capacity_msat(this_ptr: number): number {
13530                 if(!isWasmInitialized) {
13531                         throw new Error("initializeWasm() must be awaited first!");
13532                 }
13533                 const nativeResponseValue = wasm.TS_ChannelDetails_get_outbound_capacity_msat(this_ptr);
13534                 return nativeResponseValue;
13535         }
13536         // void ChannelDetails_set_outbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
13537         export function ChannelDetails_set_outbound_capacity_msat(this_ptr: number, val: number): void {
13538                 if(!isWasmInitialized) {
13539                         throw new Error("initializeWasm() must be awaited first!");
13540                 }
13541                 const nativeResponseValue = wasm.TS_ChannelDetails_set_outbound_capacity_msat(this_ptr, val);
13542                 // debug statements here
13543         }
13544         // uint64_t ChannelDetails_get_inbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
13545         export function ChannelDetails_get_inbound_capacity_msat(this_ptr: number): number {
13546                 if(!isWasmInitialized) {
13547                         throw new Error("initializeWasm() must be awaited first!");
13548                 }
13549                 const nativeResponseValue = wasm.TS_ChannelDetails_get_inbound_capacity_msat(this_ptr);
13550                 return nativeResponseValue;
13551         }
13552         // void ChannelDetails_set_inbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
13553         export function ChannelDetails_set_inbound_capacity_msat(this_ptr: number, val: number): void {
13554                 if(!isWasmInitialized) {
13555                         throw new Error("initializeWasm() must be awaited first!");
13556                 }
13557                 const nativeResponseValue = wasm.TS_ChannelDetails_set_inbound_capacity_msat(this_ptr, val);
13558                 // debug statements here
13559         }
13560         // struct LDKCOption_u32Z ChannelDetails_get_confirmations_required(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
13561         export function ChannelDetails_get_confirmations_required(this_ptr: number): number {
13562                 if(!isWasmInitialized) {
13563                         throw new Error("initializeWasm() must be awaited first!");
13564                 }
13565                 const nativeResponseValue = wasm.TS_ChannelDetails_get_confirmations_required(this_ptr);
13566                 return nativeResponseValue;
13567         }
13568         // void ChannelDetails_set_confirmations_required(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u32Z val);
13569         export function ChannelDetails_set_confirmations_required(this_ptr: number, val: number): void {
13570                 if(!isWasmInitialized) {
13571                         throw new Error("initializeWasm() must be awaited first!");
13572                 }
13573                 const nativeResponseValue = wasm.TS_ChannelDetails_set_confirmations_required(this_ptr, val);
13574                 // debug statements here
13575         }
13576         // struct LDKCOption_u16Z ChannelDetails_get_force_close_spend_delay(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
13577         export function ChannelDetails_get_force_close_spend_delay(this_ptr: number): number {
13578                 if(!isWasmInitialized) {
13579                         throw new Error("initializeWasm() must be awaited first!");
13580                 }
13581                 const nativeResponseValue = wasm.TS_ChannelDetails_get_force_close_spend_delay(this_ptr);
13582                 return nativeResponseValue;
13583         }
13584         // void ChannelDetails_set_force_close_spend_delay(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u16Z val);
13585         export function ChannelDetails_set_force_close_spend_delay(this_ptr: number, val: number): void {
13586                 if(!isWasmInitialized) {
13587                         throw new Error("initializeWasm() must be awaited first!");
13588                 }
13589                 const nativeResponseValue = wasm.TS_ChannelDetails_set_force_close_spend_delay(this_ptr, val);
13590                 // debug statements here
13591         }
13592         // bool ChannelDetails_get_is_outbound(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
13593         export function ChannelDetails_get_is_outbound(this_ptr: number): boolean {
13594                 if(!isWasmInitialized) {
13595                         throw new Error("initializeWasm() must be awaited first!");
13596                 }
13597                 const nativeResponseValue = wasm.TS_ChannelDetails_get_is_outbound(this_ptr);
13598                 return nativeResponseValue;
13599         }
13600         // void ChannelDetails_set_is_outbound(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
13601         export function ChannelDetails_set_is_outbound(this_ptr: number, val: boolean): void {
13602                 if(!isWasmInitialized) {
13603                         throw new Error("initializeWasm() must be awaited first!");
13604                 }
13605                 const nativeResponseValue = wasm.TS_ChannelDetails_set_is_outbound(this_ptr, val);
13606                 // debug statements here
13607         }
13608         // bool ChannelDetails_get_is_funding_locked(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
13609         export function ChannelDetails_get_is_funding_locked(this_ptr: number): boolean {
13610                 if(!isWasmInitialized) {
13611                         throw new Error("initializeWasm() must be awaited first!");
13612                 }
13613                 const nativeResponseValue = wasm.TS_ChannelDetails_get_is_funding_locked(this_ptr);
13614                 return nativeResponseValue;
13615         }
13616         // void ChannelDetails_set_is_funding_locked(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
13617         export function ChannelDetails_set_is_funding_locked(this_ptr: number, val: boolean): void {
13618                 if(!isWasmInitialized) {
13619                         throw new Error("initializeWasm() must be awaited first!");
13620                 }
13621                 const nativeResponseValue = wasm.TS_ChannelDetails_set_is_funding_locked(this_ptr, val);
13622                 // debug statements here
13623         }
13624         // bool ChannelDetails_get_is_usable(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
13625         export function ChannelDetails_get_is_usable(this_ptr: number): boolean {
13626                 if(!isWasmInitialized) {
13627                         throw new Error("initializeWasm() must be awaited first!");
13628                 }
13629                 const nativeResponseValue = wasm.TS_ChannelDetails_get_is_usable(this_ptr);
13630                 return nativeResponseValue;
13631         }
13632         // void ChannelDetails_set_is_usable(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
13633         export function ChannelDetails_set_is_usable(this_ptr: number, val: boolean): void {
13634                 if(!isWasmInitialized) {
13635                         throw new Error("initializeWasm() must be awaited first!");
13636                 }
13637                 const nativeResponseValue = wasm.TS_ChannelDetails_set_is_usable(this_ptr, val);
13638                 // debug statements here
13639         }
13640         // bool ChannelDetails_get_is_public(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
13641         export function ChannelDetails_get_is_public(this_ptr: number): boolean {
13642                 if(!isWasmInitialized) {
13643                         throw new Error("initializeWasm() must be awaited first!");
13644                 }
13645                 const nativeResponseValue = wasm.TS_ChannelDetails_get_is_public(this_ptr);
13646                 return nativeResponseValue;
13647         }
13648         // void ChannelDetails_set_is_public(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
13649         export function ChannelDetails_set_is_public(this_ptr: number, val: boolean): void {
13650                 if(!isWasmInitialized) {
13651                         throw new Error("initializeWasm() must be awaited first!");
13652                 }
13653                 const nativeResponseValue = wasm.TS_ChannelDetails_set_is_public(this_ptr, val);
13654                 // debug statements here
13655         }
13656         // MUST_USE_RES struct LDKChannelDetails ChannelDetails_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKChannelCounterparty counterparty_arg, struct LDKOutPoint funding_txo_arg, struct LDKCOption_u64Z short_channel_id_arg, uint64_t channel_value_satoshis_arg, struct LDKCOption_u64Z unspendable_punishment_reserve_arg, uint64_t user_channel_id_arg, uint64_t balance_msat_arg, uint64_t outbound_capacity_msat_arg, uint64_t inbound_capacity_msat_arg, struct LDKCOption_u32Z confirmations_required_arg, struct LDKCOption_u16Z force_close_spend_delay_arg, bool is_outbound_arg, bool is_funding_locked_arg, bool is_usable_arg, bool is_public_arg);
13657         export function ChannelDetails_new(channel_id_arg: Uint8Array, counterparty_arg: number, funding_txo_arg: number, short_channel_id_arg: number, channel_value_satoshis_arg: number, unspendable_punishment_reserve_arg: number, user_channel_id_arg: number, balance_msat_arg: number, outbound_capacity_msat_arg: number, inbound_capacity_msat_arg: number, confirmations_required_arg: number, force_close_spend_delay_arg: number, is_outbound_arg: boolean, is_funding_locked_arg: boolean, is_usable_arg: boolean, is_public_arg: boolean): number {
13658                 if(!isWasmInitialized) {
13659                         throw new Error("initializeWasm() must be awaited first!");
13660                 }
13661                 const nativeResponseValue = wasm.TS_ChannelDetails_new(encodeUint8Array(channel_id_arg), counterparty_arg, funding_txo_arg, short_channel_id_arg, channel_value_satoshis_arg, unspendable_punishment_reserve_arg, user_channel_id_arg, balance_msat_arg, outbound_capacity_msat_arg, inbound_capacity_msat_arg, confirmations_required_arg, force_close_spend_delay_arg, is_outbound_arg, is_funding_locked_arg, is_usable_arg, is_public_arg);
13662                 return nativeResponseValue;
13663         }
13664         // uint64_t ChannelDetails_clone_ptr(LDKChannelDetails *NONNULL_PTR arg);
13665         export function ChannelDetails_clone_ptr(arg: number): number {
13666                 if(!isWasmInitialized) {
13667                         throw new Error("initializeWasm() must be awaited first!");
13668                 }
13669                 const nativeResponseValue = wasm.TS_ChannelDetails_clone_ptr(arg);
13670                 return nativeResponseValue;
13671         }
13672         // struct LDKChannelDetails ChannelDetails_clone(const struct LDKChannelDetails *NONNULL_PTR orig);
13673         export function ChannelDetails_clone(orig: number): number {
13674                 if(!isWasmInitialized) {
13675                         throw new Error("initializeWasm() must be awaited first!");
13676                 }
13677                 const nativeResponseValue = wasm.TS_ChannelDetails_clone(orig);
13678                 return nativeResponseValue;
13679         }
13680         // void PaymentSendFailure_free(struct LDKPaymentSendFailure this_ptr);
13681         export function PaymentSendFailure_free(this_ptr: number): void {
13682                 if(!isWasmInitialized) {
13683                         throw new Error("initializeWasm() must be awaited first!");
13684                 }
13685                 const nativeResponseValue = wasm.TS_PaymentSendFailure_free(this_ptr);
13686                 // debug statements here
13687         }
13688         // uint64_t PaymentSendFailure_clone_ptr(LDKPaymentSendFailure *NONNULL_PTR arg);
13689         export function PaymentSendFailure_clone_ptr(arg: number): number {
13690                 if(!isWasmInitialized) {
13691                         throw new Error("initializeWasm() must be awaited first!");
13692                 }
13693                 const nativeResponseValue = wasm.TS_PaymentSendFailure_clone_ptr(arg);
13694                 return nativeResponseValue;
13695         }
13696         // struct LDKPaymentSendFailure PaymentSendFailure_clone(const struct LDKPaymentSendFailure *NONNULL_PTR orig);
13697         export function PaymentSendFailure_clone(orig: number): number {
13698                 if(!isWasmInitialized) {
13699                         throw new Error("initializeWasm() must be awaited first!");
13700                 }
13701                 const nativeResponseValue = wasm.TS_PaymentSendFailure_clone(orig);
13702                 return nativeResponseValue;
13703         }
13704         // struct LDKPaymentSendFailure PaymentSendFailure_parameter_error(struct LDKAPIError a);
13705         export function PaymentSendFailure_parameter_error(a: number): number {
13706                 if(!isWasmInitialized) {
13707                         throw new Error("initializeWasm() must be awaited first!");
13708                 }
13709                 const nativeResponseValue = wasm.TS_PaymentSendFailure_parameter_error(a);
13710                 return nativeResponseValue;
13711         }
13712         // struct LDKPaymentSendFailure PaymentSendFailure_path_parameter_error(struct LDKCVec_CResult_NoneAPIErrorZZ a);
13713         export function PaymentSendFailure_path_parameter_error(a: number[]): number {
13714                 if(!isWasmInitialized) {
13715                         throw new Error("initializeWasm() must be awaited first!");
13716                 }
13717                 const nativeResponseValue = wasm.TS_PaymentSendFailure_path_parameter_error(a);
13718                 return nativeResponseValue;
13719         }
13720         // struct LDKPaymentSendFailure PaymentSendFailure_all_failed_retry_safe(struct LDKCVec_APIErrorZ a);
13721         export function PaymentSendFailure_all_failed_retry_safe(a: number[]): number {
13722                 if(!isWasmInitialized) {
13723                         throw new Error("initializeWasm() must be awaited first!");
13724                 }
13725                 const nativeResponseValue = wasm.TS_PaymentSendFailure_all_failed_retry_safe(a);
13726                 return nativeResponseValue;
13727         }
13728         // struct LDKPaymentSendFailure PaymentSendFailure_partial_failure(struct LDKCVec_CResult_NoneAPIErrorZZ results, struct LDKRouteParameters failed_paths_retry, struct LDKThirtyTwoBytes payment_id);
13729         export function PaymentSendFailure_partial_failure(results: number[], failed_paths_retry: number, payment_id: Uint8Array): number {
13730                 if(!isWasmInitialized) {
13731                         throw new Error("initializeWasm() must be awaited first!");
13732                 }
13733                 const nativeResponseValue = wasm.TS_PaymentSendFailure_partial_failure(results, failed_paths_retry, encodeUint8Array(payment_id));
13734                 return nativeResponseValue;
13735         }
13736         // 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);
13737         export function ChannelManager_new(fee_est: number, chain_monitor: number, tx_broadcaster: number, logger: number, keys_manager: number, config: number, params: number): number {
13738                 if(!isWasmInitialized) {
13739                         throw new Error("initializeWasm() must be awaited first!");
13740                 }
13741                 const nativeResponseValue = wasm.TS_ChannelManager_new(fee_est, chain_monitor, tx_broadcaster, logger, keys_manager, config, params);
13742                 return nativeResponseValue;
13743         }
13744         // MUST_USE_RES struct LDKUserConfig ChannelManager_get_current_default_configuration(const struct LDKChannelManager *NONNULL_PTR this_arg);
13745         export function ChannelManager_get_current_default_configuration(this_arg: number): number {
13746                 if(!isWasmInitialized) {
13747                         throw new Error("initializeWasm() must be awaited first!");
13748                 }
13749                 const nativeResponseValue = wasm.TS_ChannelManager_get_current_default_configuration(this_arg);
13750                 return nativeResponseValue;
13751         }
13752         // MUST_USE_RES struct LDKCResult__u832APIErrorZ ChannelManager_create_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey their_network_key, uint64_t channel_value_satoshis, uint64_t push_msat, uint64_t user_channel_id, struct LDKUserConfig override_config);
13753         export function ChannelManager_create_channel(this_arg: number, their_network_key: Uint8Array, channel_value_satoshis: number, push_msat: number, user_channel_id: number, override_config: number): number {
13754                 if(!isWasmInitialized) {
13755                         throw new Error("initializeWasm() must be awaited first!");
13756                 }
13757                 const nativeResponseValue = wasm.TS_ChannelManager_create_channel(this_arg, encodeUint8Array(their_network_key), channel_value_satoshis, push_msat, user_channel_id, override_config);
13758                 return nativeResponseValue;
13759         }
13760         // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
13761         export function ChannelManager_list_channels(this_arg: number): number[] {
13762                 if(!isWasmInitialized) {
13763                         throw new Error("initializeWasm() must be awaited first!");
13764                 }
13765                 const nativeResponseValue = wasm.TS_ChannelManager_list_channels(this_arg);
13766                 return nativeResponseValue;
13767         }
13768         // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_usable_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
13769         export function ChannelManager_list_usable_channels(this_arg: number): number[] {
13770                 if(!isWasmInitialized) {
13771                         throw new Error("initializeWasm() must be awaited first!");
13772                 }
13773                 const nativeResponseValue = wasm.TS_ChannelManager_list_usable_channels(this_arg);
13774                 return nativeResponseValue;
13775         }
13776         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
13777         export function ChannelManager_close_channel(this_arg: number, channel_id: Uint8Array): number {
13778                 if(!isWasmInitialized) {
13779                         throw new Error("initializeWasm() must be awaited first!");
13780                 }
13781                 const nativeResponseValue = wasm.TS_ChannelManager_close_channel(this_arg, encodeUint8Array(channel_id));
13782                 return nativeResponseValue;
13783         }
13784         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel_with_target_feerate(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32], uint32_t target_feerate_sats_per_1000_weight);
13785         export function ChannelManager_close_channel_with_target_feerate(this_arg: number, channel_id: Uint8Array, target_feerate_sats_per_1000_weight: number): number {
13786                 if(!isWasmInitialized) {
13787                         throw new Error("initializeWasm() must be awaited first!");
13788                 }
13789                 const nativeResponseValue = wasm.TS_ChannelManager_close_channel_with_target_feerate(this_arg, encodeUint8Array(channel_id), target_feerate_sats_per_1000_weight);
13790                 return nativeResponseValue;
13791         }
13792         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
13793         export function ChannelManager_force_close_channel(this_arg: number, channel_id: Uint8Array): number {
13794                 if(!isWasmInitialized) {
13795                         throw new Error("initializeWasm() must be awaited first!");
13796                 }
13797                 const nativeResponseValue = wasm.TS_ChannelManager_force_close_channel(this_arg, encodeUint8Array(channel_id));
13798                 return nativeResponseValue;
13799         }
13800         // void ChannelManager_force_close_all_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
13801         export function ChannelManager_force_close_all_channels(this_arg: number): void {
13802                 if(!isWasmInitialized) {
13803                         throw new Error("initializeWasm() must be awaited first!");
13804                 }
13805                 const nativeResponseValue = wasm.TS_ChannelManager_force_close_all_channels(this_arg);
13806                 // debug statements here
13807         }
13808         // MUST_USE_RES struct LDKCResult_PaymentIdPaymentSendFailureZ ChannelManager_send_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKRoute *NONNULL_PTR route, struct LDKThirtyTwoBytes payment_hash, struct LDKThirtyTwoBytes payment_secret);
13809         export function ChannelManager_send_payment(this_arg: number, route: number, payment_hash: Uint8Array, payment_secret: Uint8Array): number {
13810                 if(!isWasmInitialized) {
13811                         throw new Error("initializeWasm() must be awaited first!");
13812                 }
13813                 const nativeResponseValue = wasm.TS_ChannelManager_send_payment(this_arg, route, encodeUint8Array(payment_hash), encodeUint8Array(payment_secret));
13814                 return nativeResponseValue;
13815         }
13816         // MUST_USE_RES struct LDKCResult_NonePaymentSendFailureZ ChannelManager_retry_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKRoute *NONNULL_PTR route, struct LDKThirtyTwoBytes payment_id);
13817         export function ChannelManager_retry_payment(this_arg: number, route: number, payment_id: Uint8Array): number {
13818                 if(!isWasmInitialized) {
13819                         throw new Error("initializeWasm() must be awaited first!");
13820                 }
13821                 const nativeResponseValue = wasm.TS_ChannelManager_retry_payment(this_arg, route, encodeUint8Array(payment_id));
13822                 return nativeResponseValue;
13823         }
13824         // void ChannelManager_abandon_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_id);
13825         export function ChannelManager_abandon_payment(this_arg: number, payment_id: Uint8Array): void {
13826                 if(!isWasmInitialized) {
13827                         throw new Error("initializeWasm() must be awaited first!");
13828                 }
13829                 const nativeResponseValue = wasm.TS_ChannelManager_abandon_payment(this_arg, encodeUint8Array(payment_id));
13830                 // debug statements here
13831         }
13832         // MUST_USE_RES struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ ChannelManager_send_spontaneous_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKRoute *NONNULL_PTR route, struct LDKThirtyTwoBytes payment_preimage);
13833         export function ChannelManager_send_spontaneous_payment(this_arg: number, route: number, payment_preimage: Uint8Array): number {
13834                 if(!isWasmInitialized) {
13835                         throw new Error("initializeWasm() must be awaited first!");
13836                 }
13837                 const nativeResponseValue = wasm.TS_ChannelManager_send_spontaneous_payment(this_arg, route, encodeUint8Array(payment_preimage));
13838                 return nativeResponseValue;
13839         }
13840         // 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);
13841         export function ChannelManager_funding_transaction_generated(this_arg: number, temporary_channel_id: Uint8Array, funding_transaction: Uint8Array): number {
13842                 if(!isWasmInitialized) {
13843                         throw new Error("initializeWasm() must be awaited first!");
13844                 }
13845                 const nativeResponseValue = wasm.TS_ChannelManager_funding_transaction_generated(this_arg, encodeUint8Array(temporary_channel_id), encodeUint8Array(funding_transaction));
13846                 return nativeResponseValue;
13847         }
13848         // void ChannelManager_broadcast_node_announcement(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThreeBytes rgb, struct LDKThirtyTwoBytes alias, struct LDKCVec_NetAddressZ addresses);
13849         export function ChannelManager_broadcast_node_announcement(this_arg: number, rgb: Uint8Array, alias: Uint8Array, addresses: number[]): void {
13850                 if(!isWasmInitialized) {
13851                         throw new Error("initializeWasm() must be awaited first!");
13852                 }
13853                 const nativeResponseValue = wasm.TS_ChannelManager_broadcast_node_announcement(this_arg, encodeUint8Array(rgb), encodeUint8Array(alias), addresses);
13854                 // debug statements here
13855         }
13856         // void ChannelManager_process_pending_htlc_forwards(const struct LDKChannelManager *NONNULL_PTR this_arg);
13857         export function ChannelManager_process_pending_htlc_forwards(this_arg: number): void {
13858                 if(!isWasmInitialized) {
13859                         throw new Error("initializeWasm() must be awaited first!");
13860                 }
13861                 const nativeResponseValue = wasm.TS_ChannelManager_process_pending_htlc_forwards(this_arg);
13862                 // debug statements here
13863         }
13864         // void ChannelManager_timer_tick_occurred(const struct LDKChannelManager *NONNULL_PTR this_arg);
13865         export function ChannelManager_timer_tick_occurred(this_arg: number): void {
13866                 if(!isWasmInitialized) {
13867                         throw new Error("initializeWasm() must be awaited first!");
13868                 }
13869                 const nativeResponseValue = wasm.TS_ChannelManager_timer_tick_occurred(this_arg);
13870                 // debug statements here
13871         }
13872         // MUST_USE_RES bool ChannelManager_fail_htlc_backwards(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*payment_hash)[32]);
13873         export function ChannelManager_fail_htlc_backwards(this_arg: number, payment_hash: Uint8Array): boolean {
13874                 if(!isWasmInitialized) {
13875                         throw new Error("initializeWasm() must be awaited first!");
13876                 }
13877                 const nativeResponseValue = wasm.TS_ChannelManager_fail_htlc_backwards(this_arg, encodeUint8Array(payment_hash));
13878                 return nativeResponseValue;
13879         }
13880         // MUST_USE_RES bool ChannelManager_claim_funds(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_preimage);
13881         export function ChannelManager_claim_funds(this_arg: number, payment_preimage: Uint8Array): boolean {
13882                 if(!isWasmInitialized) {
13883                         throw new Error("initializeWasm() must be awaited first!");
13884                 }
13885                 const nativeResponseValue = wasm.TS_ChannelManager_claim_funds(this_arg, encodeUint8Array(payment_preimage));
13886                 return nativeResponseValue;
13887         }
13888         // MUST_USE_RES struct LDKPublicKey ChannelManager_get_our_node_id(const struct LDKChannelManager *NONNULL_PTR this_arg);
13889         export function ChannelManager_get_our_node_id(this_arg: number): Uint8Array {
13890                 if(!isWasmInitialized) {
13891                         throw new Error("initializeWasm() must be awaited first!");
13892                 }
13893                 const nativeResponseValue = wasm.TS_ChannelManager_get_our_node_id(this_arg);
13894                 return decodeUint8Array(nativeResponseValue);
13895         }
13896         // MUST_USE_RES struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ ChannelManager_create_inbound_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKCOption_u64Z min_value_msat, uint32_t invoice_expiry_delta_secs);
13897         export function ChannelManager_create_inbound_payment(this_arg: number, min_value_msat: number, invoice_expiry_delta_secs: number): number {
13898                 if(!isWasmInitialized) {
13899                         throw new Error("initializeWasm() must be awaited first!");
13900                 }
13901                 const nativeResponseValue = wasm.TS_ChannelManager_create_inbound_payment(this_arg, min_value_msat, invoice_expiry_delta_secs);
13902                 return nativeResponseValue;
13903         }
13904         // MUST_USE_RES struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ ChannelManager_create_inbound_payment_legacy(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKCOption_u64Z min_value_msat, uint32_t invoice_expiry_delta_secs);
13905         export function ChannelManager_create_inbound_payment_legacy(this_arg: number, min_value_msat: number, invoice_expiry_delta_secs: number): number {
13906                 if(!isWasmInitialized) {
13907                         throw new Error("initializeWasm() must be awaited first!");
13908                 }
13909                 const nativeResponseValue = wasm.TS_ChannelManager_create_inbound_payment_legacy(this_arg, min_value_msat, invoice_expiry_delta_secs);
13910                 return nativeResponseValue;
13911         }
13912         // MUST_USE_RES struct LDKCResult_PaymentSecretNoneZ ChannelManager_create_inbound_payment_for_hash(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_hash, struct LDKCOption_u64Z min_value_msat, uint32_t invoice_expiry_delta_secs);
13913         export function ChannelManager_create_inbound_payment_for_hash(this_arg: number, payment_hash: Uint8Array, min_value_msat: number, invoice_expiry_delta_secs: number): number {
13914                 if(!isWasmInitialized) {
13915                         throw new Error("initializeWasm() must be awaited first!");
13916                 }
13917                 const nativeResponseValue = wasm.TS_ChannelManager_create_inbound_payment_for_hash(this_arg, encodeUint8Array(payment_hash), min_value_msat, invoice_expiry_delta_secs);
13918                 return nativeResponseValue;
13919         }
13920         // MUST_USE_RES struct LDKCResult_PaymentSecretAPIErrorZ ChannelManager_create_inbound_payment_for_hash_legacy(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_hash, struct LDKCOption_u64Z min_value_msat, uint32_t invoice_expiry_delta_secs);
13921         export function ChannelManager_create_inbound_payment_for_hash_legacy(this_arg: number, payment_hash: Uint8Array, min_value_msat: number, invoice_expiry_delta_secs: number): number {
13922                 if(!isWasmInitialized) {
13923                         throw new Error("initializeWasm() must be awaited first!");
13924                 }
13925                 const nativeResponseValue = wasm.TS_ChannelManager_create_inbound_payment_for_hash_legacy(this_arg, encodeUint8Array(payment_hash), min_value_msat, invoice_expiry_delta_secs);
13926                 return nativeResponseValue;
13927         }
13928         // MUST_USE_RES struct LDKCResult_PaymentPreimageAPIErrorZ ChannelManager_get_payment_preimage(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_hash, struct LDKThirtyTwoBytes payment_secret);
13929         export function ChannelManager_get_payment_preimage(this_arg: number, payment_hash: Uint8Array, payment_secret: Uint8Array): number {
13930                 if(!isWasmInitialized) {
13931                         throw new Error("initializeWasm() must be awaited first!");
13932                 }
13933                 const nativeResponseValue = wasm.TS_ChannelManager_get_payment_preimage(this_arg, encodeUint8Array(payment_hash), encodeUint8Array(payment_secret));
13934                 return nativeResponseValue;
13935         }
13936         // struct LDKMessageSendEventsProvider ChannelManager_as_MessageSendEventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
13937         export function ChannelManager_as_MessageSendEventsProvider(this_arg: number): number {
13938                 if(!isWasmInitialized) {
13939                         throw new Error("initializeWasm() must be awaited first!");
13940                 }
13941                 const nativeResponseValue = wasm.TS_ChannelManager_as_MessageSendEventsProvider(this_arg);
13942                 return nativeResponseValue;
13943         }
13944         // struct LDKEventsProvider ChannelManager_as_EventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
13945         export function ChannelManager_as_EventsProvider(this_arg: number): number {
13946                 if(!isWasmInitialized) {
13947                         throw new Error("initializeWasm() must be awaited first!");
13948                 }
13949                 const nativeResponseValue = wasm.TS_ChannelManager_as_EventsProvider(this_arg);
13950                 return nativeResponseValue;
13951         }
13952         // struct LDKListen ChannelManager_as_Listen(const struct LDKChannelManager *NONNULL_PTR this_arg);
13953         export function ChannelManager_as_Listen(this_arg: number): number {
13954                 if(!isWasmInitialized) {
13955                         throw new Error("initializeWasm() must be awaited first!");
13956                 }
13957                 const nativeResponseValue = wasm.TS_ChannelManager_as_Listen(this_arg);
13958                 return nativeResponseValue;
13959         }
13960         // struct LDKConfirm ChannelManager_as_Confirm(const struct LDKChannelManager *NONNULL_PTR this_arg);
13961         export function ChannelManager_as_Confirm(this_arg: number): number {
13962                 if(!isWasmInitialized) {
13963                         throw new Error("initializeWasm() must be awaited first!");
13964                 }
13965                 const nativeResponseValue = wasm.TS_ChannelManager_as_Confirm(this_arg);
13966                 return nativeResponseValue;
13967         }
13968         // void ChannelManager_await_persistable_update(const struct LDKChannelManager *NONNULL_PTR this_arg);
13969         export function ChannelManager_await_persistable_update(this_arg: number): void {
13970                 if(!isWasmInitialized) {
13971                         throw new Error("initializeWasm() must be awaited first!");
13972                 }
13973                 const nativeResponseValue = wasm.TS_ChannelManager_await_persistable_update(this_arg);
13974                 // debug statements here
13975         }
13976         // MUST_USE_RES struct LDKBestBlock ChannelManager_current_best_block(const struct LDKChannelManager *NONNULL_PTR this_arg);
13977         export function ChannelManager_current_best_block(this_arg: number): number {
13978                 if(!isWasmInitialized) {
13979                         throw new Error("initializeWasm() must be awaited first!");
13980                 }
13981                 const nativeResponseValue = wasm.TS_ChannelManager_current_best_block(this_arg);
13982                 return nativeResponseValue;
13983         }
13984         // struct LDKChannelMessageHandler ChannelManager_as_ChannelMessageHandler(const struct LDKChannelManager *NONNULL_PTR this_arg);
13985         export function ChannelManager_as_ChannelMessageHandler(this_arg: number): number {
13986                 if(!isWasmInitialized) {
13987                         throw new Error("initializeWasm() must be awaited first!");
13988                 }
13989                 const nativeResponseValue = wasm.TS_ChannelManager_as_ChannelMessageHandler(this_arg);
13990                 return nativeResponseValue;
13991         }
13992         // struct LDKCVec_u8Z ChannelManager_write(const struct LDKChannelManager *NONNULL_PTR obj);
13993         export function ChannelManager_write(obj: number): Uint8Array {
13994                 if(!isWasmInitialized) {
13995                         throw new Error("initializeWasm() must be awaited first!");
13996                 }
13997                 const nativeResponseValue = wasm.TS_ChannelManager_write(obj);
13998                 return decodeUint8Array(nativeResponseValue);
13999         }
14000         // void ChannelManagerReadArgs_free(struct LDKChannelManagerReadArgs this_obj);
14001         export function ChannelManagerReadArgs_free(this_obj: number): void {
14002                 if(!isWasmInitialized) {
14003                         throw new Error("initializeWasm() must be awaited first!");
14004                 }
14005                 const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_free(this_obj);
14006                 // debug statements here
14007         }
14008         // const struct LDKKeysInterface *ChannelManagerReadArgs_get_keys_manager(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
14009         export function ChannelManagerReadArgs_get_keys_manager(this_ptr: number): number {
14010                 if(!isWasmInitialized) {
14011                         throw new Error("initializeWasm() must be awaited first!");
14012                 }
14013                 const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_get_keys_manager(this_ptr);
14014                 return nativeResponseValue;
14015         }
14016         // void ChannelManagerReadArgs_set_keys_manager(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKKeysInterface val);
14017         export function ChannelManagerReadArgs_set_keys_manager(this_ptr: number, val: number): void {
14018                 if(!isWasmInitialized) {
14019                         throw new Error("initializeWasm() must be awaited first!");
14020                 }
14021                 const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_set_keys_manager(this_ptr, val);
14022                 // debug statements here
14023         }
14024         // const struct LDKFeeEstimator *ChannelManagerReadArgs_get_fee_estimator(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
14025         export function ChannelManagerReadArgs_get_fee_estimator(this_ptr: number): number {
14026                 if(!isWasmInitialized) {
14027                         throw new Error("initializeWasm() must be awaited first!");
14028                 }
14029                 const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_get_fee_estimator(this_ptr);
14030                 return nativeResponseValue;
14031         }
14032         // void ChannelManagerReadArgs_set_fee_estimator(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKFeeEstimator val);
14033         export function ChannelManagerReadArgs_set_fee_estimator(this_ptr: number, val: number): void {
14034                 if(!isWasmInitialized) {
14035                         throw new Error("initializeWasm() must be awaited first!");
14036                 }
14037                 const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_set_fee_estimator(this_ptr, val);
14038                 // debug statements here
14039         }
14040         // const struct LDKWatch *ChannelManagerReadArgs_get_chain_monitor(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
14041         export function ChannelManagerReadArgs_get_chain_monitor(this_ptr: number): number {
14042                 if(!isWasmInitialized) {
14043                         throw new Error("initializeWasm() must be awaited first!");
14044                 }
14045                 const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_get_chain_monitor(this_ptr);
14046                 return nativeResponseValue;
14047         }
14048         // void ChannelManagerReadArgs_set_chain_monitor(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKWatch val);
14049         export function ChannelManagerReadArgs_set_chain_monitor(this_ptr: number, val: number): void {
14050                 if(!isWasmInitialized) {
14051                         throw new Error("initializeWasm() must be awaited first!");
14052                 }
14053                 const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_set_chain_monitor(this_ptr, val);
14054                 // debug statements here
14055         }
14056         // const struct LDKBroadcasterInterface *ChannelManagerReadArgs_get_tx_broadcaster(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
14057         export function ChannelManagerReadArgs_get_tx_broadcaster(this_ptr: number): number {
14058                 if(!isWasmInitialized) {
14059                         throw new Error("initializeWasm() must be awaited first!");
14060                 }
14061                 const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_get_tx_broadcaster(this_ptr);
14062                 return nativeResponseValue;
14063         }
14064         // void ChannelManagerReadArgs_set_tx_broadcaster(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKBroadcasterInterface val);
14065         export function ChannelManagerReadArgs_set_tx_broadcaster(this_ptr: number, val: number): void {
14066                 if(!isWasmInitialized) {
14067                         throw new Error("initializeWasm() must be awaited first!");
14068                 }
14069                 const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_set_tx_broadcaster(this_ptr, val);
14070                 // debug statements here
14071         }
14072         // const struct LDKLogger *ChannelManagerReadArgs_get_logger(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
14073         export function ChannelManagerReadArgs_get_logger(this_ptr: number): number {
14074                 if(!isWasmInitialized) {
14075                         throw new Error("initializeWasm() must be awaited first!");
14076                 }
14077                 const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_get_logger(this_ptr);
14078                 return nativeResponseValue;
14079         }
14080         // void ChannelManagerReadArgs_set_logger(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKLogger val);
14081         export function ChannelManagerReadArgs_set_logger(this_ptr: number, val: number): void {
14082                 if(!isWasmInitialized) {
14083                         throw new Error("initializeWasm() must be awaited first!");
14084                 }
14085                 const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_set_logger(this_ptr, val);
14086                 // debug statements here
14087         }
14088         // struct LDKUserConfig ChannelManagerReadArgs_get_default_config(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
14089         export function ChannelManagerReadArgs_get_default_config(this_ptr: number): number {
14090                 if(!isWasmInitialized) {
14091                         throw new Error("initializeWasm() must be awaited first!");
14092                 }
14093                 const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_get_default_config(this_ptr);
14094                 return nativeResponseValue;
14095         }
14096         // void ChannelManagerReadArgs_set_default_config(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKUserConfig val);
14097         export function ChannelManagerReadArgs_set_default_config(this_ptr: number, val: number): void {
14098                 if(!isWasmInitialized) {
14099                         throw new Error("initializeWasm() must be awaited first!");
14100                 }
14101                 const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_set_default_config(this_ptr, val);
14102                 // debug statements here
14103         }
14104         // 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);
14105         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 {
14106                 if(!isWasmInitialized) {
14107                         throw new Error("initializeWasm() must be awaited first!");
14108                 }
14109                 const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_new(keys_manager, fee_estimator, chain_monitor, tx_broadcaster, logger, default_config, channel_monitors);
14110                 return nativeResponseValue;
14111         }
14112         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ C2Tuple_BlockHashChannelManagerZ_read(struct LDKu8slice ser, struct LDKChannelManagerReadArgs arg);
14113         export function C2Tuple_BlockHashChannelManagerZ_read(ser: Uint8Array, arg: number): number {
14114                 if(!isWasmInitialized) {
14115                         throw new Error("initializeWasm() must be awaited first!");
14116                 }
14117                 const nativeResponseValue = wasm.TS_C2Tuple_BlockHashChannelManagerZ_read(encodeUint8Array(ser), arg);
14118                 return nativeResponseValue;
14119         }
14120         // void DecodeError_free(struct LDKDecodeError this_obj);
14121         export function DecodeError_free(this_obj: number): void {
14122                 if(!isWasmInitialized) {
14123                         throw new Error("initializeWasm() must be awaited first!");
14124                 }
14125                 const nativeResponseValue = wasm.TS_DecodeError_free(this_obj);
14126                 // debug statements here
14127         }
14128         // uint64_t DecodeError_clone_ptr(LDKDecodeError *NONNULL_PTR arg);
14129         export function DecodeError_clone_ptr(arg: number): number {
14130                 if(!isWasmInitialized) {
14131                         throw new Error("initializeWasm() must be awaited first!");
14132                 }
14133                 const nativeResponseValue = wasm.TS_DecodeError_clone_ptr(arg);
14134                 return nativeResponseValue;
14135         }
14136         // struct LDKDecodeError DecodeError_clone(const struct LDKDecodeError *NONNULL_PTR orig);
14137         export function DecodeError_clone(orig: number): number {
14138                 if(!isWasmInitialized) {
14139                         throw new Error("initializeWasm() must be awaited first!");
14140                 }
14141                 const nativeResponseValue = wasm.TS_DecodeError_clone(orig);
14142                 return nativeResponseValue;
14143         }
14144         // void Init_free(struct LDKInit this_obj);
14145         export function Init_free(this_obj: number): void {
14146                 if(!isWasmInitialized) {
14147                         throw new Error("initializeWasm() must be awaited first!");
14148                 }
14149                 const nativeResponseValue = wasm.TS_Init_free(this_obj);
14150                 // debug statements here
14151         }
14152         // struct LDKInitFeatures Init_get_features(const struct LDKInit *NONNULL_PTR this_ptr);
14153         export function Init_get_features(this_ptr: number): number {
14154                 if(!isWasmInitialized) {
14155                         throw new Error("initializeWasm() must be awaited first!");
14156                 }
14157                 const nativeResponseValue = wasm.TS_Init_get_features(this_ptr);
14158                 return nativeResponseValue;
14159         }
14160         // void Init_set_features(struct LDKInit *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
14161         export function Init_set_features(this_ptr: number, val: number): void {
14162                 if(!isWasmInitialized) {
14163                         throw new Error("initializeWasm() must be awaited first!");
14164                 }
14165                 const nativeResponseValue = wasm.TS_Init_set_features(this_ptr, val);
14166                 // debug statements here
14167         }
14168         // MUST_USE_RES struct LDKInit Init_new(struct LDKInitFeatures features_arg);
14169         export function Init_new(features_arg: number): number {
14170                 if(!isWasmInitialized) {
14171                         throw new Error("initializeWasm() must be awaited first!");
14172                 }
14173                 const nativeResponseValue = wasm.TS_Init_new(features_arg);
14174                 return nativeResponseValue;
14175         }
14176         // uint64_t Init_clone_ptr(LDKInit *NONNULL_PTR arg);
14177         export function Init_clone_ptr(arg: number): number {
14178                 if(!isWasmInitialized) {
14179                         throw new Error("initializeWasm() must be awaited first!");
14180                 }
14181                 const nativeResponseValue = wasm.TS_Init_clone_ptr(arg);
14182                 return nativeResponseValue;
14183         }
14184         // struct LDKInit Init_clone(const struct LDKInit *NONNULL_PTR orig);
14185         export function Init_clone(orig: number): number {
14186                 if(!isWasmInitialized) {
14187                         throw new Error("initializeWasm() must be awaited first!");
14188                 }
14189                 const nativeResponseValue = wasm.TS_Init_clone(orig);
14190                 return nativeResponseValue;
14191         }
14192         // void ErrorMessage_free(struct LDKErrorMessage this_obj);
14193         export function ErrorMessage_free(this_obj: number): void {
14194                 if(!isWasmInitialized) {
14195                         throw new Error("initializeWasm() must be awaited first!");
14196                 }
14197                 const nativeResponseValue = wasm.TS_ErrorMessage_free(this_obj);
14198                 // debug statements here
14199         }
14200         // const uint8_t (*ErrorMessage_get_channel_id(const struct LDKErrorMessage *NONNULL_PTR this_ptr))[32];
14201         export function ErrorMessage_get_channel_id(this_ptr: number): Uint8Array {
14202                 if(!isWasmInitialized) {
14203                         throw new Error("initializeWasm() must be awaited first!");
14204                 }
14205                 const nativeResponseValue = wasm.TS_ErrorMessage_get_channel_id(this_ptr);
14206                 return decodeUint8Array(nativeResponseValue);
14207         }
14208         // void ErrorMessage_set_channel_id(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14209         export function ErrorMessage_set_channel_id(this_ptr: number, val: Uint8Array): void {
14210                 if(!isWasmInitialized) {
14211                         throw new Error("initializeWasm() must be awaited first!");
14212                 }
14213                 const nativeResponseValue = wasm.TS_ErrorMessage_set_channel_id(this_ptr, encodeUint8Array(val));
14214                 // debug statements here
14215         }
14216         // struct LDKStr ErrorMessage_get_data(const struct LDKErrorMessage *NONNULL_PTR this_ptr);
14217         export function ErrorMessage_get_data(this_ptr: number): String {
14218                 if(!isWasmInitialized) {
14219                         throw new Error("initializeWasm() must be awaited first!");
14220                 }
14221                 const nativeResponseValue = wasm.TS_ErrorMessage_get_data(this_ptr);
14222                 return nativeResponseValue;
14223         }
14224         // void ErrorMessage_set_data(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKStr val);
14225         export function ErrorMessage_set_data(this_ptr: number, val: String): void {
14226                 if(!isWasmInitialized) {
14227                         throw new Error("initializeWasm() must be awaited first!");
14228                 }
14229                 const nativeResponseValue = wasm.TS_ErrorMessage_set_data(this_ptr, val);
14230                 // debug statements here
14231         }
14232         // MUST_USE_RES struct LDKErrorMessage ErrorMessage_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKStr data_arg);
14233         export function ErrorMessage_new(channel_id_arg: Uint8Array, data_arg: String): number {
14234                 if(!isWasmInitialized) {
14235                         throw new Error("initializeWasm() must be awaited first!");
14236                 }
14237                 const nativeResponseValue = wasm.TS_ErrorMessage_new(encodeUint8Array(channel_id_arg), data_arg);
14238                 return nativeResponseValue;
14239         }
14240         // uint64_t ErrorMessage_clone_ptr(LDKErrorMessage *NONNULL_PTR arg);
14241         export function ErrorMessage_clone_ptr(arg: number): number {
14242                 if(!isWasmInitialized) {
14243                         throw new Error("initializeWasm() must be awaited first!");
14244                 }
14245                 const nativeResponseValue = wasm.TS_ErrorMessage_clone_ptr(arg);
14246                 return nativeResponseValue;
14247         }
14248         // struct LDKErrorMessage ErrorMessage_clone(const struct LDKErrorMessage *NONNULL_PTR orig);
14249         export function ErrorMessage_clone(orig: number): number {
14250                 if(!isWasmInitialized) {
14251                         throw new Error("initializeWasm() must be awaited first!");
14252                 }
14253                 const nativeResponseValue = wasm.TS_ErrorMessage_clone(orig);
14254                 return nativeResponseValue;
14255         }
14256         // void Ping_free(struct LDKPing this_obj);
14257         export function Ping_free(this_obj: number): void {
14258                 if(!isWasmInitialized) {
14259                         throw new Error("initializeWasm() must be awaited first!");
14260                 }
14261                 const nativeResponseValue = wasm.TS_Ping_free(this_obj);
14262                 // debug statements here
14263         }
14264         // uint16_t Ping_get_ponglen(const struct LDKPing *NONNULL_PTR this_ptr);
14265         export function Ping_get_ponglen(this_ptr: number): number {
14266                 if(!isWasmInitialized) {
14267                         throw new Error("initializeWasm() must be awaited first!");
14268                 }
14269                 const nativeResponseValue = wasm.TS_Ping_get_ponglen(this_ptr);
14270                 return nativeResponseValue;
14271         }
14272         // void Ping_set_ponglen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
14273         export function Ping_set_ponglen(this_ptr: number, val: number): void {
14274                 if(!isWasmInitialized) {
14275                         throw new Error("initializeWasm() must be awaited first!");
14276                 }
14277                 const nativeResponseValue = wasm.TS_Ping_set_ponglen(this_ptr, val);
14278                 // debug statements here
14279         }
14280         // uint16_t Ping_get_byteslen(const struct LDKPing *NONNULL_PTR this_ptr);
14281         export function Ping_get_byteslen(this_ptr: number): number {
14282                 if(!isWasmInitialized) {
14283                         throw new Error("initializeWasm() must be awaited first!");
14284                 }
14285                 const nativeResponseValue = wasm.TS_Ping_get_byteslen(this_ptr);
14286                 return nativeResponseValue;
14287         }
14288         // void Ping_set_byteslen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
14289         export function Ping_set_byteslen(this_ptr: number, val: number): void {
14290                 if(!isWasmInitialized) {
14291                         throw new Error("initializeWasm() must be awaited first!");
14292                 }
14293                 const nativeResponseValue = wasm.TS_Ping_set_byteslen(this_ptr, val);
14294                 // debug statements here
14295         }
14296         // MUST_USE_RES struct LDKPing Ping_new(uint16_t ponglen_arg, uint16_t byteslen_arg);
14297         export function Ping_new(ponglen_arg: number, byteslen_arg: number): number {
14298                 if(!isWasmInitialized) {
14299                         throw new Error("initializeWasm() must be awaited first!");
14300                 }
14301                 const nativeResponseValue = wasm.TS_Ping_new(ponglen_arg, byteslen_arg);
14302                 return nativeResponseValue;
14303         }
14304         // uint64_t Ping_clone_ptr(LDKPing *NONNULL_PTR arg);
14305         export function Ping_clone_ptr(arg: number): number {
14306                 if(!isWasmInitialized) {
14307                         throw new Error("initializeWasm() must be awaited first!");
14308                 }
14309                 const nativeResponseValue = wasm.TS_Ping_clone_ptr(arg);
14310                 return nativeResponseValue;
14311         }
14312         // struct LDKPing Ping_clone(const struct LDKPing *NONNULL_PTR orig);
14313         export function Ping_clone(orig: number): number {
14314                 if(!isWasmInitialized) {
14315                         throw new Error("initializeWasm() must be awaited first!");
14316                 }
14317                 const nativeResponseValue = wasm.TS_Ping_clone(orig);
14318                 return nativeResponseValue;
14319         }
14320         // void Pong_free(struct LDKPong this_obj);
14321         export function Pong_free(this_obj: number): void {
14322                 if(!isWasmInitialized) {
14323                         throw new Error("initializeWasm() must be awaited first!");
14324                 }
14325                 const nativeResponseValue = wasm.TS_Pong_free(this_obj);
14326                 // debug statements here
14327         }
14328         // uint16_t Pong_get_byteslen(const struct LDKPong *NONNULL_PTR this_ptr);
14329         export function Pong_get_byteslen(this_ptr: number): number {
14330                 if(!isWasmInitialized) {
14331                         throw new Error("initializeWasm() must be awaited first!");
14332                 }
14333                 const nativeResponseValue = wasm.TS_Pong_get_byteslen(this_ptr);
14334                 return nativeResponseValue;
14335         }
14336         // void Pong_set_byteslen(struct LDKPong *NONNULL_PTR this_ptr, uint16_t val);
14337         export function Pong_set_byteslen(this_ptr: number, val: number): void {
14338                 if(!isWasmInitialized) {
14339                         throw new Error("initializeWasm() must be awaited first!");
14340                 }
14341                 const nativeResponseValue = wasm.TS_Pong_set_byteslen(this_ptr, val);
14342                 // debug statements here
14343         }
14344         // MUST_USE_RES struct LDKPong Pong_new(uint16_t byteslen_arg);
14345         export function Pong_new(byteslen_arg: number): number {
14346                 if(!isWasmInitialized) {
14347                         throw new Error("initializeWasm() must be awaited first!");
14348                 }
14349                 const nativeResponseValue = wasm.TS_Pong_new(byteslen_arg);
14350                 return nativeResponseValue;
14351         }
14352         // uint64_t Pong_clone_ptr(LDKPong *NONNULL_PTR arg);
14353         export function Pong_clone_ptr(arg: number): number {
14354                 if(!isWasmInitialized) {
14355                         throw new Error("initializeWasm() must be awaited first!");
14356                 }
14357                 const nativeResponseValue = wasm.TS_Pong_clone_ptr(arg);
14358                 return nativeResponseValue;
14359         }
14360         // struct LDKPong Pong_clone(const struct LDKPong *NONNULL_PTR orig);
14361         export function Pong_clone(orig: number): number {
14362                 if(!isWasmInitialized) {
14363                         throw new Error("initializeWasm() must be awaited first!");
14364                 }
14365                 const nativeResponseValue = wasm.TS_Pong_clone(orig);
14366                 return nativeResponseValue;
14367         }
14368         // void OpenChannel_free(struct LDKOpenChannel this_obj);
14369         export function OpenChannel_free(this_obj: number): void {
14370                 if(!isWasmInitialized) {
14371                         throw new Error("initializeWasm() must be awaited first!");
14372                 }
14373                 const nativeResponseValue = wasm.TS_OpenChannel_free(this_obj);
14374                 // debug statements here
14375         }
14376         // const uint8_t (*OpenChannel_get_chain_hash(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
14377         export function OpenChannel_get_chain_hash(this_ptr: number): Uint8Array {
14378                 if(!isWasmInitialized) {
14379                         throw new Error("initializeWasm() must be awaited first!");
14380                 }
14381                 const nativeResponseValue = wasm.TS_OpenChannel_get_chain_hash(this_ptr);
14382                 return decodeUint8Array(nativeResponseValue);
14383         }
14384         // void OpenChannel_set_chain_hash(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14385         export function OpenChannel_set_chain_hash(this_ptr: number, val: Uint8Array): void {
14386                 if(!isWasmInitialized) {
14387                         throw new Error("initializeWasm() must be awaited first!");
14388                 }
14389                 const nativeResponseValue = wasm.TS_OpenChannel_set_chain_hash(this_ptr, encodeUint8Array(val));
14390                 // debug statements here
14391         }
14392         // const uint8_t (*OpenChannel_get_temporary_channel_id(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
14393         export function OpenChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
14394                 if(!isWasmInitialized) {
14395                         throw new Error("initializeWasm() must be awaited first!");
14396                 }
14397                 const nativeResponseValue = wasm.TS_OpenChannel_get_temporary_channel_id(this_ptr);
14398                 return decodeUint8Array(nativeResponseValue);
14399         }
14400         // void OpenChannel_set_temporary_channel_id(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14401         export function OpenChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
14402                 if(!isWasmInitialized) {
14403                         throw new Error("initializeWasm() must be awaited first!");
14404                 }
14405                 const nativeResponseValue = wasm.TS_OpenChannel_set_temporary_channel_id(this_ptr, encodeUint8Array(val));
14406                 // debug statements here
14407         }
14408         // uint64_t OpenChannel_get_funding_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
14409         export function OpenChannel_get_funding_satoshis(this_ptr: number): number {
14410                 if(!isWasmInitialized) {
14411                         throw new Error("initializeWasm() must be awaited first!");
14412                 }
14413                 const nativeResponseValue = wasm.TS_OpenChannel_get_funding_satoshis(this_ptr);
14414                 return nativeResponseValue;
14415         }
14416         // void OpenChannel_set_funding_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
14417         export function OpenChannel_set_funding_satoshis(this_ptr: number, val: number): void {
14418                 if(!isWasmInitialized) {
14419                         throw new Error("initializeWasm() must be awaited first!");
14420                 }
14421                 const nativeResponseValue = wasm.TS_OpenChannel_set_funding_satoshis(this_ptr, val);
14422                 // debug statements here
14423         }
14424         // uint64_t OpenChannel_get_push_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
14425         export function OpenChannel_get_push_msat(this_ptr: number): number {
14426                 if(!isWasmInitialized) {
14427                         throw new Error("initializeWasm() must be awaited first!");
14428                 }
14429                 const nativeResponseValue = wasm.TS_OpenChannel_get_push_msat(this_ptr);
14430                 return nativeResponseValue;
14431         }
14432         // void OpenChannel_set_push_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
14433         export function OpenChannel_set_push_msat(this_ptr: number, val: number): void {
14434                 if(!isWasmInitialized) {
14435                         throw new Error("initializeWasm() must be awaited first!");
14436                 }
14437                 const nativeResponseValue = wasm.TS_OpenChannel_set_push_msat(this_ptr, val);
14438                 // debug statements here
14439         }
14440         // uint64_t OpenChannel_get_dust_limit_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
14441         export function OpenChannel_get_dust_limit_satoshis(this_ptr: number): number {
14442                 if(!isWasmInitialized) {
14443                         throw new Error("initializeWasm() must be awaited first!");
14444                 }
14445                 const nativeResponseValue = wasm.TS_OpenChannel_get_dust_limit_satoshis(this_ptr);
14446                 return nativeResponseValue;
14447         }
14448         // void OpenChannel_set_dust_limit_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
14449         export function OpenChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
14450                 if(!isWasmInitialized) {
14451                         throw new Error("initializeWasm() must be awaited first!");
14452                 }
14453                 const nativeResponseValue = wasm.TS_OpenChannel_set_dust_limit_satoshis(this_ptr, val);
14454                 // debug statements here
14455         }
14456         // uint64_t OpenChannel_get_max_htlc_value_in_flight_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
14457         export function OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
14458                 if(!isWasmInitialized) {
14459                         throw new Error("initializeWasm() must be awaited first!");
14460                 }
14461                 const nativeResponseValue = wasm.TS_OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr);
14462                 return nativeResponseValue;
14463         }
14464         // void OpenChannel_set_max_htlc_value_in_flight_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
14465         export function OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
14466                 if(!isWasmInitialized) {
14467                         throw new Error("initializeWasm() must be awaited first!");
14468                 }
14469                 const nativeResponseValue = wasm.TS_OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
14470                 // debug statements here
14471         }
14472         // uint64_t OpenChannel_get_channel_reserve_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
14473         export function OpenChannel_get_channel_reserve_satoshis(this_ptr: number): number {
14474                 if(!isWasmInitialized) {
14475                         throw new Error("initializeWasm() must be awaited first!");
14476                 }
14477                 const nativeResponseValue = wasm.TS_OpenChannel_get_channel_reserve_satoshis(this_ptr);
14478                 return nativeResponseValue;
14479         }
14480         // void OpenChannel_set_channel_reserve_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
14481         export function OpenChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
14482                 if(!isWasmInitialized) {
14483                         throw new Error("initializeWasm() must be awaited first!");
14484                 }
14485                 const nativeResponseValue = wasm.TS_OpenChannel_set_channel_reserve_satoshis(this_ptr, val);
14486                 // debug statements here
14487         }
14488         // uint64_t OpenChannel_get_htlc_minimum_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
14489         export function OpenChannel_get_htlc_minimum_msat(this_ptr: number): number {
14490                 if(!isWasmInitialized) {
14491                         throw new Error("initializeWasm() must be awaited first!");
14492                 }
14493                 const nativeResponseValue = wasm.TS_OpenChannel_get_htlc_minimum_msat(this_ptr);
14494                 return nativeResponseValue;
14495         }
14496         // void OpenChannel_set_htlc_minimum_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
14497         export function OpenChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
14498                 if(!isWasmInitialized) {
14499                         throw new Error("initializeWasm() must be awaited first!");
14500                 }
14501                 const nativeResponseValue = wasm.TS_OpenChannel_set_htlc_minimum_msat(this_ptr, val);
14502                 // debug statements here
14503         }
14504         // uint32_t OpenChannel_get_feerate_per_kw(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
14505         export function OpenChannel_get_feerate_per_kw(this_ptr: number): number {
14506                 if(!isWasmInitialized) {
14507                         throw new Error("initializeWasm() must be awaited first!");
14508                 }
14509                 const nativeResponseValue = wasm.TS_OpenChannel_get_feerate_per_kw(this_ptr);
14510                 return nativeResponseValue;
14511         }
14512         // void OpenChannel_set_feerate_per_kw(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint32_t val);
14513         export function OpenChannel_set_feerate_per_kw(this_ptr: number, val: number): void {
14514                 if(!isWasmInitialized) {
14515                         throw new Error("initializeWasm() must be awaited first!");
14516                 }
14517                 const nativeResponseValue = wasm.TS_OpenChannel_set_feerate_per_kw(this_ptr, val);
14518                 // debug statements here
14519         }
14520         // uint16_t OpenChannel_get_to_self_delay(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
14521         export function OpenChannel_get_to_self_delay(this_ptr: number): number {
14522                 if(!isWasmInitialized) {
14523                         throw new Error("initializeWasm() must be awaited first!");
14524                 }
14525                 const nativeResponseValue = wasm.TS_OpenChannel_get_to_self_delay(this_ptr);
14526                 return nativeResponseValue;
14527         }
14528         // void OpenChannel_set_to_self_delay(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
14529         export function OpenChannel_set_to_self_delay(this_ptr: number, val: number): void {
14530                 if(!isWasmInitialized) {
14531                         throw new Error("initializeWasm() must be awaited first!");
14532                 }
14533                 const nativeResponseValue = wasm.TS_OpenChannel_set_to_self_delay(this_ptr, val);
14534                 // debug statements here
14535         }
14536         // uint16_t OpenChannel_get_max_accepted_htlcs(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
14537         export function OpenChannel_get_max_accepted_htlcs(this_ptr: number): number {
14538                 if(!isWasmInitialized) {
14539                         throw new Error("initializeWasm() must be awaited first!");
14540                 }
14541                 const nativeResponseValue = wasm.TS_OpenChannel_get_max_accepted_htlcs(this_ptr);
14542                 return nativeResponseValue;
14543         }
14544         // void OpenChannel_set_max_accepted_htlcs(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
14545         export function OpenChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
14546                 if(!isWasmInitialized) {
14547                         throw new Error("initializeWasm() must be awaited first!");
14548                 }
14549                 const nativeResponseValue = wasm.TS_OpenChannel_set_max_accepted_htlcs(this_ptr, val);
14550                 // debug statements here
14551         }
14552         // struct LDKPublicKey OpenChannel_get_funding_pubkey(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
14553         export function OpenChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
14554                 if(!isWasmInitialized) {
14555                         throw new Error("initializeWasm() must be awaited first!");
14556                 }
14557                 const nativeResponseValue = wasm.TS_OpenChannel_get_funding_pubkey(this_ptr);
14558                 return decodeUint8Array(nativeResponseValue);
14559         }
14560         // void OpenChannel_set_funding_pubkey(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14561         export function OpenChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
14562                 if(!isWasmInitialized) {
14563                         throw new Error("initializeWasm() must be awaited first!");
14564                 }
14565                 const nativeResponseValue = wasm.TS_OpenChannel_set_funding_pubkey(this_ptr, encodeUint8Array(val));
14566                 // debug statements here
14567         }
14568         // struct LDKPublicKey OpenChannel_get_revocation_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
14569         export function OpenChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
14570                 if(!isWasmInitialized) {
14571                         throw new Error("initializeWasm() must be awaited first!");
14572                 }
14573                 const nativeResponseValue = wasm.TS_OpenChannel_get_revocation_basepoint(this_ptr);
14574                 return decodeUint8Array(nativeResponseValue);
14575         }
14576         // void OpenChannel_set_revocation_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14577         export function OpenChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
14578                 if(!isWasmInitialized) {
14579                         throw new Error("initializeWasm() must be awaited first!");
14580                 }
14581                 const nativeResponseValue = wasm.TS_OpenChannel_set_revocation_basepoint(this_ptr, encodeUint8Array(val));
14582                 // debug statements here
14583         }
14584         // struct LDKPublicKey OpenChannel_get_payment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
14585         export function OpenChannel_get_payment_point(this_ptr: number): Uint8Array {
14586                 if(!isWasmInitialized) {
14587                         throw new Error("initializeWasm() must be awaited first!");
14588                 }
14589                 const nativeResponseValue = wasm.TS_OpenChannel_get_payment_point(this_ptr);
14590                 return decodeUint8Array(nativeResponseValue);
14591         }
14592         // void OpenChannel_set_payment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14593         export function OpenChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
14594                 if(!isWasmInitialized) {
14595                         throw new Error("initializeWasm() must be awaited first!");
14596                 }
14597                 const nativeResponseValue = wasm.TS_OpenChannel_set_payment_point(this_ptr, encodeUint8Array(val));
14598                 // debug statements here
14599         }
14600         // struct LDKPublicKey OpenChannel_get_delayed_payment_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
14601         export function OpenChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
14602                 if(!isWasmInitialized) {
14603                         throw new Error("initializeWasm() must be awaited first!");
14604                 }
14605                 const nativeResponseValue = wasm.TS_OpenChannel_get_delayed_payment_basepoint(this_ptr);
14606                 return decodeUint8Array(nativeResponseValue);
14607         }
14608         // void OpenChannel_set_delayed_payment_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14609         export function OpenChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
14610                 if(!isWasmInitialized) {
14611                         throw new Error("initializeWasm() must be awaited first!");
14612                 }
14613                 const nativeResponseValue = wasm.TS_OpenChannel_set_delayed_payment_basepoint(this_ptr, encodeUint8Array(val));
14614                 // debug statements here
14615         }
14616         // struct LDKPublicKey OpenChannel_get_htlc_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
14617         export function OpenChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
14618                 if(!isWasmInitialized) {
14619                         throw new Error("initializeWasm() must be awaited first!");
14620                 }
14621                 const nativeResponseValue = wasm.TS_OpenChannel_get_htlc_basepoint(this_ptr);
14622                 return decodeUint8Array(nativeResponseValue);
14623         }
14624         // void OpenChannel_set_htlc_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14625         export function OpenChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
14626                 if(!isWasmInitialized) {
14627                         throw new Error("initializeWasm() must be awaited first!");
14628                 }
14629                 const nativeResponseValue = wasm.TS_OpenChannel_set_htlc_basepoint(this_ptr, encodeUint8Array(val));
14630                 // debug statements here
14631         }
14632         // struct LDKPublicKey OpenChannel_get_first_per_commitment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
14633         export function OpenChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
14634                 if(!isWasmInitialized) {
14635                         throw new Error("initializeWasm() must be awaited first!");
14636                 }
14637                 const nativeResponseValue = wasm.TS_OpenChannel_get_first_per_commitment_point(this_ptr);
14638                 return decodeUint8Array(nativeResponseValue);
14639         }
14640         // void OpenChannel_set_first_per_commitment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14641         export function OpenChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
14642                 if(!isWasmInitialized) {
14643                         throw new Error("initializeWasm() must be awaited first!");
14644                 }
14645                 const nativeResponseValue = wasm.TS_OpenChannel_set_first_per_commitment_point(this_ptr, encodeUint8Array(val));
14646                 // debug statements here
14647         }
14648         // uint8_t OpenChannel_get_channel_flags(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
14649         export function OpenChannel_get_channel_flags(this_ptr: number): number {
14650                 if(!isWasmInitialized) {
14651                         throw new Error("initializeWasm() must be awaited first!");
14652                 }
14653                 const nativeResponseValue = wasm.TS_OpenChannel_get_channel_flags(this_ptr);
14654                 return nativeResponseValue;
14655         }
14656         // void OpenChannel_set_channel_flags(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint8_t val);
14657         export function OpenChannel_set_channel_flags(this_ptr: number, val: number): void {
14658                 if(!isWasmInitialized) {
14659                         throw new Error("initializeWasm() must be awaited first!");
14660                 }
14661                 const nativeResponseValue = wasm.TS_OpenChannel_set_channel_flags(this_ptr, val);
14662                 // debug statements here
14663         }
14664         // struct LDKChannelTypeFeatures OpenChannel_get_channel_type(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
14665         export function OpenChannel_get_channel_type(this_ptr: number): number {
14666                 if(!isWasmInitialized) {
14667                         throw new Error("initializeWasm() must be awaited first!");
14668                 }
14669                 const nativeResponseValue = wasm.TS_OpenChannel_get_channel_type(this_ptr);
14670                 return nativeResponseValue;
14671         }
14672         // void OpenChannel_set_channel_type(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKChannelTypeFeatures val);
14673         export function OpenChannel_set_channel_type(this_ptr: number, val: number): void {
14674                 if(!isWasmInitialized) {
14675                         throw new Error("initializeWasm() must be awaited first!");
14676                 }
14677                 const nativeResponseValue = wasm.TS_OpenChannel_set_channel_type(this_ptr, val);
14678                 // debug statements here
14679         }
14680         // uint64_t OpenChannel_clone_ptr(LDKOpenChannel *NONNULL_PTR arg);
14681         export function OpenChannel_clone_ptr(arg: number): number {
14682                 if(!isWasmInitialized) {
14683                         throw new Error("initializeWasm() must be awaited first!");
14684                 }
14685                 const nativeResponseValue = wasm.TS_OpenChannel_clone_ptr(arg);
14686                 return nativeResponseValue;
14687         }
14688         // struct LDKOpenChannel OpenChannel_clone(const struct LDKOpenChannel *NONNULL_PTR orig);
14689         export function OpenChannel_clone(orig: number): number {
14690                 if(!isWasmInitialized) {
14691                         throw new Error("initializeWasm() must be awaited first!");
14692                 }
14693                 const nativeResponseValue = wasm.TS_OpenChannel_clone(orig);
14694                 return nativeResponseValue;
14695         }
14696         // void AcceptChannel_free(struct LDKAcceptChannel this_obj);
14697         export function AcceptChannel_free(this_obj: number): void {
14698                 if(!isWasmInitialized) {
14699                         throw new Error("initializeWasm() must be awaited first!");
14700                 }
14701                 const nativeResponseValue = wasm.TS_AcceptChannel_free(this_obj);
14702                 // debug statements here
14703         }
14704         // const uint8_t (*AcceptChannel_get_temporary_channel_id(const struct LDKAcceptChannel *NONNULL_PTR this_ptr))[32];
14705         export function AcceptChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
14706                 if(!isWasmInitialized) {
14707                         throw new Error("initializeWasm() must be awaited first!");
14708                 }
14709                 const nativeResponseValue = wasm.TS_AcceptChannel_get_temporary_channel_id(this_ptr);
14710                 return decodeUint8Array(nativeResponseValue);
14711         }
14712         // void AcceptChannel_set_temporary_channel_id(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14713         export function AcceptChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
14714                 if(!isWasmInitialized) {
14715                         throw new Error("initializeWasm() must be awaited first!");
14716                 }
14717                 const nativeResponseValue = wasm.TS_AcceptChannel_set_temporary_channel_id(this_ptr, encodeUint8Array(val));
14718                 // debug statements here
14719         }
14720         // uint64_t AcceptChannel_get_dust_limit_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
14721         export function AcceptChannel_get_dust_limit_satoshis(this_ptr: number): number {
14722                 if(!isWasmInitialized) {
14723                         throw new Error("initializeWasm() must be awaited first!");
14724                 }
14725                 const nativeResponseValue = wasm.TS_AcceptChannel_get_dust_limit_satoshis(this_ptr);
14726                 return nativeResponseValue;
14727         }
14728         // void AcceptChannel_set_dust_limit_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
14729         export function AcceptChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
14730                 if(!isWasmInitialized) {
14731                         throw new Error("initializeWasm() must be awaited first!");
14732                 }
14733                 const nativeResponseValue = wasm.TS_AcceptChannel_set_dust_limit_satoshis(this_ptr, val);
14734                 // debug statements here
14735         }
14736         // uint64_t AcceptChannel_get_max_htlc_value_in_flight_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
14737         export function AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
14738                 if(!isWasmInitialized) {
14739                         throw new Error("initializeWasm() must be awaited first!");
14740                 }
14741                 const nativeResponseValue = wasm.TS_AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr);
14742                 return nativeResponseValue;
14743         }
14744         // void AcceptChannel_set_max_htlc_value_in_flight_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
14745         export function AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
14746                 if(!isWasmInitialized) {
14747                         throw new Error("initializeWasm() must be awaited first!");
14748                 }
14749                 const nativeResponseValue = wasm.TS_AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
14750                 // debug statements here
14751         }
14752         // uint64_t AcceptChannel_get_channel_reserve_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
14753         export function AcceptChannel_get_channel_reserve_satoshis(this_ptr: number): number {
14754                 if(!isWasmInitialized) {
14755                         throw new Error("initializeWasm() must be awaited first!");
14756                 }
14757                 const nativeResponseValue = wasm.TS_AcceptChannel_get_channel_reserve_satoshis(this_ptr);
14758                 return nativeResponseValue;
14759         }
14760         // void AcceptChannel_set_channel_reserve_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
14761         export function AcceptChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
14762                 if(!isWasmInitialized) {
14763                         throw new Error("initializeWasm() must be awaited first!");
14764                 }
14765                 const nativeResponseValue = wasm.TS_AcceptChannel_set_channel_reserve_satoshis(this_ptr, val);
14766                 // debug statements here
14767         }
14768         // uint64_t AcceptChannel_get_htlc_minimum_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
14769         export function AcceptChannel_get_htlc_minimum_msat(this_ptr: number): number {
14770                 if(!isWasmInitialized) {
14771                         throw new Error("initializeWasm() must be awaited first!");
14772                 }
14773                 const nativeResponseValue = wasm.TS_AcceptChannel_get_htlc_minimum_msat(this_ptr);
14774                 return nativeResponseValue;
14775         }
14776         // void AcceptChannel_set_htlc_minimum_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
14777         export function AcceptChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
14778                 if(!isWasmInitialized) {
14779                         throw new Error("initializeWasm() must be awaited first!");
14780                 }
14781                 const nativeResponseValue = wasm.TS_AcceptChannel_set_htlc_minimum_msat(this_ptr, val);
14782                 // debug statements here
14783         }
14784         // uint32_t AcceptChannel_get_minimum_depth(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
14785         export function AcceptChannel_get_minimum_depth(this_ptr: number): number {
14786                 if(!isWasmInitialized) {
14787                         throw new Error("initializeWasm() must be awaited first!");
14788                 }
14789                 const nativeResponseValue = wasm.TS_AcceptChannel_get_minimum_depth(this_ptr);
14790                 return nativeResponseValue;
14791         }
14792         // void AcceptChannel_set_minimum_depth(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint32_t val);
14793         export function AcceptChannel_set_minimum_depth(this_ptr: number, val: number): void {
14794                 if(!isWasmInitialized) {
14795                         throw new Error("initializeWasm() must be awaited first!");
14796                 }
14797                 const nativeResponseValue = wasm.TS_AcceptChannel_set_minimum_depth(this_ptr, val);
14798                 // debug statements here
14799         }
14800         // uint16_t AcceptChannel_get_to_self_delay(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
14801         export function AcceptChannel_get_to_self_delay(this_ptr: number): number {
14802                 if(!isWasmInitialized) {
14803                         throw new Error("initializeWasm() must be awaited first!");
14804                 }
14805                 const nativeResponseValue = wasm.TS_AcceptChannel_get_to_self_delay(this_ptr);
14806                 return nativeResponseValue;
14807         }
14808         // void AcceptChannel_set_to_self_delay(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
14809         export function AcceptChannel_set_to_self_delay(this_ptr: number, val: number): void {
14810                 if(!isWasmInitialized) {
14811                         throw new Error("initializeWasm() must be awaited first!");
14812                 }
14813                 const nativeResponseValue = wasm.TS_AcceptChannel_set_to_self_delay(this_ptr, val);
14814                 // debug statements here
14815         }
14816         // uint16_t AcceptChannel_get_max_accepted_htlcs(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
14817         export function AcceptChannel_get_max_accepted_htlcs(this_ptr: number): number {
14818                 if(!isWasmInitialized) {
14819                         throw new Error("initializeWasm() must be awaited first!");
14820                 }
14821                 const nativeResponseValue = wasm.TS_AcceptChannel_get_max_accepted_htlcs(this_ptr);
14822                 return nativeResponseValue;
14823         }
14824         // void AcceptChannel_set_max_accepted_htlcs(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
14825         export function AcceptChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
14826                 if(!isWasmInitialized) {
14827                         throw new Error("initializeWasm() must be awaited first!");
14828                 }
14829                 const nativeResponseValue = wasm.TS_AcceptChannel_set_max_accepted_htlcs(this_ptr, val);
14830                 // debug statements here
14831         }
14832         // struct LDKPublicKey AcceptChannel_get_funding_pubkey(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
14833         export function AcceptChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
14834                 if(!isWasmInitialized) {
14835                         throw new Error("initializeWasm() must be awaited first!");
14836                 }
14837                 const nativeResponseValue = wasm.TS_AcceptChannel_get_funding_pubkey(this_ptr);
14838                 return decodeUint8Array(nativeResponseValue);
14839         }
14840         // void AcceptChannel_set_funding_pubkey(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14841         export function AcceptChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
14842                 if(!isWasmInitialized) {
14843                         throw new Error("initializeWasm() must be awaited first!");
14844                 }
14845                 const nativeResponseValue = wasm.TS_AcceptChannel_set_funding_pubkey(this_ptr, encodeUint8Array(val));
14846                 // debug statements here
14847         }
14848         // struct LDKPublicKey AcceptChannel_get_revocation_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
14849         export function AcceptChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
14850                 if(!isWasmInitialized) {
14851                         throw new Error("initializeWasm() must be awaited first!");
14852                 }
14853                 const nativeResponseValue = wasm.TS_AcceptChannel_get_revocation_basepoint(this_ptr);
14854                 return decodeUint8Array(nativeResponseValue);
14855         }
14856         // void AcceptChannel_set_revocation_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14857         export function AcceptChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
14858                 if(!isWasmInitialized) {
14859                         throw new Error("initializeWasm() must be awaited first!");
14860                 }
14861                 const nativeResponseValue = wasm.TS_AcceptChannel_set_revocation_basepoint(this_ptr, encodeUint8Array(val));
14862                 // debug statements here
14863         }
14864         // struct LDKPublicKey AcceptChannel_get_payment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
14865         export function AcceptChannel_get_payment_point(this_ptr: number): Uint8Array {
14866                 if(!isWasmInitialized) {
14867                         throw new Error("initializeWasm() must be awaited first!");
14868                 }
14869                 const nativeResponseValue = wasm.TS_AcceptChannel_get_payment_point(this_ptr);
14870                 return decodeUint8Array(nativeResponseValue);
14871         }
14872         // void AcceptChannel_set_payment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14873         export function AcceptChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
14874                 if(!isWasmInitialized) {
14875                         throw new Error("initializeWasm() must be awaited first!");
14876                 }
14877                 const nativeResponseValue = wasm.TS_AcceptChannel_set_payment_point(this_ptr, encodeUint8Array(val));
14878                 // debug statements here
14879         }
14880         // struct LDKPublicKey AcceptChannel_get_delayed_payment_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
14881         export function AcceptChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
14882                 if(!isWasmInitialized) {
14883                         throw new Error("initializeWasm() must be awaited first!");
14884                 }
14885                 const nativeResponseValue = wasm.TS_AcceptChannel_get_delayed_payment_basepoint(this_ptr);
14886                 return decodeUint8Array(nativeResponseValue);
14887         }
14888         // void AcceptChannel_set_delayed_payment_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14889         export function AcceptChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
14890                 if(!isWasmInitialized) {
14891                         throw new Error("initializeWasm() must be awaited first!");
14892                 }
14893                 const nativeResponseValue = wasm.TS_AcceptChannel_set_delayed_payment_basepoint(this_ptr, encodeUint8Array(val));
14894                 // debug statements here
14895         }
14896         // struct LDKPublicKey AcceptChannel_get_htlc_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
14897         export function AcceptChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
14898                 if(!isWasmInitialized) {
14899                         throw new Error("initializeWasm() must be awaited first!");
14900                 }
14901                 const nativeResponseValue = wasm.TS_AcceptChannel_get_htlc_basepoint(this_ptr);
14902                 return decodeUint8Array(nativeResponseValue);
14903         }
14904         // void AcceptChannel_set_htlc_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14905         export function AcceptChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
14906                 if(!isWasmInitialized) {
14907                         throw new Error("initializeWasm() must be awaited first!");
14908                 }
14909                 const nativeResponseValue = wasm.TS_AcceptChannel_set_htlc_basepoint(this_ptr, encodeUint8Array(val));
14910                 // debug statements here
14911         }
14912         // struct LDKPublicKey AcceptChannel_get_first_per_commitment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
14913         export function AcceptChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
14914                 if(!isWasmInitialized) {
14915                         throw new Error("initializeWasm() must be awaited first!");
14916                 }
14917                 const nativeResponseValue = wasm.TS_AcceptChannel_get_first_per_commitment_point(this_ptr);
14918                 return decodeUint8Array(nativeResponseValue);
14919         }
14920         // void AcceptChannel_set_first_per_commitment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14921         export function AcceptChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
14922                 if(!isWasmInitialized) {
14923                         throw new Error("initializeWasm() must be awaited first!");
14924                 }
14925                 const nativeResponseValue = wasm.TS_AcceptChannel_set_first_per_commitment_point(this_ptr, encodeUint8Array(val));
14926                 // debug statements here
14927         }
14928         // uint64_t AcceptChannel_clone_ptr(LDKAcceptChannel *NONNULL_PTR arg);
14929         export function AcceptChannel_clone_ptr(arg: number): number {
14930                 if(!isWasmInitialized) {
14931                         throw new Error("initializeWasm() must be awaited first!");
14932                 }
14933                 const nativeResponseValue = wasm.TS_AcceptChannel_clone_ptr(arg);
14934                 return nativeResponseValue;
14935         }
14936         // struct LDKAcceptChannel AcceptChannel_clone(const struct LDKAcceptChannel *NONNULL_PTR orig);
14937         export function AcceptChannel_clone(orig: number): number {
14938                 if(!isWasmInitialized) {
14939                         throw new Error("initializeWasm() must be awaited first!");
14940                 }
14941                 const nativeResponseValue = wasm.TS_AcceptChannel_clone(orig);
14942                 return nativeResponseValue;
14943         }
14944         // void FundingCreated_free(struct LDKFundingCreated this_obj);
14945         export function FundingCreated_free(this_obj: number): void {
14946                 if(!isWasmInitialized) {
14947                         throw new Error("initializeWasm() must be awaited first!");
14948                 }
14949                 const nativeResponseValue = wasm.TS_FundingCreated_free(this_obj);
14950                 // debug statements here
14951         }
14952         // const uint8_t (*FundingCreated_get_temporary_channel_id(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
14953         export function FundingCreated_get_temporary_channel_id(this_ptr: number): Uint8Array {
14954                 if(!isWasmInitialized) {
14955                         throw new Error("initializeWasm() must be awaited first!");
14956                 }
14957                 const nativeResponseValue = wasm.TS_FundingCreated_get_temporary_channel_id(this_ptr);
14958                 return decodeUint8Array(nativeResponseValue);
14959         }
14960         // void FundingCreated_set_temporary_channel_id(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14961         export function FundingCreated_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
14962                 if(!isWasmInitialized) {
14963                         throw new Error("initializeWasm() must be awaited first!");
14964                 }
14965                 const nativeResponseValue = wasm.TS_FundingCreated_set_temporary_channel_id(this_ptr, encodeUint8Array(val));
14966                 // debug statements here
14967         }
14968         // const uint8_t (*FundingCreated_get_funding_txid(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
14969         export function FundingCreated_get_funding_txid(this_ptr: number): Uint8Array {
14970                 if(!isWasmInitialized) {
14971                         throw new Error("initializeWasm() must be awaited first!");
14972                 }
14973                 const nativeResponseValue = wasm.TS_FundingCreated_get_funding_txid(this_ptr);
14974                 return decodeUint8Array(nativeResponseValue);
14975         }
14976         // void FundingCreated_set_funding_txid(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14977         export function FundingCreated_set_funding_txid(this_ptr: number, val: Uint8Array): void {
14978                 if(!isWasmInitialized) {
14979                         throw new Error("initializeWasm() must be awaited first!");
14980                 }
14981                 const nativeResponseValue = wasm.TS_FundingCreated_set_funding_txid(this_ptr, encodeUint8Array(val));
14982                 // debug statements here
14983         }
14984         // uint16_t FundingCreated_get_funding_output_index(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
14985         export function FundingCreated_get_funding_output_index(this_ptr: number): number {
14986                 if(!isWasmInitialized) {
14987                         throw new Error("initializeWasm() must be awaited first!");
14988                 }
14989                 const nativeResponseValue = wasm.TS_FundingCreated_get_funding_output_index(this_ptr);
14990                 return nativeResponseValue;
14991         }
14992         // void FundingCreated_set_funding_output_index(struct LDKFundingCreated *NONNULL_PTR this_ptr, uint16_t val);
14993         export function FundingCreated_set_funding_output_index(this_ptr: number, val: number): void {
14994                 if(!isWasmInitialized) {
14995                         throw new Error("initializeWasm() must be awaited first!");
14996                 }
14997                 const nativeResponseValue = wasm.TS_FundingCreated_set_funding_output_index(this_ptr, val);
14998                 // debug statements here
14999         }
15000         // struct LDKSignature FundingCreated_get_signature(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
15001         export function FundingCreated_get_signature(this_ptr: number): Uint8Array {
15002                 if(!isWasmInitialized) {
15003                         throw new Error("initializeWasm() must be awaited first!");
15004                 }
15005                 const nativeResponseValue = wasm.TS_FundingCreated_get_signature(this_ptr);
15006                 return decodeUint8Array(nativeResponseValue);
15007         }
15008         // void FundingCreated_set_signature(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKSignature val);
15009         export function FundingCreated_set_signature(this_ptr: number, val: Uint8Array): void {
15010                 if(!isWasmInitialized) {
15011                         throw new Error("initializeWasm() must be awaited first!");
15012                 }
15013                 const nativeResponseValue = wasm.TS_FundingCreated_set_signature(this_ptr, encodeUint8Array(val));
15014                 // debug statements here
15015         }
15016         // 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);
15017         export function FundingCreated_new(temporary_channel_id_arg: Uint8Array, funding_txid_arg: Uint8Array, funding_output_index_arg: number, signature_arg: Uint8Array): number {
15018                 if(!isWasmInitialized) {
15019                         throw new Error("initializeWasm() must be awaited first!");
15020                 }
15021                 const nativeResponseValue = wasm.TS_FundingCreated_new(encodeUint8Array(temporary_channel_id_arg), encodeUint8Array(funding_txid_arg), funding_output_index_arg, encodeUint8Array(signature_arg));
15022                 return nativeResponseValue;
15023         }
15024         // uint64_t FundingCreated_clone_ptr(LDKFundingCreated *NONNULL_PTR arg);
15025         export function FundingCreated_clone_ptr(arg: number): number {
15026                 if(!isWasmInitialized) {
15027                         throw new Error("initializeWasm() must be awaited first!");
15028                 }
15029                 const nativeResponseValue = wasm.TS_FundingCreated_clone_ptr(arg);
15030                 return nativeResponseValue;
15031         }
15032         // struct LDKFundingCreated FundingCreated_clone(const struct LDKFundingCreated *NONNULL_PTR orig);
15033         export function FundingCreated_clone(orig: number): number {
15034                 if(!isWasmInitialized) {
15035                         throw new Error("initializeWasm() must be awaited first!");
15036                 }
15037                 const nativeResponseValue = wasm.TS_FundingCreated_clone(orig);
15038                 return nativeResponseValue;
15039         }
15040         // void FundingSigned_free(struct LDKFundingSigned this_obj);
15041         export function FundingSigned_free(this_obj: number): void {
15042                 if(!isWasmInitialized) {
15043                         throw new Error("initializeWasm() must be awaited first!");
15044                 }
15045                 const nativeResponseValue = wasm.TS_FundingSigned_free(this_obj);
15046                 // debug statements here
15047         }
15048         // const uint8_t (*FundingSigned_get_channel_id(const struct LDKFundingSigned *NONNULL_PTR this_ptr))[32];
15049         export function FundingSigned_get_channel_id(this_ptr: number): Uint8Array {
15050                 if(!isWasmInitialized) {
15051                         throw new Error("initializeWasm() must be awaited first!");
15052                 }
15053                 const nativeResponseValue = wasm.TS_FundingSigned_get_channel_id(this_ptr);
15054                 return decodeUint8Array(nativeResponseValue);
15055         }
15056         // void FundingSigned_set_channel_id(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15057         export function FundingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
15058                 if(!isWasmInitialized) {
15059                         throw new Error("initializeWasm() must be awaited first!");
15060                 }
15061                 const nativeResponseValue = wasm.TS_FundingSigned_set_channel_id(this_ptr, encodeUint8Array(val));
15062                 // debug statements here
15063         }
15064         // struct LDKSignature FundingSigned_get_signature(const struct LDKFundingSigned *NONNULL_PTR this_ptr);
15065         export function FundingSigned_get_signature(this_ptr: number): Uint8Array {
15066                 if(!isWasmInitialized) {
15067                         throw new Error("initializeWasm() must be awaited first!");
15068                 }
15069                 const nativeResponseValue = wasm.TS_FundingSigned_get_signature(this_ptr);
15070                 return decodeUint8Array(nativeResponseValue);
15071         }
15072         // void FundingSigned_set_signature(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
15073         export function FundingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
15074                 if(!isWasmInitialized) {
15075                         throw new Error("initializeWasm() must be awaited first!");
15076                 }
15077                 const nativeResponseValue = wasm.TS_FundingSigned_set_signature(this_ptr, encodeUint8Array(val));
15078                 // debug statements here
15079         }
15080         // MUST_USE_RES struct LDKFundingSigned FundingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg);
15081         export function FundingSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array): number {
15082                 if(!isWasmInitialized) {
15083                         throw new Error("initializeWasm() must be awaited first!");
15084                 }
15085                 const nativeResponseValue = wasm.TS_FundingSigned_new(encodeUint8Array(channel_id_arg), encodeUint8Array(signature_arg));
15086                 return nativeResponseValue;
15087         }
15088         // uint64_t FundingSigned_clone_ptr(LDKFundingSigned *NONNULL_PTR arg);
15089         export function FundingSigned_clone_ptr(arg: number): number {
15090                 if(!isWasmInitialized) {
15091                         throw new Error("initializeWasm() must be awaited first!");
15092                 }
15093                 const nativeResponseValue = wasm.TS_FundingSigned_clone_ptr(arg);
15094                 return nativeResponseValue;
15095         }
15096         // struct LDKFundingSigned FundingSigned_clone(const struct LDKFundingSigned *NONNULL_PTR orig);
15097         export function FundingSigned_clone(orig: number): number {
15098                 if(!isWasmInitialized) {
15099                         throw new Error("initializeWasm() must be awaited first!");
15100                 }
15101                 const nativeResponseValue = wasm.TS_FundingSigned_clone(orig);
15102                 return nativeResponseValue;
15103         }
15104         // void FundingLocked_free(struct LDKFundingLocked this_obj);
15105         export function FundingLocked_free(this_obj: number): void {
15106                 if(!isWasmInitialized) {
15107                         throw new Error("initializeWasm() must be awaited first!");
15108                 }
15109                 const nativeResponseValue = wasm.TS_FundingLocked_free(this_obj);
15110                 // debug statements here
15111         }
15112         // const uint8_t (*FundingLocked_get_channel_id(const struct LDKFundingLocked *NONNULL_PTR this_ptr))[32];
15113         export function FundingLocked_get_channel_id(this_ptr: number): Uint8Array {
15114                 if(!isWasmInitialized) {
15115                         throw new Error("initializeWasm() must be awaited first!");
15116                 }
15117                 const nativeResponseValue = wasm.TS_FundingLocked_get_channel_id(this_ptr);
15118                 return decodeUint8Array(nativeResponseValue);
15119         }
15120         // void FundingLocked_set_channel_id(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15121         export function FundingLocked_set_channel_id(this_ptr: number, val: Uint8Array): void {
15122                 if(!isWasmInitialized) {
15123                         throw new Error("initializeWasm() must be awaited first!");
15124                 }
15125                 const nativeResponseValue = wasm.TS_FundingLocked_set_channel_id(this_ptr, encodeUint8Array(val));
15126                 // debug statements here
15127         }
15128         // struct LDKPublicKey FundingLocked_get_next_per_commitment_point(const struct LDKFundingLocked *NONNULL_PTR this_ptr);
15129         export function FundingLocked_get_next_per_commitment_point(this_ptr: number): Uint8Array {
15130                 if(!isWasmInitialized) {
15131                         throw new Error("initializeWasm() must be awaited first!");
15132                 }
15133                 const nativeResponseValue = wasm.TS_FundingLocked_get_next_per_commitment_point(this_ptr);
15134                 return decodeUint8Array(nativeResponseValue);
15135         }
15136         // void FundingLocked_set_next_per_commitment_point(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKPublicKey val);
15137         export function FundingLocked_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
15138                 if(!isWasmInitialized) {
15139                         throw new Error("initializeWasm() must be awaited first!");
15140                 }
15141                 const nativeResponseValue = wasm.TS_FundingLocked_set_next_per_commitment_point(this_ptr, encodeUint8Array(val));
15142                 // debug statements here
15143         }
15144         // MUST_USE_RES struct LDKFundingLocked FundingLocked_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKPublicKey next_per_commitment_point_arg);
15145         export function FundingLocked_new(channel_id_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
15146                 if(!isWasmInitialized) {
15147                         throw new Error("initializeWasm() must be awaited first!");
15148                 }
15149                 const nativeResponseValue = wasm.TS_FundingLocked_new(encodeUint8Array(channel_id_arg), encodeUint8Array(next_per_commitment_point_arg));
15150                 return nativeResponseValue;
15151         }
15152         // uint64_t FundingLocked_clone_ptr(LDKFundingLocked *NONNULL_PTR arg);
15153         export function FundingLocked_clone_ptr(arg: number): number {
15154                 if(!isWasmInitialized) {
15155                         throw new Error("initializeWasm() must be awaited first!");
15156                 }
15157                 const nativeResponseValue = wasm.TS_FundingLocked_clone_ptr(arg);
15158                 return nativeResponseValue;
15159         }
15160         // struct LDKFundingLocked FundingLocked_clone(const struct LDKFundingLocked *NONNULL_PTR orig);
15161         export function FundingLocked_clone(orig: number): number {
15162                 if(!isWasmInitialized) {
15163                         throw new Error("initializeWasm() must be awaited first!");
15164                 }
15165                 const nativeResponseValue = wasm.TS_FundingLocked_clone(orig);
15166                 return nativeResponseValue;
15167         }
15168         // void Shutdown_free(struct LDKShutdown this_obj);
15169         export function Shutdown_free(this_obj: number): void {
15170                 if(!isWasmInitialized) {
15171                         throw new Error("initializeWasm() must be awaited first!");
15172                 }
15173                 const nativeResponseValue = wasm.TS_Shutdown_free(this_obj);
15174                 // debug statements here
15175         }
15176         // const uint8_t (*Shutdown_get_channel_id(const struct LDKShutdown *NONNULL_PTR this_ptr))[32];
15177         export function Shutdown_get_channel_id(this_ptr: number): Uint8Array {
15178                 if(!isWasmInitialized) {
15179                         throw new Error("initializeWasm() must be awaited first!");
15180                 }
15181                 const nativeResponseValue = wasm.TS_Shutdown_get_channel_id(this_ptr);
15182                 return decodeUint8Array(nativeResponseValue);
15183         }
15184         // void Shutdown_set_channel_id(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15185         export function Shutdown_set_channel_id(this_ptr: number, val: Uint8Array): void {
15186                 if(!isWasmInitialized) {
15187                         throw new Error("initializeWasm() must be awaited first!");
15188                 }
15189                 const nativeResponseValue = wasm.TS_Shutdown_set_channel_id(this_ptr, encodeUint8Array(val));
15190                 // debug statements here
15191         }
15192         // struct LDKu8slice Shutdown_get_scriptpubkey(const struct LDKShutdown *NONNULL_PTR this_ptr);
15193         export function Shutdown_get_scriptpubkey(this_ptr: number): Uint8Array {
15194                 if(!isWasmInitialized) {
15195                         throw new Error("initializeWasm() must be awaited first!");
15196                 }
15197                 const nativeResponseValue = wasm.TS_Shutdown_get_scriptpubkey(this_ptr);
15198                 return decodeUint8Array(nativeResponseValue);
15199         }
15200         // void Shutdown_set_scriptpubkey(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
15201         export function Shutdown_set_scriptpubkey(this_ptr: number, val: Uint8Array): void {
15202                 if(!isWasmInitialized) {
15203                         throw new Error("initializeWasm() must be awaited first!");
15204                 }
15205                 const nativeResponseValue = wasm.TS_Shutdown_set_scriptpubkey(this_ptr, encodeUint8Array(val));
15206                 // debug statements here
15207         }
15208         // MUST_USE_RES struct LDKShutdown Shutdown_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z scriptpubkey_arg);
15209         export function Shutdown_new(channel_id_arg: Uint8Array, scriptpubkey_arg: Uint8Array): number {
15210                 if(!isWasmInitialized) {
15211                         throw new Error("initializeWasm() must be awaited first!");
15212                 }
15213                 const nativeResponseValue = wasm.TS_Shutdown_new(encodeUint8Array(channel_id_arg), encodeUint8Array(scriptpubkey_arg));
15214                 return nativeResponseValue;
15215         }
15216         // uint64_t Shutdown_clone_ptr(LDKShutdown *NONNULL_PTR arg);
15217         export function Shutdown_clone_ptr(arg: number): number {
15218                 if(!isWasmInitialized) {
15219                         throw new Error("initializeWasm() must be awaited first!");
15220                 }
15221                 const nativeResponseValue = wasm.TS_Shutdown_clone_ptr(arg);
15222                 return nativeResponseValue;
15223         }
15224         // struct LDKShutdown Shutdown_clone(const struct LDKShutdown *NONNULL_PTR orig);
15225         export function Shutdown_clone(orig: number): number {
15226                 if(!isWasmInitialized) {
15227                         throw new Error("initializeWasm() must be awaited first!");
15228                 }
15229                 const nativeResponseValue = wasm.TS_Shutdown_clone(orig);
15230                 return nativeResponseValue;
15231         }
15232         // void ClosingSignedFeeRange_free(struct LDKClosingSignedFeeRange this_obj);
15233         export function ClosingSignedFeeRange_free(this_obj: number): void {
15234                 if(!isWasmInitialized) {
15235                         throw new Error("initializeWasm() must be awaited first!");
15236                 }
15237                 const nativeResponseValue = wasm.TS_ClosingSignedFeeRange_free(this_obj);
15238                 // debug statements here
15239         }
15240         // uint64_t ClosingSignedFeeRange_get_min_fee_satoshis(const struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr);
15241         export function ClosingSignedFeeRange_get_min_fee_satoshis(this_ptr: number): number {
15242                 if(!isWasmInitialized) {
15243                         throw new Error("initializeWasm() must be awaited first!");
15244                 }
15245                 const nativeResponseValue = wasm.TS_ClosingSignedFeeRange_get_min_fee_satoshis(this_ptr);
15246                 return nativeResponseValue;
15247         }
15248         // void ClosingSignedFeeRange_set_min_fee_satoshis(struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr, uint64_t val);
15249         export function ClosingSignedFeeRange_set_min_fee_satoshis(this_ptr: number, val: number): void {
15250                 if(!isWasmInitialized) {
15251                         throw new Error("initializeWasm() must be awaited first!");
15252                 }
15253                 const nativeResponseValue = wasm.TS_ClosingSignedFeeRange_set_min_fee_satoshis(this_ptr, val);
15254                 // debug statements here
15255         }
15256         // uint64_t ClosingSignedFeeRange_get_max_fee_satoshis(const struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr);
15257         export function ClosingSignedFeeRange_get_max_fee_satoshis(this_ptr: number): number {
15258                 if(!isWasmInitialized) {
15259                         throw new Error("initializeWasm() must be awaited first!");
15260                 }
15261                 const nativeResponseValue = wasm.TS_ClosingSignedFeeRange_get_max_fee_satoshis(this_ptr);
15262                 return nativeResponseValue;
15263         }
15264         // void ClosingSignedFeeRange_set_max_fee_satoshis(struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr, uint64_t val);
15265         export function ClosingSignedFeeRange_set_max_fee_satoshis(this_ptr: number, val: number): void {
15266                 if(!isWasmInitialized) {
15267                         throw new Error("initializeWasm() must be awaited first!");
15268                 }
15269                 const nativeResponseValue = wasm.TS_ClosingSignedFeeRange_set_max_fee_satoshis(this_ptr, val);
15270                 // debug statements here
15271         }
15272         // MUST_USE_RES struct LDKClosingSignedFeeRange ClosingSignedFeeRange_new(uint64_t min_fee_satoshis_arg, uint64_t max_fee_satoshis_arg);
15273         export function ClosingSignedFeeRange_new(min_fee_satoshis_arg: number, max_fee_satoshis_arg: number): number {
15274                 if(!isWasmInitialized) {
15275                         throw new Error("initializeWasm() must be awaited first!");
15276                 }
15277                 const nativeResponseValue = wasm.TS_ClosingSignedFeeRange_new(min_fee_satoshis_arg, max_fee_satoshis_arg);
15278                 return nativeResponseValue;
15279         }
15280         // uint64_t ClosingSignedFeeRange_clone_ptr(LDKClosingSignedFeeRange *NONNULL_PTR arg);
15281         export function ClosingSignedFeeRange_clone_ptr(arg: number): number {
15282                 if(!isWasmInitialized) {
15283                         throw new Error("initializeWasm() must be awaited first!");
15284                 }
15285                 const nativeResponseValue = wasm.TS_ClosingSignedFeeRange_clone_ptr(arg);
15286                 return nativeResponseValue;
15287         }
15288         // struct LDKClosingSignedFeeRange ClosingSignedFeeRange_clone(const struct LDKClosingSignedFeeRange *NONNULL_PTR orig);
15289         export function ClosingSignedFeeRange_clone(orig: number): number {
15290                 if(!isWasmInitialized) {
15291                         throw new Error("initializeWasm() must be awaited first!");
15292                 }
15293                 const nativeResponseValue = wasm.TS_ClosingSignedFeeRange_clone(orig);
15294                 return nativeResponseValue;
15295         }
15296         // void ClosingSigned_free(struct LDKClosingSigned this_obj);
15297         export function ClosingSigned_free(this_obj: number): void {
15298                 if(!isWasmInitialized) {
15299                         throw new Error("initializeWasm() must be awaited first!");
15300                 }
15301                 const nativeResponseValue = wasm.TS_ClosingSigned_free(this_obj);
15302                 // debug statements here
15303         }
15304         // const uint8_t (*ClosingSigned_get_channel_id(const struct LDKClosingSigned *NONNULL_PTR this_ptr))[32];
15305         export function ClosingSigned_get_channel_id(this_ptr: number): Uint8Array {
15306                 if(!isWasmInitialized) {
15307                         throw new Error("initializeWasm() must be awaited first!");
15308                 }
15309                 const nativeResponseValue = wasm.TS_ClosingSigned_get_channel_id(this_ptr);
15310                 return decodeUint8Array(nativeResponseValue);
15311         }
15312         // void ClosingSigned_set_channel_id(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15313         export function ClosingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
15314                 if(!isWasmInitialized) {
15315                         throw new Error("initializeWasm() must be awaited first!");
15316                 }
15317                 const nativeResponseValue = wasm.TS_ClosingSigned_set_channel_id(this_ptr, encodeUint8Array(val));
15318                 // debug statements here
15319         }
15320         // uint64_t ClosingSigned_get_fee_satoshis(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
15321         export function ClosingSigned_get_fee_satoshis(this_ptr: number): number {
15322                 if(!isWasmInitialized) {
15323                         throw new Error("initializeWasm() must be awaited first!");
15324                 }
15325                 const nativeResponseValue = wasm.TS_ClosingSigned_get_fee_satoshis(this_ptr);
15326                 return nativeResponseValue;
15327         }
15328         // void ClosingSigned_set_fee_satoshis(struct LDKClosingSigned *NONNULL_PTR this_ptr, uint64_t val);
15329         export function ClosingSigned_set_fee_satoshis(this_ptr: number, val: number): void {
15330                 if(!isWasmInitialized) {
15331                         throw new Error("initializeWasm() must be awaited first!");
15332                 }
15333                 const nativeResponseValue = wasm.TS_ClosingSigned_set_fee_satoshis(this_ptr, val);
15334                 // debug statements here
15335         }
15336         // struct LDKSignature ClosingSigned_get_signature(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
15337         export function ClosingSigned_get_signature(this_ptr: number): Uint8Array {
15338                 if(!isWasmInitialized) {
15339                         throw new Error("initializeWasm() must be awaited first!");
15340                 }
15341                 const nativeResponseValue = wasm.TS_ClosingSigned_get_signature(this_ptr);
15342                 return decodeUint8Array(nativeResponseValue);
15343         }
15344         // void ClosingSigned_set_signature(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
15345         export function ClosingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
15346                 if(!isWasmInitialized) {
15347                         throw new Error("initializeWasm() must be awaited first!");
15348                 }
15349                 const nativeResponseValue = wasm.TS_ClosingSigned_set_signature(this_ptr, encodeUint8Array(val));
15350                 // debug statements here
15351         }
15352         // struct LDKClosingSignedFeeRange ClosingSigned_get_fee_range(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
15353         export function ClosingSigned_get_fee_range(this_ptr: number): number {
15354                 if(!isWasmInitialized) {
15355                         throw new Error("initializeWasm() must be awaited first!");
15356                 }
15357                 const nativeResponseValue = wasm.TS_ClosingSigned_get_fee_range(this_ptr);
15358                 return nativeResponseValue;
15359         }
15360         // void ClosingSigned_set_fee_range(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKClosingSignedFeeRange val);
15361         export function ClosingSigned_set_fee_range(this_ptr: number, val: number): void {
15362                 if(!isWasmInitialized) {
15363                         throw new Error("initializeWasm() must be awaited first!");
15364                 }
15365                 const nativeResponseValue = wasm.TS_ClosingSigned_set_fee_range(this_ptr, val);
15366                 // debug statements here
15367         }
15368         // MUST_USE_RES struct LDKClosingSigned ClosingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t fee_satoshis_arg, struct LDKSignature signature_arg, struct LDKClosingSignedFeeRange fee_range_arg);
15369         export function ClosingSigned_new(channel_id_arg: Uint8Array, fee_satoshis_arg: number, signature_arg: Uint8Array, fee_range_arg: number): number {
15370                 if(!isWasmInitialized) {
15371                         throw new Error("initializeWasm() must be awaited first!");
15372                 }
15373                 const nativeResponseValue = wasm.TS_ClosingSigned_new(encodeUint8Array(channel_id_arg), fee_satoshis_arg, encodeUint8Array(signature_arg), fee_range_arg);
15374                 return nativeResponseValue;
15375         }
15376         // uint64_t ClosingSigned_clone_ptr(LDKClosingSigned *NONNULL_PTR arg);
15377         export function ClosingSigned_clone_ptr(arg: number): number {
15378                 if(!isWasmInitialized) {
15379                         throw new Error("initializeWasm() must be awaited first!");
15380                 }
15381                 const nativeResponseValue = wasm.TS_ClosingSigned_clone_ptr(arg);
15382                 return nativeResponseValue;
15383         }
15384         // struct LDKClosingSigned ClosingSigned_clone(const struct LDKClosingSigned *NONNULL_PTR orig);
15385         export function ClosingSigned_clone(orig: number): number {
15386                 if(!isWasmInitialized) {
15387                         throw new Error("initializeWasm() must be awaited first!");
15388                 }
15389                 const nativeResponseValue = wasm.TS_ClosingSigned_clone(orig);
15390                 return nativeResponseValue;
15391         }
15392         // void UpdateAddHTLC_free(struct LDKUpdateAddHTLC this_obj);
15393         export function UpdateAddHTLC_free(this_obj: number): void {
15394                 if(!isWasmInitialized) {
15395                         throw new Error("initializeWasm() must be awaited first!");
15396                 }
15397                 const nativeResponseValue = wasm.TS_UpdateAddHTLC_free(this_obj);
15398                 // debug statements here
15399         }
15400         // const uint8_t (*UpdateAddHTLC_get_channel_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
15401         export function UpdateAddHTLC_get_channel_id(this_ptr: number): Uint8Array {
15402                 if(!isWasmInitialized) {
15403                         throw new Error("initializeWasm() must be awaited first!");
15404                 }
15405                 const nativeResponseValue = wasm.TS_UpdateAddHTLC_get_channel_id(this_ptr);
15406                 return decodeUint8Array(nativeResponseValue);
15407         }
15408         // void UpdateAddHTLC_set_channel_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15409         export function UpdateAddHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
15410                 if(!isWasmInitialized) {
15411                         throw new Error("initializeWasm() must be awaited first!");
15412                 }
15413                 const nativeResponseValue = wasm.TS_UpdateAddHTLC_set_channel_id(this_ptr, encodeUint8Array(val));
15414                 // debug statements here
15415         }
15416         // uint64_t UpdateAddHTLC_get_htlc_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
15417         export function UpdateAddHTLC_get_htlc_id(this_ptr: number): number {
15418                 if(!isWasmInitialized) {
15419                         throw new Error("initializeWasm() must be awaited first!");
15420                 }
15421                 const nativeResponseValue = wasm.TS_UpdateAddHTLC_get_htlc_id(this_ptr);
15422                 return nativeResponseValue;
15423         }
15424         // void UpdateAddHTLC_set_htlc_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
15425         export function UpdateAddHTLC_set_htlc_id(this_ptr: number, val: number): void {
15426                 if(!isWasmInitialized) {
15427                         throw new Error("initializeWasm() must be awaited first!");
15428                 }
15429                 const nativeResponseValue = wasm.TS_UpdateAddHTLC_set_htlc_id(this_ptr, val);
15430                 // debug statements here
15431         }
15432         // uint64_t UpdateAddHTLC_get_amount_msat(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
15433         export function UpdateAddHTLC_get_amount_msat(this_ptr: number): number {
15434                 if(!isWasmInitialized) {
15435                         throw new Error("initializeWasm() must be awaited first!");
15436                 }
15437                 const nativeResponseValue = wasm.TS_UpdateAddHTLC_get_amount_msat(this_ptr);
15438                 return nativeResponseValue;
15439         }
15440         // void UpdateAddHTLC_set_amount_msat(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
15441         export function UpdateAddHTLC_set_amount_msat(this_ptr: number, val: number): void {
15442                 if(!isWasmInitialized) {
15443                         throw new Error("initializeWasm() must be awaited first!");
15444                 }
15445                 const nativeResponseValue = wasm.TS_UpdateAddHTLC_set_amount_msat(this_ptr, val);
15446                 // debug statements here
15447         }
15448         // const uint8_t (*UpdateAddHTLC_get_payment_hash(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
15449         export function UpdateAddHTLC_get_payment_hash(this_ptr: number): Uint8Array {
15450                 if(!isWasmInitialized) {
15451                         throw new Error("initializeWasm() must be awaited first!");
15452                 }
15453                 const nativeResponseValue = wasm.TS_UpdateAddHTLC_get_payment_hash(this_ptr);
15454                 return decodeUint8Array(nativeResponseValue);
15455         }
15456         // void UpdateAddHTLC_set_payment_hash(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15457         export function UpdateAddHTLC_set_payment_hash(this_ptr: number, val: Uint8Array): void {
15458                 if(!isWasmInitialized) {
15459                         throw new Error("initializeWasm() must be awaited first!");
15460                 }
15461                 const nativeResponseValue = wasm.TS_UpdateAddHTLC_set_payment_hash(this_ptr, encodeUint8Array(val));
15462                 // debug statements here
15463         }
15464         // uint32_t UpdateAddHTLC_get_cltv_expiry(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
15465         export function UpdateAddHTLC_get_cltv_expiry(this_ptr: number): number {
15466                 if(!isWasmInitialized) {
15467                         throw new Error("initializeWasm() must be awaited first!");
15468                 }
15469                 const nativeResponseValue = wasm.TS_UpdateAddHTLC_get_cltv_expiry(this_ptr);
15470                 return nativeResponseValue;
15471         }
15472         // void UpdateAddHTLC_set_cltv_expiry(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint32_t val);
15473         export function UpdateAddHTLC_set_cltv_expiry(this_ptr: number, val: number): void {
15474                 if(!isWasmInitialized) {
15475                         throw new Error("initializeWasm() must be awaited first!");
15476                 }
15477                 const nativeResponseValue = wasm.TS_UpdateAddHTLC_set_cltv_expiry(this_ptr, val);
15478                 // debug statements here
15479         }
15480         // uint64_t UpdateAddHTLC_clone_ptr(LDKUpdateAddHTLC *NONNULL_PTR arg);
15481         export function UpdateAddHTLC_clone_ptr(arg: number): number {
15482                 if(!isWasmInitialized) {
15483                         throw new Error("initializeWasm() must be awaited first!");
15484                 }
15485                 const nativeResponseValue = wasm.TS_UpdateAddHTLC_clone_ptr(arg);
15486                 return nativeResponseValue;
15487         }
15488         // struct LDKUpdateAddHTLC UpdateAddHTLC_clone(const struct LDKUpdateAddHTLC *NONNULL_PTR orig);
15489         export function UpdateAddHTLC_clone(orig: number): number {
15490                 if(!isWasmInitialized) {
15491                         throw new Error("initializeWasm() must be awaited first!");
15492                 }
15493                 const nativeResponseValue = wasm.TS_UpdateAddHTLC_clone(orig);
15494                 return nativeResponseValue;
15495         }
15496         // void UpdateFulfillHTLC_free(struct LDKUpdateFulfillHTLC this_obj);
15497         export function UpdateFulfillHTLC_free(this_obj: number): void {
15498                 if(!isWasmInitialized) {
15499                         throw new Error("initializeWasm() must be awaited first!");
15500                 }
15501                 const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_free(this_obj);
15502                 // debug statements here
15503         }
15504         // const uint8_t (*UpdateFulfillHTLC_get_channel_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
15505         export function UpdateFulfillHTLC_get_channel_id(this_ptr: number): Uint8Array {
15506                 if(!isWasmInitialized) {
15507                         throw new Error("initializeWasm() must be awaited first!");
15508                 }
15509                 const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_get_channel_id(this_ptr);
15510                 return decodeUint8Array(nativeResponseValue);
15511         }
15512         // void UpdateFulfillHTLC_set_channel_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15513         export function UpdateFulfillHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
15514                 if(!isWasmInitialized) {
15515                         throw new Error("initializeWasm() must be awaited first!");
15516                 }
15517                 const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_set_channel_id(this_ptr, encodeUint8Array(val));
15518                 // debug statements here
15519         }
15520         // uint64_t UpdateFulfillHTLC_get_htlc_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr);
15521         export function UpdateFulfillHTLC_get_htlc_id(this_ptr: number): number {
15522                 if(!isWasmInitialized) {
15523                         throw new Error("initializeWasm() must be awaited first!");
15524                 }
15525                 const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_get_htlc_id(this_ptr);
15526                 return nativeResponseValue;
15527         }
15528         // void UpdateFulfillHTLC_set_htlc_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, uint64_t val);
15529         export function UpdateFulfillHTLC_set_htlc_id(this_ptr: number, val: number): void {
15530                 if(!isWasmInitialized) {
15531                         throw new Error("initializeWasm() must be awaited first!");
15532                 }
15533                 const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_set_htlc_id(this_ptr, val);
15534                 // debug statements here
15535         }
15536         // const uint8_t (*UpdateFulfillHTLC_get_payment_preimage(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
15537         export function UpdateFulfillHTLC_get_payment_preimage(this_ptr: number): Uint8Array {
15538                 if(!isWasmInitialized) {
15539                         throw new Error("initializeWasm() must be awaited first!");
15540                 }
15541                 const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_get_payment_preimage(this_ptr);
15542                 return decodeUint8Array(nativeResponseValue);
15543         }
15544         // void UpdateFulfillHTLC_set_payment_preimage(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15545         export function UpdateFulfillHTLC_set_payment_preimage(this_ptr: number, val: Uint8Array): void {
15546                 if(!isWasmInitialized) {
15547                         throw new Error("initializeWasm() must be awaited first!");
15548                 }
15549                 const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_set_payment_preimage(this_ptr, encodeUint8Array(val));
15550                 // debug statements here
15551         }
15552         // MUST_USE_RES struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t htlc_id_arg, struct LDKThirtyTwoBytes payment_preimage_arg);
15553         export function UpdateFulfillHTLC_new(channel_id_arg: Uint8Array, htlc_id_arg: number, payment_preimage_arg: Uint8Array): number {
15554                 if(!isWasmInitialized) {
15555                         throw new Error("initializeWasm() must be awaited first!");
15556                 }
15557                 const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_new(encodeUint8Array(channel_id_arg), htlc_id_arg, encodeUint8Array(payment_preimage_arg));
15558                 return nativeResponseValue;
15559         }
15560         // uint64_t UpdateFulfillHTLC_clone_ptr(LDKUpdateFulfillHTLC *NONNULL_PTR arg);
15561         export function UpdateFulfillHTLC_clone_ptr(arg: number): number {
15562                 if(!isWasmInitialized) {
15563                         throw new Error("initializeWasm() must be awaited first!");
15564                 }
15565                 const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_clone_ptr(arg);
15566                 return nativeResponseValue;
15567         }
15568         // struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_clone(const struct LDKUpdateFulfillHTLC *NONNULL_PTR orig);
15569         export function UpdateFulfillHTLC_clone(orig: number): number {
15570                 if(!isWasmInitialized) {
15571                         throw new Error("initializeWasm() must be awaited first!");
15572                 }
15573                 const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_clone(orig);
15574                 return nativeResponseValue;
15575         }
15576         // void UpdateFailHTLC_free(struct LDKUpdateFailHTLC this_obj);
15577         export function UpdateFailHTLC_free(this_obj: number): void {
15578                 if(!isWasmInitialized) {
15579                         throw new Error("initializeWasm() must be awaited first!");
15580                 }
15581                 const nativeResponseValue = wasm.TS_UpdateFailHTLC_free(this_obj);
15582                 // debug statements here
15583         }
15584         // const uint8_t (*UpdateFailHTLC_get_channel_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr))[32];
15585         export function UpdateFailHTLC_get_channel_id(this_ptr: number): Uint8Array {
15586                 if(!isWasmInitialized) {
15587                         throw new Error("initializeWasm() must be awaited first!");
15588                 }
15589                 const nativeResponseValue = wasm.TS_UpdateFailHTLC_get_channel_id(this_ptr);
15590                 return decodeUint8Array(nativeResponseValue);
15591         }
15592         // void UpdateFailHTLC_set_channel_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15593         export function UpdateFailHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
15594                 if(!isWasmInitialized) {
15595                         throw new Error("initializeWasm() must be awaited first!");
15596                 }
15597                 const nativeResponseValue = wasm.TS_UpdateFailHTLC_set_channel_id(this_ptr, encodeUint8Array(val));
15598                 // debug statements here
15599         }
15600         // uint64_t UpdateFailHTLC_get_htlc_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr);
15601         export function UpdateFailHTLC_get_htlc_id(this_ptr: number): number {
15602                 if(!isWasmInitialized) {
15603                         throw new Error("initializeWasm() must be awaited first!");
15604                 }
15605                 const nativeResponseValue = wasm.TS_UpdateFailHTLC_get_htlc_id(this_ptr);
15606                 return nativeResponseValue;
15607         }
15608         // void UpdateFailHTLC_set_htlc_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, uint64_t val);
15609         export function UpdateFailHTLC_set_htlc_id(this_ptr: number, val: number): void {
15610                 if(!isWasmInitialized) {
15611                         throw new Error("initializeWasm() must be awaited first!");
15612                 }
15613                 const nativeResponseValue = wasm.TS_UpdateFailHTLC_set_htlc_id(this_ptr, val);
15614                 // debug statements here
15615         }
15616         // uint64_t UpdateFailHTLC_clone_ptr(LDKUpdateFailHTLC *NONNULL_PTR arg);
15617         export function UpdateFailHTLC_clone_ptr(arg: number): number {
15618                 if(!isWasmInitialized) {
15619                         throw new Error("initializeWasm() must be awaited first!");
15620                 }
15621                 const nativeResponseValue = wasm.TS_UpdateFailHTLC_clone_ptr(arg);
15622                 return nativeResponseValue;
15623         }
15624         // struct LDKUpdateFailHTLC UpdateFailHTLC_clone(const struct LDKUpdateFailHTLC *NONNULL_PTR orig);
15625         export function UpdateFailHTLC_clone(orig: number): number {
15626                 if(!isWasmInitialized) {
15627                         throw new Error("initializeWasm() must be awaited first!");
15628                 }
15629                 const nativeResponseValue = wasm.TS_UpdateFailHTLC_clone(orig);
15630                 return nativeResponseValue;
15631         }
15632         // void UpdateFailMalformedHTLC_free(struct LDKUpdateFailMalformedHTLC this_obj);
15633         export function UpdateFailMalformedHTLC_free(this_obj: number): void {
15634                 if(!isWasmInitialized) {
15635                         throw new Error("initializeWasm() must be awaited first!");
15636                 }
15637                 const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_free(this_obj);
15638                 // debug statements here
15639         }
15640         // const uint8_t (*UpdateFailMalformedHTLC_get_channel_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr))[32];
15641         export function UpdateFailMalformedHTLC_get_channel_id(this_ptr: number): Uint8Array {
15642                 if(!isWasmInitialized) {
15643                         throw new Error("initializeWasm() must be awaited first!");
15644                 }
15645                 const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_get_channel_id(this_ptr);
15646                 return decodeUint8Array(nativeResponseValue);
15647         }
15648         // void UpdateFailMalformedHTLC_set_channel_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15649         export function UpdateFailMalformedHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
15650                 if(!isWasmInitialized) {
15651                         throw new Error("initializeWasm() must be awaited first!");
15652                 }
15653                 const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_set_channel_id(this_ptr, encodeUint8Array(val));
15654                 // debug statements here
15655         }
15656         // uint64_t UpdateFailMalformedHTLC_get_htlc_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
15657         export function UpdateFailMalformedHTLC_get_htlc_id(this_ptr: number): number {
15658                 if(!isWasmInitialized) {
15659                         throw new Error("initializeWasm() must be awaited first!");
15660                 }
15661                 const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_get_htlc_id(this_ptr);
15662                 return nativeResponseValue;
15663         }
15664         // void UpdateFailMalformedHTLC_set_htlc_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint64_t val);
15665         export function UpdateFailMalformedHTLC_set_htlc_id(this_ptr: number, val: number): void {
15666                 if(!isWasmInitialized) {
15667                         throw new Error("initializeWasm() must be awaited first!");
15668                 }
15669                 const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_set_htlc_id(this_ptr, val);
15670                 // debug statements here
15671         }
15672         // uint16_t UpdateFailMalformedHTLC_get_failure_code(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
15673         export function UpdateFailMalformedHTLC_get_failure_code(this_ptr: number): number {
15674                 if(!isWasmInitialized) {
15675                         throw new Error("initializeWasm() must be awaited first!");
15676                 }
15677                 const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_get_failure_code(this_ptr);
15678                 return nativeResponseValue;
15679         }
15680         // void UpdateFailMalformedHTLC_set_failure_code(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint16_t val);
15681         export function UpdateFailMalformedHTLC_set_failure_code(this_ptr: number, val: number): void {
15682                 if(!isWasmInitialized) {
15683                         throw new Error("initializeWasm() must be awaited first!");
15684                 }
15685                 const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_set_failure_code(this_ptr, val);
15686                 // debug statements here
15687         }
15688         // uint64_t UpdateFailMalformedHTLC_clone_ptr(LDKUpdateFailMalformedHTLC *NONNULL_PTR arg);
15689         export function UpdateFailMalformedHTLC_clone_ptr(arg: number): number {
15690                 if(!isWasmInitialized) {
15691                         throw new Error("initializeWasm() must be awaited first!");
15692                 }
15693                 const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_clone_ptr(arg);
15694                 return nativeResponseValue;
15695         }
15696         // struct LDKUpdateFailMalformedHTLC UpdateFailMalformedHTLC_clone(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR orig);
15697         export function UpdateFailMalformedHTLC_clone(orig: number): number {
15698                 if(!isWasmInitialized) {
15699                         throw new Error("initializeWasm() must be awaited first!");
15700                 }
15701                 const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_clone(orig);
15702                 return nativeResponseValue;
15703         }
15704         // void CommitmentSigned_free(struct LDKCommitmentSigned this_obj);
15705         export function CommitmentSigned_free(this_obj: number): void {
15706                 if(!isWasmInitialized) {
15707                         throw new Error("initializeWasm() must be awaited first!");
15708                 }
15709                 const nativeResponseValue = wasm.TS_CommitmentSigned_free(this_obj);
15710                 // debug statements here
15711         }
15712         // const uint8_t (*CommitmentSigned_get_channel_id(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr))[32];
15713         export function CommitmentSigned_get_channel_id(this_ptr: number): Uint8Array {
15714                 if(!isWasmInitialized) {
15715                         throw new Error("initializeWasm() must be awaited first!");
15716                 }
15717                 const nativeResponseValue = wasm.TS_CommitmentSigned_get_channel_id(this_ptr);
15718                 return decodeUint8Array(nativeResponseValue);
15719         }
15720         // void CommitmentSigned_set_channel_id(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15721         export function CommitmentSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
15722                 if(!isWasmInitialized) {
15723                         throw new Error("initializeWasm() must be awaited first!");
15724                 }
15725                 const nativeResponseValue = wasm.TS_CommitmentSigned_set_channel_id(this_ptr, encodeUint8Array(val));
15726                 // debug statements here
15727         }
15728         // struct LDKSignature CommitmentSigned_get_signature(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr);
15729         export function CommitmentSigned_get_signature(this_ptr: number): Uint8Array {
15730                 if(!isWasmInitialized) {
15731                         throw new Error("initializeWasm() must be awaited first!");
15732                 }
15733                 const nativeResponseValue = wasm.TS_CommitmentSigned_get_signature(this_ptr);
15734                 return decodeUint8Array(nativeResponseValue);
15735         }
15736         // void CommitmentSigned_set_signature(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
15737         export function CommitmentSigned_set_signature(this_ptr: number, val: Uint8Array): void {
15738                 if(!isWasmInitialized) {
15739                         throw new Error("initializeWasm() must be awaited first!");
15740                 }
15741                 const nativeResponseValue = wasm.TS_CommitmentSigned_set_signature(this_ptr, encodeUint8Array(val));
15742                 // debug statements here
15743         }
15744         // void CommitmentSigned_set_htlc_signatures(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
15745         export function CommitmentSigned_set_htlc_signatures(this_ptr: number, val: Uint8Array[]): void {
15746                 if(!isWasmInitialized) {
15747                         throw new Error("initializeWasm() must be awaited first!");
15748                 }
15749                 const nativeResponseValue = wasm.TS_CommitmentSigned_set_htlc_signatures(this_ptr, val);
15750                 // debug statements here
15751         }
15752         // MUST_USE_RES struct LDKCommitmentSigned CommitmentSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg, struct LDKCVec_SignatureZ htlc_signatures_arg);
15753         export function CommitmentSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array, htlc_signatures_arg: Uint8Array[]): number {
15754                 if(!isWasmInitialized) {
15755                         throw new Error("initializeWasm() must be awaited first!");
15756                 }
15757                 const nativeResponseValue = wasm.TS_CommitmentSigned_new(encodeUint8Array(channel_id_arg), encodeUint8Array(signature_arg), htlc_signatures_arg);
15758                 return nativeResponseValue;
15759         }
15760         // uint64_t CommitmentSigned_clone_ptr(LDKCommitmentSigned *NONNULL_PTR arg);
15761         export function CommitmentSigned_clone_ptr(arg: number): number {
15762                 if(!isWasmInitialized) {
15763                         throw new Error("initializeWasm() must be awaited first!");
15764                 }
15765                 const nativeResponseValue = wasm.TS_CommitmentSigned_clone_ptr(arg);
15766                 return nativeResponseValue;
15767         }
15768         // struct LDKCommitmentSigned CommitmentSigned_clone(const struct LDKCommitmentSigned *NONNULL_PTR orig);
15769         export function CommitmentSigned_clone(orig: number): number {
15770                 if(!isWasmInitialized) {
15771                         throw new Error("initializeWasm() must be awaited first!");
15772                 }
15773                 const nativeResponseValue = wasm.TS_CommitmentSigned_clone(orig);
15774                 return nativeResponseValue;
15775         }
15776         // void RevokeAndACK_free(struct LDKRevokeAndACK this_obj);
15777         export function RevokeAndACK_free(this_obj: number): void {
15778                 if(!isWasmInitialized) {
15779                         throw new Error("initializeWasm() must be awaited first!");
15780                 }
15781                 const nativeResponseValue = wasm.TS_RevokeAndACK_free(this_obj);
15782                 // debug statements here
15783         }
15784         // const uint8_t (*RevokeAndACK_get_channel_id(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
15785         export function RevokeAndACK_get_channel_id(this_ptr: number): Uint8Array {
15786                 if(!isWasmInitialized) {
15787                         throw new Error("initializeWasm() must be awaited first!");
15788                 }
15789                 const nativeResponseValue = wasm.TS_RevokeAndACK_get_channel_id(this_ptr);
15790                 return decodeUint8Array(nativeResponseValue);
15791         }
15792         // void RevokeAndACK_set_channel_id(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15793         export function RevokeAndACK_set_channel_id(this_ptr: number, val: Uint8Array): void {
15794                 if(!isWasmInitialized) {
15795                         throw new Error("initializeWasm() must be awaited first!");
15796                 }
15797                 const nativeResponseValue = wasm.TS_RevokeAndACK_set_channel_id(this_ptr, encodeUint8Array(val));
15798                 // debug statements here
15799         }
15800         // const uint8_t (*RevokeAndACK_get_per_commitment_secret(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
15801         export function RevokeAndACK_get_per_commitment_secret(this_ptr: number): Uint8Array {
15802                 if(!isWasmInitialized) {
15803                         throw new Error("initializeWasm() must be awaited first!");
15804                 }
15805                 const nativeResponseValue = wasm.TS_RevokeAndACK_get_per_commitment_secret(this_ptr);
15806                 return decodeUint8Array(nativeResponseValue);
15807         }
15808         // void RevokeAndACK_set_per_commitment_secret(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15809         export function RevokeAndACK_set_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
15810                 if(!isWasmInitialized) {
15811                         throw new Error("initializeWasm() must be awaited first!");
15812                 }
15813                 const nativeResponseValue = wasm.TS_RevokeAndACK_set_per_commitment_secret(this_ptr, encodeUint8Array(val));
15814                 // debug statements here
15815         }
15816         // struct LDKPublicKey RevokeAndACK_get_next_per_commitment_point(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr);
15817         export function RevokeAndACK_get_next_per_commitment_point(this_ptr: number): Uint8Array {
15818                 if(!isWasmInitialized) {
15819                         throw new Error("initializeWasm() must be awaited first!");
15820                 }
15821                 const nativeResponseValue = wasm.TS_RevokeAndACK_get_next_per_commitment_point(this_ptr);
15822                 return decodeUint8Array(nativeResponseValue);
15823         }
15824         // void RevokeAndACK_set_next_per_commitment_point(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKPublicKey val);
15825         export function RevokeAndACK_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
15826                 if(!isWasmInitialized) {
15827                         throw new Error("initializeWasm() must be awaited first!");
15828                 }
15829                 const nativeResponseValue = wasm.TS_RevokeAndACK_set_next_per_commitment_point(this_ptr, encodeUint8Array(val));
15830                 // debug statements here
15831         }
15832         // 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);
15833         export function RevokeAndACK_new(channel_id_arg: Uint8Array, per_commitment_secret_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
15834                 if(!isWasmInitialized) {
15835                         throw new Error("initializeWasm() must be awaited first!");
15836                 }
15837                 const nativeResponseValue = wasm.TS_RevokeAndACK_new(encodeUint8Array(channel_id_arg), encodeUint8Array(per_commitment_secret_arg), encodeUint8Array(next_per_commitment_point_arg));
15838                 return nativeResponseValue;
15839         }
15840         // uint64_t RevokeAndACK_clone_ptr(LDKRevokeAndACK *NONNULL_PTR arg);
15841         export function RevokeAndACK_clone_ptr(arg: number): number {
15842                 if(!isWasmInitialized) {
15843                         throw new Error("initializeWasm() must be awaited first!");
15844                 }
15845                 const nativeResponseValue = wasm.TS_RevokeAndACK_clone_ptr(arg);
15846                 return nativeResponseValue;
15847         }
15848         // struct LDKRevokeAndACK RevokeAndACK_clone(const struct LDKRevokeAndACK *NONNULL_PTR orig);
15849         export function RevokeAndACK_clone(orig: number): number {
15850                 if(!isWasmInitialized) {
15851                         throw new Error("initializeWasm() must be awaited first!");
15852                 }
15853                 const nativeResponseValue = wasm.TS_RevokeAndACK_clone(orig);
15854                 return nativeResponseValue;
15855         }
15856         // void UpdateFee_free(struct LDKUpdateFee this_obj);
15857         export function UpdateFee_free(this_obj: number): void {
15858                 if(!isWasmInitialized) {
15859                         throw new Error("initializeWasm() must be awaited first!");
15860                 }
15861                 const nativeResponseValue = wasm.TS_UpdateFee_free(this_obj);
15862                 // debug statements here
15863         }
15864         // const uint8_t (*UpdateFee_get_channel_id(const struct LDKUpdateFee *NONNULL_PTR this_ptr))[32];
15865         export function UpdateFee_get_channel_id(this_ptr: number): Uint8Array {
15866                 if(!isWasmInitialized) {
15867                         throw new Error("initializeWasm() must be awaited first!");
15868                 }
15869                 const nativeResponseValue = wasm.TS_UpdateFee_get_channel_id(this_ptr);
15870                 return decodeUint8Array(nativeResponseValue);
15871         }
15872         // void UpdateFee_set_channel_id(struct LDKUpdateFee *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15873         export function UpdateFee_set_channel_id(this_ptr: number, val: Uint8Array): void {
15874                 if(!isWasmInitialized) {
15875                         throw new Error("initializeWasm() must be awaited first!");
15876                 }
15877                 const nativeResponseValue = wasm.TS_UpdateFee_set_channel_id(this_ptr, encodeUint8Array(val));
15878                 // debug statements here
15879         }
15880         // uint32_t UpdateFee_get_feerate_per_kw(const struct LDKUpdateFee *NONNULL_PTR this_ptr);
15881         export function UpdateFee_get_feerate_per_kw(this_ptr: number): number {
15882                 if(!isWasmInitialized) {
15883                         throw new Error("initializeWasm() must be awaited first!");
15884                 }
15885                 const nativeResponseValue = wasm.TS_UpdateFee_get_feerate_per_kw(this_ptr);
15886                 return nativeResponseValue;
15887         }
15888         // void UpdateFee_set_feerate_per_kw(struct LDKUpdateFee *NONNULL_PTR this_ptr, uint32_t val);
15889         export function UpdateFee_set_feerate_per_kw(this_ptr: number, val: number): void {
15890                 if(!isWasmInitialized) {
15891                         throw new Error("initializeWasm() must be awaited first!");
15892                 }
15893                 const nativeResponseValue = wasm.TS_UpdateFee_set_feerate_per_kw(this_ptr, val);
15894                 // debug statements here
15895         }
15896         // MUST_USE_RES struct LDKUpdateFee UpdateFee_new(struct LDKThirtyTwoBytes channel_id_arg, uint32_t feerate_per_kw_arg);
15897         export function UpdateFee_new(channel_id_arg: Uint8Array, feerate_per_kw_arg: number): number {
15898                 if(!isWasmInitialized) {
15899                         throw new Error("initializeWasm() must be awaited first!");
15900                 }
15901                 const nativeResponseValue = wasm.TS_UpdateFee_new(encodeUint8Array(channel_id_arg), feerate_per_kw_arg);
15902                 return nativeResponseValue;
15903         }
15904         // uint64_t UpdateFee_clone_ptr(LDKUpdateFee *NONNULL_PTR arg);
15905         export function UpdateFee_clone_ptr(arg: number): number {
15906                 if(!isWasmInitialized) {
15907                         throw new Error("initializeWasm() must be awaited first!");
15908                 }
15909                 const nativeResponseValue = wasm.TS_UpdateFee_clone_ptr(arg);
15910                 return nativeResponseValue;
15911         }
15912         // struct LDKUpdateFee UpdateFee_clone(const struct LDKUpdateFee *NONNULL_PTR orig);
15913         export function UpdateFee_clone(orig: number): number {
15914                 if(!isWasmInitialized) {
15915                         throw new Error("initializeWasm() must be awaited first!");
15916                 }
15917                 const nativeResponseValue = wasm.TS_UpdateFee_clone(orig);
15918                 return nativeResponseValue;
15919         }
15920         // void DataLossProtect_free(struct LDKDataLossProtect this_obj);
15921         export function DataLossProtect_free(this_obj: number): void {
15922                 if(!isWasmInitialized) {
15923                         throw new Error("initializeWasm() must be awaited first!");
15924                 }
15925                 const nativeResponseValue = wasm.TS_DataLossProtect_free(this_obj);
15926                 // debug statements here
15927         }
15928         // const uint8_t (*DataLossProtect_get_your_last_per_commitment_secret(const struct LDKDataLossProtect *NONNULL_PTR this_ptr))[32];
15929         export function DataLossProtect_get_your_last_per_commitment_secret(this_ptr: number): Uint8Array {
15930                 if(!isWasmInitialized) {
15931                         throw new Error("initializeWasm() must be awaited first!");
15932                 }
15933                 const nativeResponseValue = wasm.TS_DataLossProtect_get_your_last_per_commitment_secret(this_ptr);
15934                 return decodeUint8Array(nativeResponseValue);
15935         }
15936         // void DataLossProtect_set_your_last_per_commitment_secret(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15937         export function DataLossProtect_set_your_last_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
15938                 if(!isWasmInitialized) {
15939                         throw new Error("initializeWasm() must be awaited first!");
15940                 }
15941                 const nativeResponseValue = wasm.TS_DataLossProtect_set_your_last_per_commitment_secret(this_ptr, encodeUint8Array(val));
15942                 // debug statements here
15943         }
15944         // struct LDKPublicKey DataLossProtect_get_my_current_per_commitment_point(const struct LDKDataLossProtect *NONNULL_PTR this_ptr);
15945         export function DataLossProtect_get_my_current_per_commitment_point(this_ptr: number): Uint8Array {
15946                 if(!isWasmInitialized) {
15947                         throw new Error("initializeWasm() must be awaited first!");
15948                 }
15949                 const nativeResponseValue = wasm.TS_DataLossProtect_get_my_current_per_commitment_point(this_ptr);
15950                 return decodeUint8Array(nativeResponseValue);
15951         }
15952         // void DataLossProtect_set_my_current_per_commitment_point(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKPublicKey val);
15953         export function DataLossProtect_set_my_current_per_commitment_point(this_ptr: number, val: Uint8Array): void {
15954                 if(!isWasmInitialized) {
15955                         throw new Error("initializeWasm() must be awaited first!");
15956                 }
15957                 const nativeResponseValue = wasm.TS_DataLossProtect_set_my_current_per_commitment_point(this_ptr, encodeUint8Array(val));
15958                 // debug statements here
15959         }
15960         // MUST_USE_RES struct LDKDataLossProtect DataLossProtect_new(struct LDKThirtyTwoBytes your_last_per_commitment_secret_arg, struct LDKPublicKey my_current_per_commitment_point_arg);
15961         export function DataLossProtect_new(your_last_per_commitment_secret_arg: Uint8Array, my_current_per_commitment_point_arg: Uint8Array): number {
15962                 if(!isWasmInitialized) {
15963                         throw new Error("initializeWasm() must be awaited first!");
15964                 }
15965                 const nativeResponseValue = wasm.TS_DataLossProtect_new(encodeUint8Array(your_last_per_commitment_secret_arg), encodeUint8Array(my_current_per_commitment_point_arg));
15966                 return nativeResponseValue;
15967         }
15968         // uint64_t DataLossProtect_clone_ptr(LDKDataLossProtect *NONNULL_PTR arg);
15969         export function DataLossProtect_clone_ptr(arg: number): number {
15970                 if(!isWasmInitialized) {
15971                         throw new Error("initializeWasm() must be awaited first!");
15972                 }
15973                 const nativeResponseValue = wasm.TS_DataLossProtect_clone_ptr(arg);
15974                 return nativeResponseValue;
15975         }
15976         // struct LDKDataLossProtect DataLossProtect_clone(const struct LDKDataLossProtect *NONNULL_PTR orig);
15977         export function DataLossProtect_clone(orig: number): number {
15978                 if(!isWasmInitialized) {
15979                         throw new Error("initializeWasm() must be awaited first!");
15980                 }
15981                 const nativeResponseValue = wasm.TS_DataLossProtect_clone(orig);
15982                 return nativeResponseValue;
15983         }
15984         // void ChannelReestablish_free(struct LDKChannelReestablish this_obj);
15985         export function ChannelReestablish_free(this_obj: number): void {
15986                 if(!isWasmInitialized) {
15987                         throw new Error("initializeWasm() must be awaited first!");
15988                 }
15989                 const nativeResponseValue = wasm.TS_ChannelReestablish_free(this_obj);
15990                 // debug statements here
15991         }
15992         // const uint8_t (*ChannelReestablish_get_channel_id(const struct LDKChannelReestablish *NONNULL_PTR this_ptr))[32];
15993         export function ChannelReestablish_get_channel_id(this_ptr: number): Uint8Array {
15994                 if(!isWasmInitialized) {
15995                         throw new Error("initializeWasm() must be awaited first!");
15996                 }
15997                 const nativeResponseValue = wasm.TS_ChannelReestablish_get_channel_id(this_ptr);
15998                 return decodeUint8Array(nativeResponseValue);
15999         }
16000         // void ChannelReestablish_set_channel_id(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
16001         export function ChannelReestablish_set_channel_id(this_ptr: number, val: Uint8Array): void {
16002                 if(!isWasmInitialized) {
16003                         throw new Error("initializeWasm() must be awaited first!");
16004                 }
16005                 const nativeResponseValue = wasm.TS_ChannelReestablish_set_channel_id(this_ptr, encodeUint8Array(val));
16006                 // debug statements here
16007         }
16008         // uint64_t ChannelReestablish_get_next_local_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
16009         export function ChannelReestablish_get_next_local_commitment_number(this_ptr: number): number {
16010                 if(!isWasmInitialized) {
16011                         throw new Error("initializeWasm() must be awaited first!");
16012                 }
16013                 const nativeResponseValue = wasm.TS_ChannelReestablish_get_next_local_commitment_number(this_ptr);
16014                 return nativeResponseValue;
16015         }
16016         // void ChannelReestablish_set_next_local_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
16017         export function ChannelReestablish_set_next_local_commitment_number(this_ptr: number, val: number): void {
16018                 if(!isWasmInitialized) {
16019                         throw new Error("initializeWasm() must be awaited first!");
16020                 }
16021                 const nativeResponseValue = wasm.TS_ChannelReestablish_set_next_local_commitment_number(this_ptr, val);
16022                 // debug statements here
16023         }
16024         // uint64_t ChannelReestablish_get_next_remote_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
16025         export function ChannelReestablish_get_next_remote_commitment_number(this_ptr: number): number {
16026                 if(!isWasmInitialized) {
16027                         throw new Error("initializeWasm() must be awaited first!");
16028                 }
16029                 const nativeResponseValue = wasm.TS_ChannelReestablish_get_next_remote_commitment_number(this_ptr);
16030                 return nativeResponseValue;
16031         }
16032         // void ChannelReestablish_set_next_remote_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
16033         export function ChannelReestablish_set_next_remote_commitment_number(this_ptr: number, val: number): void {
16034                 if(!isWasmInitialized) {
16035                         throw new Error("initializeWasm() must be awaited first!");
16036                 }
16037                 const nativeResponseValue = wasm.TS_ChannelReestablish_set_next_remote_commitment_number(this_ptr, val);
16038                 // debug statements here
16039         }
16040         // uint64_t ChannelReestablish_clone_ptr(LDKChannelReestablish *NONNULL_PTR arg);
16041         export function ChannelReestablish_clone_ptr(arg: number): number {
16042                 if(!isWasmInitialized) {
16043                         throw new Error("initializeWasm() must be awaited first!");
16044                 }
16045                 const nativeResponseValue = wasm.TS_ChannelReestablish_clone_ptr(arg);
16046                 return nativeResponseValue;
16047         }
16048         // struct LDKChannelReestablish ChannelReestablish_clone(const struct LDKChannelReestablish *NONNULL_PTR orig);
16049         export function ChannelReestablish_clone(orig: number): number {
16050                 if(!isWasmInitialized) {
16051                         throw new Error("initializeWasm() must be awaited first!");
16052                 }
16053                 const nativeResponseValue = wasm.TS_ChannelReestablish_clone(orig);
16054                 return nativeResponseValue;
16055         }
16056         // void AnnouncementSignatures_free(struct LDKAnnouncementSignatures this_obj);
16057         export function AnnouncementSignatures_free(this_obj: number): void {
16058                 if(!isWasmInitialized) {
16059                         throw new Error("initializeWasm() must be awaited first!");
16060                 }
16061                 const nativeResponseValue = wasm.TS_AnnouncementSignatures_free(this_obj);
16062                 // debug statements here
16063         }
16064         // const uint8_t (*AnnouncementSignatures_get_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr))[32];
16065         export function AnnouncementSignatures_get_channel_id(this_ptr: number): Uint8Array {
16066                 if(!isWasmInitialized) {
16067                         throw new Error("initializeWasm() must be awaited first!");
16068                 }
16069                 const nativeResponseValue = wasm.TS_AnnouncementSignatures_get_channel_id(this_ptr);
16070                 return decodeUint8Array(nativeResponseValue);
16071         }
16072         // void AnnouncementSignatures_set_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
16073         export function AnnouncementSignatures_set_channel_id(this_ptr: number, val: Uint8Array): void {
16074                 if(!isWasmInitialized) {
16075                         throw new Error("initializeWasm() must be awaited first!");
16076                 }
16077                 const nativeResponseValue = wasm.TS_AnnouncementSignatures_set_channel_id(this_ptr, encodeUint8Array(val));
16078                 // debug statements here
16079         }
16080         // uint64_t AnnouncementSignatures_get_short_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
16081         export function AnnouncementSignatures_get_short_channel_id(this_ptr: number): number {
16082                 if(!isWasmInitialized) {
16083                         throw new Error("initializeWasm() must be awaited first!");
16084                 }
16085                 const nativeResponseValue = wasm.TS_AnnouncementSignatures_get_short_channel_id(this_ptr);
16086                 return nativeResponseValue;
16087         }
16088         // void AnnouncementSignatures_set_short_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, uint64_t val);
16089         export function AnnouncementSignatures_set_short_channel_id(this_ptr: number, val: number): void {
16090                 if(!isWasmInitialized) {
16091                         throw new Error("initializeWasm() must be awaited first!");
16092                 }
16093                 const nativeResponseValue = wasm.TS_AnnouncementSignatures_set_short_channel_id(this_ptr, val);
16094                 // debug statements here
16095         }
16096         // struct LDKSignature AnnouncementSignatures_get_node_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
16097         export function AnnouncementSignatures_get_node_signature(this_ptr: number): Uint8Array {
16098                 if(!isWasmInitialized) {
16099                         throw new Error("initializeWasm() must be awaited first!");
16100                 }
16101                 const nativeResponseValue = wasm.TS_AnnouncementSignatures_get_node_signature(this_ptr);
16102                 return decodeUint8Array(nativeResponseValue);
16103         }
16104         // void AnnouncementSignatures_set_node_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
16105         export function AnnouncementSignatures_set_node_signature(this_ptr: number, val: Uint8Array): void {
16106                 if(!isWasmInitialized) {
16107                         throw new Error("initializeWasm() must be awaited first!");
16108                 }
16109                 const nativeResponseValue = wasm.TS_AnnouncementSignatures_set_node_signature(this_ptr, encodeUint8Array(val));
16110                 // debug statements here
16111         }
16112         // struct LDKSignature AnnouncementSignatures_get_bitcoin_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
16113         export function AnnouncementSignatures_get_bitcoin_signature(this_ptr: number): Uint8Array {
16114                 if(!isWasmInitialized) {
16115                         throw new Error("initializeWasm() must be awaited first!");
16116                 }
16117                 const nativeResponseValue = wasm.TS_AnnouncementSignatures_get_bitcoin_signature(this_ptr);
16118                 return decodeUint8Array(nativeResponseValue);
16119         }
16120         // void AnnouncementSignatures_set_bitcoin_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
16121         export function AnnouncementSignatures_set_bitcoin_signature(this_ptr: number, val: Uint8Array): void {
16122                 if(!isWasmInitialized) {
16123                         throw new Error("initializeWasm() must be awaited first!");
16124                 }
16125                 const nativeResponseValue = wasm.TS_AnnouncementSignatures_set_bitcoin_signature(this_ptr, encodeUint8Array(val));
16126                 // debug statements here
16127         }
16128         // 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);
16129         export function AnnouncementSignatures_new(channel_id_arg: Uint8Array, short_channel_id_arg: number, node_signature_arg: Uint8Array, bitcoin_signature_arg: Uint8Array): number {
16130                 if(!isWasmInitialized) {
16131                         throw new Error("initializeWasm() must be awaited first!");
16132                 }
16133                 const nativeResponseValue = wasm.TS_AnnouncementSignatures_new(encodeUint8Array(channel_id_arg), short_channel_id_arg, encodeUint8Array(node_signature_arg), encodeUint8Array(bitcoin_signature_arg));
16134                 return nativeResponseValue;
16135         }
16136         // uint64_t AnnouncementSignatures_clone_ptr(LDKAnnouncementSignatures *NONNULL_PTR arg);
16137         export function AnnouncementSignatures_clone_ptr(arg: number): number {
16138                 if(!isWasmInitialized) {
16139                         throw new Error("initializeWasm() must be awaited first!");
16140                 }
16141                 const nativeResponseValue = wasm.TS_AnnouncementSignatures_clone_ptr(arg);
16142                 return nativeResponseValue;
16143         }
16144         // struct LDKAnnouncementSignatures AnnouncementSignatures_clone(const struct LDKAnnouncementSignatures *NONNULL_PTR orig);
16145         export function AnnouncementSignatures_clone(orig: number): number {
16146                 if(!isWasmInitialized) {
16147                         throw new Error("initializeWasm() must be awaited first!");
16148                 }
16149                 const nativeResponseValue = wasm.TS_AnnouncementSignatures_clone(orig);
16150                 return nativeResponseValue;
16151         }
16152         // void NetAddress_free(struct LDKNetAddress this_ptr);
16153         export function NetAddress_free(this_ptr: number): void {
16154                 if(!isWasmInitialized) {
16155                         throw new Error("initializeWasm() must be awaited first!");
16156                 }
16157                 const nativeResponseValue = wasm.TS_NetAddress_free(this_ptr);
16158                 // debug statements here
16159         }
16160         // uint64_t NetAddress_clone_ptr(LDKNetAddress *NONNULL_PTR arg);
16161         export function NetAddress_clone_ptr(arg: number): number {
16162                 if(!isWasmInitialized) {
16163                         throw new Error("initializeWasm() must be awaited first!");
16164                 }
16165                 const nativeResponseValue = wasm.TS_NetAddress_clone_ptr(arg);
16166                 return nativeResponseValue;
16167         }
16168         // struct LDKNetAddress NetAddress_clone(const struct LDKNetAddress *NONNULL_PTR orig);
16169         export function NetAddress_clone(orig: number): number {
16170                 if(!isWasmInitialized) {
16171                         throw new Error("initializeWasm() must be awaited first!");
16172                 }
16173                 const nativeResponseValue = wasm.TS_NetAddress_clone(orig);
16174                 return nativeResponseValue;
16175         }
16176         // struct LDKNetAddress NetAddress_ipv4(struct LDKFourBytes addr, uint16_t port);
16177         export function NetAddress_ipv4(addr: Uint8Array, port: number): number {
16178                 if(!isWasmInitialized) {
16179                         throw new Error("initializeWasm() must be awaited first!");
16180                 }
16181                 const nativeResponseValue = wasm.TS_NetAddress_ipv4(encodeUint8Array(addr), port);
16182                 return nativeResponseValue;
16183         }
16184         // struct LDKNetAddress NetAddress_ipv6(struct LDKSixteenBytes addr, uint16_t port);
16185         export function NetAddress_ipv6(addr: Uint8Array, port: number): number {
16186                 if(!isWasmInitialized) {
16187                         throw new Error("initializeWasm() must be awaited first!");
16188                 }
16189                 const nativeResponseValue = wasm.TS_NetAddress_ipv6(encodeUint8Array(addr), port);
16190                 return nativeResponseValue;
16191         }
16192         // struct LDKNetAddress NetAddress_onion_v2(struct LDKTwelveBytes a);
16193         export function NetAddress_onion_v2(a: Uint8Array): number {
16194                 if(!isWasmInitialized) {
16195                         throw new Error("initializeWasm() must be awaited first!");
16196                 }
16197                 const nativeResponseValue = wasm.TS_NetAddress_onion_v2(encodeUint8Array(a));
16198                 return nativeResponseValue;
16199         }
16200         // struct LDKNetAddress NetAddress_onion_v3(struct LDKThirtyTwoBytes ed25519_pubkey, uint16_t checksum, uint8_t version, uint16_t port);
16201         export function NetAddress_onion_v3(ed25519_pubkey: Uint8Array, checksum: number, version: number, port: number): number {
16202                 if(!isWasmInitialized) {
16203                         throw new Error("initializeWasm() must be awaited first!");
16204                 }
16205                 const nativeResponseValue = wasm.TS_NetAddress_onion_v3(encodeUint8Array(ed25519_pubkey), checksum, version, port);
16206                 return nativeResponseValue;
16207         }
16208         // struct LDKCVec_u8Z NetAddress_write(const struct LDKNetAddress *NONNULL_PTR obj);
16209         export function NetAddress_write(obj: number): Uint8Array {
16210                 if(!isWasmInitialized) {
16211                         throw new Error("initializeWasm() must be awaited first!");
16212                 }
16213                 const nativeResponseValue = wasm.TS_NetAddress_write(obj);
16214                 return decodeUint8Array(nativeResponseValue);
16215         }
16216         // struct LDKCResult_NetAddressDecodeErrorZ NetAddress_read(struct LDKu8slice ser);
16217         export function NetAddress_read(ser: Uint8Array): number {
16218                 if(!isWasmInitialized) {
16219                         throw new Error("initializeWasm() must be awaited first!");
16220                 }
16221                 const nativeResponseValue = wasm.TS_NetAddress_read(encodeUint8Array(ser));
16222                 return nativeResponseValue;
16223         }
16224         // void UnsignedNodeAnnouncement_free(struct LDKUnsignedNodeAnnouncement this_obj);
16225         export function UnsignedNodeAnnouncement_free(this_obj: number): void {
16226                 if(!isWasmInitialized) {
16227                         throw new Error("initializeWasm() must be awaited first!");
16228                 }
16229                 const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_free(this_obj);
16230                 // debug statements here
16231         }
16232         // struct LDKNodeFeatures UnsignedNodeAnnouncement_get_features(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
16233         export function UnsignedNodeAnnouncement_get_features(this_ptr: number): number {
16234                 if(!isWasmInitialized) {
16235                         throw new Error("initializeWasm() must be awaited first!");
16236                 }
16237                 const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_get_features(this_ptr);
16238                 return nativeResponseValue;
16239         }
16240         // void UnsignedNodeAnnouncement_set_features(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
16241         export function UnsignedNodeAnnouncement_set_features(this_ptr: number, val: number): void {
16242                 if(!isWasmInitialized) {
16243                         throw new Error("initializeWasm() must be awaited first!");
16244                 }
16245                 const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_set_features(this_ptr, val);
16246                 // debug statements here
16247         }
16248         // uint32_t UnsignedNodeAnnouncement_get_timestamp(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
16249         export function UnsignedNodeAnnouncement_get_timestamp(this_ptr: number): number {
16250                 if(!isWasmInitialized) {
16251                         throw new Error("initializeWasm() must be awaited first!");
16252                 }
16253                 const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_get_timestamp(this_ptr);
16254                 return nativeResponseValue;
16255         }
16256         // void UnsignedNodeAnnouncement_set_timestamp(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, uint32_t val);
16257         export function UnsignedNodeAnnouncement_set_timestamp(this_ptr: number, val: number): void {
16258                 if(!isWasmInitialized) {
16259                         throw new Error("initializeWasm() must be awaited first!");
16260                 }
16261                 const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_set_timestamp(this_ptr, val);
16262                 // debug statements here
16263         }
16264         // struct LDKPublicKey UnsignedNodeAnnouncement_get_node_id(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
16265         export function UnsignedNodeAnnouncement_get_node_id(this_ptr: number): Uint8Array {
16266                 if(!isWasmInitialized) {
16267                         throw new Error("initializeWasm() must be awaited first!");
16268                 }
16269                 const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_get_node_id(this_ptr);
16270                 return decodeUint8Array(nativeResponseValue);
16271         }
16272         // void UnsignedNodeAnnouncement_set_node_id(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
16273         export function UnsignedNodeAnnouncement_set_node_id(this_ptr: number, val: Uint8Array): void {
16274                 if(!isWasmInitialized) {
16275                         throw new Error("initializeWasm() must be awaited first!");
16276                 }
16277                 const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_set_node_id(this_ptr, encodeUint8Array(val));
16278                 // debug statements here
16279         }
16280         // const uint8_t (*UnsignedNodeAnnouncement_get_rgb(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[3];
16281         export function UnsignedNodeAnnouncement_get_rgb(this_ptr: number): Uint8Array {
16282                 if(!isWasmInitialized) {
16283                         throw new Error("initializeWasm() must be awaited first!");
16284                 }
16285                 const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_get_rgb(this_ptr);
16286                 return decodeUint8Array(nativeResponseValue);
16287         }
16288         // void UnsignedNodeAnnouncement_set_rgb(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
16289         export function UnsignedNodeAnnouncement_set_rgb(this_ptr: number, val: Uint8Array): void {
16290                 if(!isWasmInitialized) {
16291                         throw new Error("initializeWasm() must be awaited first!");
16292                 }
16293                 const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_set_rgb(this_ptr, encodeUint8Array(val));
16294                 // debug statements here
16295         }
16296         // const uint8_t (*UnsignedNodeAnnouncement_get_alias(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[32];
16297         export function UnsignedNodeAnnouncement_get_alias(this_ptr: number): Uint8Array {
16298                 if(!isWasmInitialized) {
16299                         throw new Error("initializeWasm() must be awaited first!");
16300                 }
16301                 const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_get_alias(this_ptr);
16302                 return decodeUint8Array(nativeResponseValue);
16303         }
16304         // void UnsignedNodeAnnouncement_set_alias(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
16305         export function UnsignedNodeAnnouncement_set_alias(this_ptr: number, val: Uint8Array): void {
16306                 if(!isWasmInitialized) {
16307                         throw new Error("initializeWasm() must be awaited first!");
16308                 }
16309                 const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_set_alias(this_ptr, encodeUint8Array(val));
16310                 // debug statements here
16311         }
16312         // void UnsignedNodeAnnouncement_set_addresses(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
16313         export function UnsignedNodeAnnouncement_set_addresses(this_ptr: number, val: number[]): void {
16314                 if(!isWasmInitialized) {
16315                         throw new Error("initializeWasm() must be awaited first!");
16316                 }
16317                 const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_set_addresses(this_ptr, val);
16318                 // debug statements here
16319         }
16320         // uint64_t UnsignedNodeAnnouncement_clone_ptr(LDKUnsignedNodeAnnouncement *NONNULL_PTR arg);
16321         export function UnsignedNodeAnnouncement_clone_ptr(arg: number): number {
16322                 if(!isWasmInitialized) {
16323                         throw new Error("initializeWasm() must be awaited first!");
16324                 }
16325                 const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_clone_ptr(arg);
16326                 return nativeResponseValue;
16327         }
16328         // struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_clone(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR orig);
16329         export function UnsignedNodeAnnouncement_clone(orig: number): number {
16330                 if(!isWasmInitialized) {
16331                         throw new Error("initializeWasm() must be awaited first!");
16332                 }
16333                 const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_clone(orig);
16334                 return nativeResponseValue;
16335         }
16336         // void NodeAnnouncement_free(struct LDKNodeAnnouncement this_obj);
16337         export function NodeAnnouncement_free(this_obj: number): void {
16338                 if(!isWasmInitialized) {
16339                         throw new Error("initializeWasm() must be awaited first!");
16340                 }
16341                 const nativeResponseValue = wasm.TS_NodeAnnouncement_free(this_obj);
16342                 // debug statements here
16343         }
16344         // struct LDKSignature NodeAnnouncement_get_signature(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
16345         export function NodeAnnouncement_get_signature(this_ptr: number): Uint8Array {
16346                 if(!isWasmInitialized) {
16347                         throw new Error("initializeWasm() must be awaited first!");
16348                 }
16349                 const nativeResponseValue = wasm.TS_NodeAnnouncement_get_signature(this_ptr);
16350                 return decodeUint8Array(nativeResponseValue);
16351         }
16352         // void NodeAnnouncement_set_signature(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
16353         export function NodeAnnouncement_set_signature(this_ptr: number, val: Uint8Array): void {
16354                 if(!isWasmInitialized) {
16355                         throw new Error("initializeWasm() must be awaited first!");
16356                 }
16357                 const nativeResponseValue = wasm.TS_NodeAnnouncement_set_signature(this_ptr, encodeUint8Array(val));
16358                 // debug statements here
16359         }
16360         // struct LDKUnsignedNodeAnnouncement NodeAnnouncement_get_contents(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
16361         export function NodeAnnouncement_get_contents(this_ptr: number): number {
16362                 if(!isWasmInitialized) {
16363                         throw new Error("initializeWasm() must be awaited first!");
16364                 }
16365                 const nativeResponseValue = wasm.TS_NodeAnnouncement_get_contents(this_ptr);
16366                 return nativeResponseValue;
16367         }
16368         // void NodeAnnouncement_set_contents(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedNodeAnnouncement val);
16369         export function NodeAnnouncement_set_contents(this_ptr: number, val: number): void {
16370                 if(!isWasmInitialized) {
16371                         throw new Error("initializeWasm() must be awaited first!");
16372                 }
16373                 const nativeResponseValue = wasm.TS_NodeAnnouncement_set_contents(this_ptr, val);
16374                 // debug statements here
16375         }
16376         // MUST_USE_RES struct LDKNodeAnnouncement NodeAnnouncement_new(struct LDKSignature signature_arg, struct LDKUnsignedNodeAnnouncement contents_arg);
16377         export function NodeAnnouncement_new(signature_arg: Uint8Array, contents_arg: number): number {
16378                 if(!isWasmInitialized) {
16379                         throw new Error("initializeWasm() must be awaited first!");
16380                 }
16381                 const nativeResponseValue = wasm.TS_NodeAnnouncement_new(encodeUint8Array(signature_arg), contents_arg);
16382                 return nativeResponseValue;
16383         }
16384         // uint64_t NodeAnnouncement_clone_ptr(LDKNodeAnnouncement *NONNULL_PTR arg);
16385         export function NodeAnnouncement_clone_ptr(arg: number): number {
16386                 if(!isWasmInitialized) {
16387                         throw new Error("initializeWasm() must be awaited first!");
16388                 }
16389                 const nativeResponseValue = wasm.TS_NodeAnnouncement_clone_ptr(arg);
16390                 return nativeResponseValue;
16391         }
16392         // struct LDKNodeAnnouncement NodeAnnouncement_clone(const struct LDKNodeAnnouncement *NONNULL_PTR orig);
16393         export function NodeAnnouncement_clone(orig: number): number {
16394                 if(!isWasmInitialized) {
16395                         throw new Error("initializeWasm() must be awaited first!");
16396                 }
16397                 const nativeResponseValue = wasm.TS_NodeAnnouncement_clone(orig);
16398                 return nativeResponseValue;
16399         }
16400         // void UnsignedChannelAnnouncement_free(struct LDKUnsignedChannelAnnouncement this_obj);
16401         export function UnsignedChannelAnnouncement_free(this_obj: number): void {
16402                 if(!isWasmInitialized) {
16403                         throw new Error("initializeWasm() must be awaited first!");
16404                 }
16405                 const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_free(this_obj);
16406                 // debug statements here
16407         }
16408         // struct LDKChannelFeatures UnsignedChannelAnnouncement_get_features(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
16409         export function UnsignedChannelAnnouncement_get_features(this_ptr: number): number {
16410                 if(!isWasmInitialized) {
16411                         throw new Error("initializeWasm() must be awaited first!");
16412                 }
16413                 const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_get_features(this_ptr);
16414                 return nativeResponseValue;
16415         }
16416         // void UnsignedChannelAnnouncement_set_features(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
16417         export function UnsignedChannelAnnouncement_set_features(this_ptr: number, val: number): void {
16418                 if(!isWasmInitialized) {
16419                         throw new Error("initializeWasm() must be awaited first!");
16420                 }
16421                 const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_set_features(this_ptr, val);
16422                 // debug statements here
16423         }
16424         // const uint8_t (*UnsignedChannelAnnouncement_get_chain_hash(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr))[32];
16425         export function UnsignedChannelAnnouncement_get_chain_hash(this_ptr: number): Uint8Array {
16426                 if(!isWasmInitialized) {
16427                         throw new Error("initializeWasm() must be awaited first!");
16428                 }
16429                 const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_get_chain_hash(this_ptr);
16430                 return decodeUint8Array(nativeResponseValue);
16431         }
16432         // void UnsignedChannelAnnouncement_set_chain_hash(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
16433         export function UnsignedChannelAnnouncement_set_chain_hash(this_ptr: number, val: Uint8Array): void {
16434                 if(!isWasmInitialized) {
16435                         throw new Error("initializeWasm() must be awaited first!");
16436                 }
16437                 const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_set_chain_hash(this_ptr, encodeUint8Array(val));
16438                 // debug statements here
16439         }
16440         // uint64_t UnsignedChannelAnnouncement_get_short_channel_id(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
16441         export function UnsignedChannelAnnouncement_get_short_channel_id(this_ptr: number): number {
16442                 if(!isWasmInitialized) {
16443                         throw new Error("initializeWasm() must be awaited first!");
16444                 }
16445                 const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_get_short_channel_id(this_ptr);
16446                 return nativeResponseValue;
16447         }
16448         // void UnsignedChannelAnnouncement_set_short_channel_id(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, uint64_t val);
16449         export function UnsignedChannelAnnouncement_set_short_channel_id(this_ptr: number, val: number): void {
16450                 if(!isWasmInitialized) {
16451                         throw new Error("initializeWasm() must be awaited first!");
16452                 }
16453                 const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_set_short_channel_id(this_ptr, val);
16454                 // debug statements here
16455         }
16456         // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
16457         export function UnsignedChannelAnnouncement_get_node_id_1(this_ptr: number): Uint8Array {
16458                 if(!isWasmInitialized) {
16459                         throw new Error("initializeWasm() must be awaited first!");
16460                 }
16461                 const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_get_node_id_1(this_ptr);
16462                 return decodeUint8Array(nativeResponseValue);
16463         }
16464         // void UnsignedChannelAnnouncement_set_node_id_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
16465         export function UnsignedChannelAnnouncement_set_node_id_1(this_ptr: number, val: Uint8Array): void {
16466                 if(!isWasmInitialized) {
16467                         throw new Error("initializeWasm() must be awaited first!");
16468                 }
16469                 const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_set_node_id_1(this_ptr, encodeUint8Array(val));
16470                 // debug statements here
16471         }
16472         // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
16473         export function UnsignedChannelAnnouncement_get_node_id_2(this_ptr: number): Uint8Array {
16474                 if(!isWasmInitialized) {
16475                         throw new Error("initializeWasm() must be awaited first!");
16476                 }
16477                 const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_get_node_id_2(this_ptr);
16478                 return decodeUint8Array(nativeResponseValue);
16479         }
16480         // void UnsignedChannelAnnouncement_set_node_id_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
16481         export function UnsignedChannelAnnouncement_set_node_id_2(this_ptr: number, val: Uint8Array): void {
16482                 if(!isWasmInitialized) {
16483                         throw new Error("initializeWasm() must be awaited first!");
16484                 }
16485                 const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_set_node_id_2(this_ptr, encodeUint8Array(val));
16486                 // debug statements here
16487         }
16488         // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
16489         export function UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr: number): Uint8Array {
16490                 if(!isWasmInitialized) {
16491                         throw new Error("initializeWasm() must be awaited first!");
16492                 }
16493                 const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr);
16494                 return decodeUint8Array(nativeResponseValue);
16495         }
16496         // void UnsignedChannelAnnouncement_set_bitcoin_key_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
16497         export function UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr: number, val: Uint8Array): void {
16498                 if(!isWasmInitialized) {
16499                         throw new Error("initializeWasm() must be awaited first!");
16500                 }
16501                 const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr, encodeUint8Array(val));
16502                 // debug statements here
16503         }
16504         // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
16505         export function UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr: number): Uint8Array {
16506                 if(!isWasmInitialized) {
16507                         throw new Error("initializeWasm() must be awaited first!");
16508                 }
16509                 const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr);
16510                 return decodeUint8Array(nativeResponseValue);
16511         }
16512         // void UnsignedChannelAnnouncement_set_bitcoin_key_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
16513         export function UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr: number, val: Uint8Array): void {
16514                 if(!isWasmInitialized) {
16515                         throw new Error("initializeWasm() must be awaited first!");
16516                 }
16517                 const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr, encodeUint8Array(val));
16518                 // debug statements here
16519         }
16520         // uint64_t UnsignedChannelAnnouncement_clone_ptr(LDKUnsignedChannelAnnouncement *NONNULL_PTR arg);
16521         export function UnsignedChannelAnnouncement_clone_ptr(arg: number): number {
16522                 if(!isWasmInitialized) {
16523                         throw new Error("initializeWasm() must be awaited first!");
16524                 }
16525                 const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_clone_ptr(arg);
16526                 return nativeResponseValue;
16527         }
16528         // struct LDKUnsignedChannelAnnouncement UnsignedChannelAnnouncement_clone(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR orig);
16529         export function UnsignedChannelAnnouncement_clone(orig: number): number {
16530                 if(!isWasmInitialized) {
16531                         throw new Error("initializeWasm() must be awaited first!");
16532                 }
16533                 const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_clone(orig);
16534                 return nativeResponseValue;
16535         }
16536         // void ChannelAnnouncement_free(struct LDKChannelAnnouncement this_obj);
16537         export function ChannelAnnouncement_free(this_obj: number): void {
16538                 if(!isWasmInitialized) {
16539                         throw new Error("initializeWasm() must be awaited first!");
16540                 }
16541                 const nativeResponseValue = wasm.TS_ChannelAnnouncement_free(this_obj);
16542                 // debug statements here
16543         }
16544         // struct LDKSignature ChannelAnnouncement_get_node_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
16545         export function ChannelAnnouncement_get_node_signature_1(this_ptr: number): Uint8Array {
16546                 if(!isWasmInitialized) {
16547                         throw new Error("initializeWasm() must be awaited first!");
16548                 }
16549                 const nativeResponseValue = wasm.TS_ChannelAnnouncement_get_node_signature_1(this_ptr);
16550                 return decodeUint8Array(nativeResponseValue);
16551         }
16552         // void ChannelAnnouncement_set_node_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
16553         export function ChannelAnnouncement_set_node_signature_1(this_ptr: number, val: Uint8Array): void {
16554                 if(!isWasmInitialized) {
16555                         throw new Error("initializeWasm() must be awaited first!");
16556                 }
16557                 const nativeResponseValue = wasm.TS_ChannelAnnouncement_set_node_signature_1(this_ptr, encodeUint8Array(val));
16558                 // debug statements here
16559         }
16560         // struct LDKSignature ChannelAnnouncement_get_node_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
16561         export function ChannelAnnouncement_get_node_signature_2(this_ptr: number): Uint8Array {
16562                 if(!isWasmInitialized) {
16563                         throw new Error("initializeWasm() must be awaited first!");
16564                 }
16565                 const nativeResponseValue = wasm.TS_ChannelAnnouncement_get_node_signature_2(this_ptr);
16566                 return decodeUint8Array(nativeResponseValue);
16567         }
16568         // void ChannelAnnouncement_set_node_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
16569         export function ChannelAnnouncement_set_node_signature_2(this_ptr: number, val: Uint8Array): void {
16570                 if(!isWasmInitialized) {
16571                         throw new Error("initializeWasm() must be awaited first!");
16572                 }
16573                 const nativeResponseValue = wasm.TS_ChannelAnnouncement_set_node_signature_2(this_ptr, encodeUint8Array(val));
16574                 // debug statements here
16575         }
16576         // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
16577         export function ChannelAnnouncement_get_bitcoin_signature_1(this_ptr: number): Uint8Array {
16578                 if(!isWasmInitialized) {
16579                         throw new Error("initializeWasm() must be awaited first!");
16580                 }
16581                 const nativeResponseValue = wasm.TS_ChannelAnnouncement_get_bitcoin_signature_1(this_ptr);
16582                 return decodeUint8Array(nativeResponseValue);
16583         }
16584         // void ChannelAnnouncement_set_bitcoin_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
16585         export function ChannelAnnouncement_set_bitcoin_signature_1(this_ptr: number, val: Uint8Array): void {
16586                 if(!isWasmInitialized) {
16587                         throw new Error("initializeWasm() must be awaited first!");
16588                 }
16589                 const nativeResponseValue = wasm.TS_ChannelAnnouncement_set_bitcoin_signature_1(this_ptr, encodeUint8Array(val));
16590                 // debug statements here
16591         }
16592         // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
16593         export function ChannelAnnouncement_get_bitcoin_signature_2(this_ptr: number): Uint8Array {
16594                 if(!isWasmInitialized) {
16595                         throw new Error("initializeWasm() must be awaited first!");
16596                 }
16597                 const nativeResponseValue = wasm.TS_ChannelAnnouncement_get_bitcoin_signature_2(this_ptr);
16598                 return decodeUint8Array(nativeResponseValue);
16599         }
16600         // void ChannelAnnouncement_set_bitcoin_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
16601         export function ChannelAnnouncement_set_bitcoin_signature_2(this_ptr: number, val: Uint8Array): void {
16602                 if(!isWasmInitialized) {
16603                         throw new Error("initializeWasm() must be awaited first!");
16604                 }
16605                 const nativeResponseValue = wasm.TS_ChannelAnnouncement_set_bitcoin_signature_2(this_ptr, encodeUint8Array(val));
16606                 // debug statements here
16607         }
16608         // struct LDKUnsignedChannelAnnouncement ChannelAnnouncement_get_contents(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
16609         export function ChannelAnnouncement_get_contents(this_ptr: number): number {
16610                 if(!isWasmInitialized) {
16611                         throw new Error("initializeWasm() must be awaited first!");
16612                 }
16613                 const nativeResponseValue = wasm.TS_ChannelAnnouncement_get_contents(this_ptr);
16614                 return nativeResponseValue;
16615         }
16616         // void ChannelAnnouncement_set_contents(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedChannelAnnouncement val);
16617         export function ChannelAnnouncement_set_contents(this_ptr: number, val: number): void {
16618                 if(!isWasmInitialized) {
16619                         throw new Error("initializeWasm() must be awaited first!");
16620                 }
16621                 const nativeResponseValue = wasm.TS_ChannelAnnouncement_set_contents(this_ptr, val);
16622                 // debug statements here
16623         }
16624         // 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);
16625         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 {
16626                 if(!isWasmInitialized) {
16627                         throw new Error("initializeWasm() must be awaited first!");
16628                 }
16629                 const nativeResponseValue = wasm.TS_ChannelAnnouncement_new(encodeUint8Array(node_signature_1_arg), encodeUint8Array(node_signature_2_arg), encodeUint8Array(bitcoin_signature_1_arg), encodeUint8Array(bitcoin_signature_2_arg), contents_arg);
16630                 return nativeResponseValue;
16631         }
16632         // uint64_t ChannelAnnouncement_clone_ptr(LDKChannelAnnouncement *NONNULL_PTR arg);
16633         export function ChannelAnnouncement_clone_ptr(arg: number): number {
16634                 if(!isWasmInitialized) {
16635                         throw new Error("initializeWasm() must be awaited first!");
16636                 }
16637                 const nativeResponseValue = wasm.TS_ChannelAnnouncement_clone_ptr(arg);
16638                 return nativeResponseValue;
16639         }
16640         // struct LDKChannelAnnouncement ChannelAnnouncement_clone(const struct LDKChannelAnnouncement *NONNULL_PTR orig);
16641         export function ChannelAnnouncement_clone(orig: number): number {
16642                 if(!isWasmInitialized) {
16643                         throw new Error("initializeWasm() must be awaited first!");
16644                 }
16645                 const nativeResponseValue = wasm.TS_ChannelAnnouncement_clone(orig);
16646                 return nativeResponseValue;
16647         }
16648         // void UnsignedChannelUpdate_free(struct LDKUnsignedChannelUpdate this_obj);
16649         export function UnsignedChannelUpdate_free(this_obj: number): void {
16650                 if(!isWasmInitialized) {
16651                         throw new Error("initializeWasm() must be awaited first!");
16652                 }
16653                 const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_free(this_obj);
16654                 // debug statements here
16655         }
16656         // const uint8_t (*UnsignedChannelUpdate_get_chain_hash(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr))[32];
16657         export function UnsignedChannelUpdate_get_chain_hash(this_ptr: number): Uint8Array {
16658                 if(!isWasmInitialized) {
16659                         throw new Error("initializeWasm() must be awaited first!");
16660                 }
16661                 const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_get_chain_hash(this_ptr);
16662                 return decodeUint8Array(nativeResponseValue);
16663         }
16664         // void UnsignedChannelUpdate_set_chain_hash(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
16665         export function UnsignedChannelUpdate_set_chain_hash(this_ptr: number, val: Uint8Array): void {
16666                 if(!isWasmInitialized) {
16667                         throw new Error("initializeWasm() must be awaited first!");
16668                 }
16669                 const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_set_chain_hash(this_ptr, encodeUint8Array(val));
16670                 // debug statements here
16671         }
16672         // uint64_t UnsignedChannelUpdate_get_short_channel_id(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
16673         export function UnsignedChannelUpdate_get_short_channel_id(this_ptr: number): number {
16674                 if(!isWasmInitialized) {
16675                         throw new Error("initializeWasm() must be awaited first!");
16676                 }
16677                 const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_get_short_channel_id(this_ptr);
16678                 return nativeResponseValue;
16679         }
16680         // void UnsignedChannelUpdate_set_short_channel_id(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
16681         export function UnsignedChannelUpdate_set_short_channel_id(this_ptr: number, val: number): void {
16682                 if(!isWasmInitialized) {
16683                         throw new Error("initializeWasm() must be awaited first!");
16684                 }
16685                 const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_set_short_channel_id(this_ptr, val);
16686                 // debug statements here
16687         }
16688         // uint32_t UnsignedChannelUpdate_get_timestamp(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
16689         export function UnsignedChannelUpdate_get_timestamp(this_ptr: number): number {
16690                 if(!isWasmInitialized) {
16691                         throw new Error("initializeWasm() must be awaited first!");
16692                 }
16693                 const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_get_timestamp(this_ptr);
16694                 return nativeResponseValue;
16695         }
16696         // void UnsignedChannelUpdate_set_timestamp(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
16697         export function UnsignedChannelUpdate_set_timestamp(this_ptr: number, val: number): void {
16698                 if(!isWasmInitialized) {
16699                         throw new Error("initializeWasm() must be awaited first!");
16700                 }
16701                 const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_set_timestamp(this_ptr, val);
16702                 // debug statements here
16703         }
16704         // uint8_t UnsignedChannelUpdate_get_flags(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
16705         export function UnsignedChannelUpdate_get_flags(this_ptr: number): number {
16706                 if(!isWasmInitialized) {
16707                         throw new Error("initializeWasm() must be awaited first!");
16708                 }
16709                 const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_get_flags(this_ptr);
16710                 return nativeResponseValue;
16711         }
16712         // void UnsignedChannelUpdate_set_flags(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint8_t val);
16713         export function UnsignedChannelUpdate_set_flags(this_ptr: number, val: number): void {
16714                 if(!isWasmInitialized) {
16715                         throw new Error("initializeWasm() must be awaited first!");
16716                 }
16717                 const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_set_flags(this_ptr, val);
16718                 // debug statements here
16719         }
16720         // uint16_t UnsignedChannelUpdate_get_cltv_expiry_delta(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
16721         export function UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr: number): number {
16722                 if(!isWasmInitialized) {
16723                         throw new Error("initializeWasm() must be awaited first!");
16724                 }
16725                 const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr);
16726                 return nativeResponseValue;
16727         }
16728         // void UnsignedChannelUpdate_set_cltv_expiry_delta(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint16_t val);
16729         export function UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr: number, val: number): void {
16730                 if(!isWasmInitialized) {
16731                         throw new Error("initializeWasm() must be awaited first!");
16732                 }
16733                 const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr, val);
16734                 // debug statements here
16735         }
16736         // uint64_t UnsignedChannelUpdate_get_htlc_minimum_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
16737         export function UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr: number): number {
16738                 if(!isWasmInitialized) {
16739                         throw new Error("initializeWasm() must be awaited first!");
16740                 }
16741                 const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr);
16742                 return nativeResponseValue;
16743         }
16744         // void UnsignedChannelUpdate_set_htlc_minimum_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
16745         export function UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr: number, val: number): void {
16746                 if(!isWasmInitialized) {
16747                         throw new Error("initializeWasm() must be awaited first!");
16748                 }
16749                 const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr, val);
16750                 // debug statements here
16751         }
16752         // uint32_t UnsignedChannelUpdate_get_fee_base_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
16753         export function UnsignedChannelUpdate_get_fee_base_msat(this_ptr: number): number {
16754                 if(!isWasmInitialized) {
16755                         throw new Error("initializeWasm() must be awaited first!");
16756                 }
16757                 const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_get_fee_base_msat(this_ptr);
16758                 return nativeResponseValue;
16759         }
16760         // void UnsignedChannelUpdate_set_fee_base_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
16761         export function UnsignedChannelUpdate_set_fee_base_msat(this_ptr: number, val: number): void {
16762                 if(!isWasmInitialized) {
16763                         throw new Error("initializeWasm() must be awaited first!");
16764                 }
16765                 const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_set_fee_base_msat(this_ptr, val);
16766                 // debug statements here
16767         }
16768         // uint32_t UnsignedChannelUpdate_get_fee_proportional_millionths(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
16769         export function UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr: number): number {
16770                 if(!isWasmInitialized) {
16771                         throw new Error("initializeWasm() must be awaited first!");
16772                 }
16773                 const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr);
16774                 return nativeResponseValue;
16775         }
16776         // void UnsignedChannelUpdate_set_fee_proportional_millionths(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
16777         export function UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr: number, val: number): void {
16778                 if(!isWasmInitialized) {
16779                         throw new Error("initializeWasm() must be awaited first!");
16780                 }
16781                 const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr, val);
16782                 // debug statements here
16783         }
16784         // uint64_t UnsignedChannelUpdate_clone_ptr(LDKUnsignedChannelUpdate *NONNULL_PTR arg);
16785         export function UnsignedChannelUpdate_clone_ptr(arg: number): number {
16786                 if(!isWasmInitialized) {
16787                         throw new Error("initializeWasm() must be awaited first!");
16788                 }
16789                 const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_clone_ptr(arg);
16790                 return nativeResponseValue;
16791         }
16792         // struct LDKUnsignedChannelUpdate UnsignedChannelUpdate_clone(const struct LDKUnsignedChannelUpdate *NONNULL_PTR orig);
16793         export function UnsignedChannelUpdate_clone(orig: number): number {
16794                 if(!isWasmInitialized) {
16795                         throw new Error("initializeWasm() must be awaited first!");
16796                 }
16797                 const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_clone(orig);
16798                 return nativeResponseValue;
16799         }
16800         // void ChannelUpdate_free(struct LDKChannelUpdate this_obj);
16801         export function ChannelUpdate_free(this_obj: number): void {
16802                 if(!isWasmInitialized) {
16803                         throw new Error("initializeWasm() must be awaited first!");
16804                 }
16805                 const nativeResponseValue = wasm.TS_ChannelUpdate_free(this_obj);
16806                 // debug statements here
16807         }
16808         // struct LDKSignature ChannelUpdate_get_signature(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
16809         export function ChannelUpdate_get_signature(this_ptr: number): Uint8Array {
16810                 if(!isWasmInitialized) {
16811                         throw new Error("initializeWasm() must be awaited first!");
16812                 }
16813                 const nativeResponseValue = wasm.TS_ChannelUpdate_get_signature(this_ptr);
16814                 return decodeUint8Array(nativeResponseValue);
16815         }
16816         // void ChannelUpdate_set_signature(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKSignature val);
16817         export function ChannelUpdate_set_signature(this_ptr: number, val: Uint8Array): void {
16818                 if(!isWasmInitialized) {
16819                         throw new Error("initializeWasm() must be awaited first!");
16820                 }
16821                 const nativeResponseValue = wasm.TS_ChannelUpdate_set_signature(this_ptr, encodeUint8Array(val));
16822                 // debug statements here
16823         }
16824         // struct LDKUnsignedChannelUpdate ChannelUpdate_get_contents(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
16825         export function ChannelUpdate_get_contents(this_ptr: number): number {
16826                 if(!isWasmInitialized) {
16827                         throw new Error("initializeWasm() must be awaited first!");
16828                 }
16829                 const nativeResponseValue = wasm.TS_ChannelUpdate_get_contents(this_ptr);
16830                 return nativeResponseValue;
16831         }
16832         // void ChannelUpdate_set_contents(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKUnsignedChannelUpdate val);
16833         export function ChannelUpdate_set_contents(this_ptr: number, val: number): void {
16834                 if(!isWasmInitialized) {
16835                         throw new Error("initializeWasm() must be awaited first!");
16836                 }
16837                 const nativeResponseValue = wasm.TS_ChannelUpdate_set_contents(this_ptr, val);
16838                 // debug statements here
16839         }
16840         // MUST_USE_RES struct LDKChannelUpdate ChannelUpdate_new(struct LDKSignature signature_arg, struct LDKUnsignedChannelUpdate contents_arg);
16841         export function ChannelUpdate_new(signature_arg: Uint8Array, contents_arg: number): number {
16842                 if(!isWasmInitialized) {
16843                         throw new Error("initializeWasm() must be awaited first!");
16844                 }
16845                 const nativeResponseValue = wasm.TS_ChannelUpdate_new(encodeUint8Array(signature_arg), contents_arg);
16846                 return nativeResponseValue;
16847         }
16848         // uint64_t ChannelUpdate_clone_ptr(LDKChannelUpdate *NONNULL_PTR arg);
16849         export function ChannelUpdate_clone_ptr(arg: number): number {
16850                 if(!isWasmInitialized) {
16851                         throw new Error("initializeWasm() must be awaited first!");
16852                 }
16853                 const nativeResponseValue = wasm.TS_ChannelUpdate_clone_ptr(arg);
16854                 return nativeResponseValue;
16855         }
16856         // struct LDKChannelUpdate ChannelUpdate_clone(const struct LDKChannelUpdate *NONNULL_PTR orig);
16857         export function ChannelUpdate_clone(orig: number): number {
16858                 if(!isWasmInitialized) {
16859                         throw new Error("initializeWasm() must be awaited first!");
16860                 }
16861                 const nativeResponseValue = wasm.TS_ChannelUpdate_clone(orig);
16862                 return nativeResponseValue;
16863         }
16864         // void QueryChannelRange_free(struct LDKQueryChannelRange this_obj);
16865         export function QueryChannelRange_free(this_obj: number): void {
16866                 if(!isWasmInitialized) {
16867                         throw new Error("initializeWasm() must be awaited first!");
16868                 }
16869                 const nativeResponseValue = wasm.TS_QueryChannelRange_free(this_obj);
16870                 // debug statements here
16871         }
16872         // const uint8_t (*QueryChannelRange_get_chain_hash(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr))[32];
16873         export function QueryChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
16874                 if(!isWasmInitialized) {
16875                         throw new Error("initializeWasm() must be awaited first!");
16876                 }
16877                 const nativeResponseValue = wasm.TS_QueryChannelRange_get_chain_hash(this_ptr);
16878                 return decodeUint8Array(nativeResponseValue);
16879         }
16880         // void QueryChannelRange_set_chain_hash(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
16881         export function QueryChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
16882                 if(!isWasmInitialized) {
16883                         throw new Error("initializeWasm() must be awaited first!");
16884                 }
16885                 const nativeResponseValue = wasm.TS_QueryChannelRange_set_chain_hash(this_ptr, encodeUint8Array(val));
16886                 // debug statements here
16887         }
16888         // uint32_t QueryChannelRange_get_first_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
16889         export function QueryChannelRange_get_first_blocknum(this_ptr: number): number {
16890                 if(!isWasmInitialized) {
16891                         throw new Error("initializeWasm() must be awaited first!");
16892                 }
16893                 const nativeResponseValue = wasm.TS_QueryChannelRange_get_first_blocknum(this_ptr);
16894                 return nativeResponseValue;
16895         }
16896         // void QueryChannelRange_set_first_blocknum(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
16897         export function QueryChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
16898                 if(!isWasmInitialized) {
16899                         throw new Error("initializeWasm() must be awaited first!");
16900                 }
16901                 const nativeResponseValue = wasm.TS_QueryChannelRange_set_first_blocknum(this_ptr, val);
16902                 // debug statements here
16903         }
16904         // uint32_t QueryChannelRange_get_number_of_blocks(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
16905         export function QueryChannelRange_get_number_of_blocks(this_ptr: number): number {
16906                 if(!isWasmInitialized) {
16907                         throw new Error("initializeWasm() must be awaited first!");
16908                 }
16909                 const nativeResponseValue = wasm.TS_QueryChannelRange_get_number_of_blocks(this_ptr);
16910                 return nativeResponseValue;
16911         }
16912         // void QueryChannelRange_set_number_of_blocks(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
16913         export function QueryChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
16914                 if(!isWasmInitialized) {
16915                         throw new Error("initializeWasm() must be awaited first!");
16916                 }
16917                 const nativeResponseValue = wasm.TS_QueryChannelRange_set_number_of_blocks(this_ptr, val);
16918                 // debug statements here
16919         }
16920         // MUST_USE_RES struct LDKQueryChannelRange QueryChannelRange_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg);
16921         export function QueryChannelRange_new(chain_hash_arg: Uint8Array, first_blocknum_arg: number, number_of_blocks_arg: number): number {
16922                 if(!isWasmInitialized) {
16923                         throw new Error("initializeWasm() must be awaited first!");
16924                 }
16925                 const nativeResponseValue = wasm.TS_QueryChannelRange_new(encodeUint8Array(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg);
16926                 return nativeResponseValue;
16927         }
16928         // uint64_t QueryChannelRange_clone_ptr(LDKQueryChannelRange *NONNULL_PTR arg);
16929         export function QueryChannelRange_clone_ptr(arg: number): number {
16930                 if(!isWasmInitialized) {
16931                         throw new Error("initializeWasm() must be awaited first!");
16932                 }
16933                 const nativeResponseValue = wasm.TS_QueryChannelRange_clone_ptr(arg);
16934                 return nativeResponseValue;
16935         }
16936         // struct LDKQueryChannelRange QueryChannelRange_clone(const struct LDKQueryChannelRange *NONNULL_PTR orig);
16937         export function QueryChannelRange_clone(orig: number): number {
16938                 if(!isWasmInitialized) {
16939                         throw new Error("initializeWasm() must be awaited first!");
16940                 }
16941                 const nativeResponseValue = wasm.TS_QueryChannelRange_clone(orig);
16942                 return nativeResponseValue;
16943         }
16944         // void ReplyChannelRange_free(struct LDKReplyChannelRange this_obj);
16945         export function ReplyChannelRange_free(this_obj: number): void {
16946                 if(!isWasmInitialized) {
16947                         throw new Error("initializeWasm() must be awaited first!");
16948                 }
16949                 const nativeResponseValue = wasm.TS_ReplyChannelRange_free(this_obj);
16950                 // debug statements here
16951         }
16952         // const uint8_t (*ReplyChannelRange_get_chain_hash(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr))[32];
16953         export function ReplyChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
16954                 if(!isWasmInitialized) {
16955                         throw new Error("initializeWasm() must be awaited first!");
16956                 }
16957                 const nativeResponseValue = wasm.TS_ReplyChannelRange_get_chain_hash(this_ptr);
16958                 return decodeUint8Array(nativeResponseValue);
16959         }
16960         // void ReplyChannelRange_set_chain_hash(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
16961         export function ReplyChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
16962                 if(!isWasmInitialized) {
16963                         throw new Error("initializeWasm() must be awaited first!");
16964                 }
16965                 const nativeResponseValue = wasm.TS_ReplyChannelRange_set_chain_hash(this_ptr, encodeUint8Array(val));
16966                 // debug statements here
16967         }
16968         // uint32_t ReplyChannelRange_get_first_blocknum(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
16969         export function ReplyChannelRange_get_first_blocknum(this_ptr: number): number {
16970                 if(!isWasmInitialized) {
16971                         throw new Error("initializeWasm() must be awaited first!");
16972                 }
16973                 const nativeResponseValue = wasm.TS_ReplyChannelRange_get_first_blocknum(this_ptr);
16974                 return nativeResponseValue;
16975         }
16976         // void ReplyChannelRange_set_first_blocknum(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
16977         export function ReplyChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
16978                 if(!isWasmInitialized) {
16979                         throw new Error("initializeWasm() must be awaited first!");
16980                 }
16981                 const nativeResponseValue = wasm.TS_ReplyChannelRange_set_first_blocknum(this_ptr, val);
16982                 // debug statements here
16983         }
16984         // uint32_t ReplyChannelRange_get_number_of_blocks(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
16985         export function ReplyChannelRange_get_number_of_blocks(this_ptr: number): number {
16986                 if(!isWasmInitialized) {
16987                         throw new Error("initializeWasm() must be awaited first!");
16988                 }
16989                 const nativeResponseValue = wasm.TS_ReplyChannelRange_get_number_of_blocks(this_ptr);
16990                 return nativeResponseValue;
16991         }
16992         // void ReplyChannelRange_set_number_of_blocks(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
16993         export function ReplyChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
16994                 if(!isWasmInitialized) {
16995                         throw new Error("initializeWasm() must be awaited first!");
16996                 }
16997                 const nativeResponseValue = wasm.TS_ReplyChannelRange_set_number_of_blocks(this_ptr, val);
16998                 // debug statements here
16999         }
17000         // bool ReplyChannelRange_get_sync_complete(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
17001         export function ReplyChannelRange_get_sync_complete(this_ptr: number): boolean {
17002                 if(!isWasmInitialized) {
17003                         throw new Error("initializeWasm() must be awaited first!");
17004                 }
17005                 const nativeResponseValue = wasm.TS_ReplyChannelRange_get_sync_complete(this_ptr);
17006                 return nativeResponseValue;
17007         }
17008         // void ReplyChannelRange_set_sync_complete(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, bool val);
17009         export function ReplyChannelRange_set_sync_complete(this_ptr: number, val: boolean): void {
17010                 if(!isWasmInitialized) {
17011                         throw new Error("initializeWasm() must be awaited first!");
17012                 }
17013                 const nativeResponseValue = wasm.TS_ReplyChannelRange_set_sync_complete(this_ptr, val);
17014                 // debug statements here
17015         }
17016         // void ReplyChannelRange_set_short_channel_ids(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
17017         export function ReplyChannelRange_set_short_channel_ids(this_ptr: number, val: number[]): void {
17018                 if(!isWasmInitialized) {
17019                         throw new Error("initializeWasm() must be awaited first!");
17020                 }
17021                 const nativeResponseValue = wasm.TS_ReplyChannelRange_set_short_channel_ids(this_ptr, val);
17022                 // debug statements here
17023         }
17024         // 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);
17025         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 {
17026                 if(!isWasmInitialized) {
17027                         throw new Error("initializeWasm() must be awaited first!");
17028                 }
17029                 const nativeResponseValue = wasm.TS_ReplyChannelRange_new(encodeUint8Array(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg, sync_complete_arg, short_channel_ids_arg);
17030                 return nativeResponseValue;
17031         }
17032         // uint64_t ReplyChannelRange_clone_ptr(LDKReplyChannelRange *NONNULL_PTR arg);
17033         export function ReplyChannelRange_clone_ptr(arg: number): number {
17034                 if(!isWasmInitialized) {
17035                         throw new Error("initializeWasm() must be awaited first!");
17036                 }
17037                 const nativeResponseValue = wasm.TS_ReplyChannelRange_clone_ptr(arg);
17038                 return nativeResponseValue;
17039         }
17040         // struct LDKReplyChannelRange ReplyChannelRange_clone(const struct LDKReplyChannelRange *NONNULL_PTR orig);
17041         export function ReplyChannelRange_clone(orig: number): number {
17042                 if(!isWasmInitialized) {
17043                         throw new Error("initializeWasm() must be awaited first!");
17044                 }
17045                 const nativeResponseValue = wasm.TS_ReplyChannelRange_clone(orig);
17046                 return nativeResponseValue;
17047         }
17048         // void QueryShortChannelIds_free(struct LDKQueryShortChannelIds this_obj);
17049         export function QueryShortChannelIds_free(this_obj: number): void {
17050                 if(!isWasmInitialized) {
17051                         throw new Error("initializeWasm() must be awaited first!");
17052                 }
17053                 const nativeResponseValue = wasm.TS_QueryShortChannelIds_free(this_obj);
17054                 // debug statements here
17055         }
17056         // const uint8_t (*QueryShortChannelIds_get_chain_hash(const struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr))[32];
17057         export function QueryShortChannelIds_get_chain_hash(this_ptr: number): Uint8Array {
17058                 if(!isWasmInitialized) {
17059                         throw new Error("initializeWasm() must be awaited first!");
17060                 }
17061                 const nativeResponseValue = wasm.TS_QueryShortChannelIds_get_chain_hash(this_ptr);
17062                 return decodeUint8Array(nativeResponseValue);
17063         }
17064         // void QueryShortChannelIds_set_chain_hash(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
17065         export function QueryShortChannelIds_set_chain_hash(this_ptr: number, val: Uint8Array): void {
17066                 if(!isWasmInitialized) {
17067                         throw new Error("initializeWasm() must be awaited first!");
17068                 }
17069                 const nativeResponseValue = wasm.TS_QueryShortChannelIds_set_chain_hash(this_ptr, encodeUint8Array(val));
17070                 // debug statements here
17071         }
17072         // void QueryShortChannelIds_set_short_channel_ids(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
17073         export function QueryShortChannelIds_set_short_channel_ids(this_ptr: number, val: number[]): void {
17074                 if(!isWasmInitialized) {
17075                         throw new Error("initializeWasm() must be awaited first!");
17076                 }
17077                 const nativeResponseValue = wasm.TS_QueryShortChannelIds_set_short_channel_ids(this_ptr, val);
17078                 // debug statements here
17079         }
17080         // MUST_USE_RES struct LDKQueryShortChannelIds QueryShortChannelIds_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKCVec_u64Z short_channel_ids_arg);
17081         export function QueryShortChannelIds_new(chain_hash_arg: Uint8Array, short_channel_ids_arg: number[]): number {
17082                 if(!isWasmInitialized) {
17083                         throw new Error("initializeWasm() must be awaited first!");
17084                 }
17085                 const nativeResponseValue = wasm.TS_QueryShortChannelIds_new(encodeUint8Array(chain_hash_arg), short_channel_ids_arg);
17086                 return nativeResponseValue;
17087         }
17088         // uint64_t QueryShortChannelIds_clone_ptr(LDKQueryShortChannelIds *NONNULL_PTR arg);
17089         export function QueryShortChannelIds_clone_ptr(arg: number): number {
17090                 if(!isWasmInitialized) {
17091                         throw new Error("initializeWasm() must be awaited first!");
17092                 }
17093                 const nativeResponseValue = wasm.TS_QueryShortChannelIds_clone_ptr(arg);
17094                 return nativeResponseValue;
17095         }
17096         // struct LDKQueryShortChannelIds QueryShortChannelIds_clone(const struct LDKQueryShortChannelIds *NONNULL_PTR orig);
17097         export function QueryShortChannelIds_clone(orig: number): number {
17098                 if(!isWasmInitialized) {
17099                         throw new Error("initializeWasm() must be awaited first!");
17100                 }
17101                 const nativeResponseValue = wasm.TS_QueryShortChannelIds_clone(orig);
17102                 return nativeResponseValue;
17103         }
17104         // void ReplyShortChannelIdsEnd_free(struct LDKReplyShortChannelIdsEnd this_obj);
17105         export function ReplyShortChannelIdsEnd_free(this_obj: number): void {
17106                 if(!isWasmInitialized) {
17107                         throw new Error("initializeWasm() must be awaited first!");
17108                 }
17109                 const nativeResponseValue = wasm.TS_ReplyShortChannelIdsEnd_free(this_obj);
17110                 // debug statements here
17111         }
17112         // const uint8_t (*ReplyShortChannelIdsEnd_get_chain_hash(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr))[32];
17113         export function ReplyShortChannelIdsEnd_get_chain_hash(this_ptr: number): Uint8Array {
17114                 if(!isWasmInitialized) {
17115                         throw new Error("initializeWasm() must be awaited first!");
17116                 }
17117                 const nativeResponseValue = wasm.TS_ReplyShortChannelIdsEnd_get_chain_hash(this_ptr);
17118                 return decodeUint8Array(nativeResponseValue);
17119         }
17120         // void ReplyShortChannelIdsEnd_set_chain_hash(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
17121         export function ReplyShortChannelIdsEnd_set_chain_hash(this_ptr: number, val: Uint8Array): void {
17122                 if(!isWasmInitialized) {
17123                         throw new Error("initializeWasm() must be awaited first!");
17124                 }
17125                 const nativeResponseValue = wasm.TS_ReplyShortChannelIdsEnd_set_chain_hash(this_ptr, encodeUint8Array(val));
17126                 // debug statements here
17127         }
17128         // bool ReplyShortChannelIdsEnd_get_full_information(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr);
17129         export function ReplyShortChannelIdsEnd_get_full_information(this_ptr: number): boolean {
17130                 if(!isWasmInitialized) {
17131                         throw new Error("initializeWasm() must be awaited first!");
17132                 }
17133                 const nativeResponseValue = wasm.TS_ReplyShortChannelIdsEnd_get_full_information(this_ptr);
17134                 return nativeResponseValue;
17135         }
17136         // void ReplyShortChannelIdsEnd_set_full_information(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, bool val);
17137         export function ReplyShortChannelIdsEnd_set_full_information(this_ptr: number, val: boolean): void {
17138                 if(!isWasmInitialized) {
17139                         throw new Error("initializeWasm() must be awaited first!");
17140                 }
17141                 const nativeResponseValue = wasm.TS_ReplyShortChannelIdsEnd_set_full_information(this_ptr, val);
17142                 // debug statements here
17143         }
17144         // MUST_USE_RES struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_new(struct LDKThirtyTwoBytes chain_hash_arg, bool full_information_arg);
17145         export function ReplyShortChannelIdsEnd_new(chain_hash_arg: Uint8Array, full_information_arg: boolean): number {
17146                 if(!isWasmInitialized) {
17147                         throw new Error("initializeWasm() must be awaited first!");
17148                 }
17149                 const nativeResponseValue = wasm.TS_ReplyShortChannelIdsEnd_new(encodeUint8Array(chain_hash_arg), full_information_arg);
17150                 return nativeResponseValue;
17151         }
17152         // uint64_t ReplyShortChannelIdsEnd_clone_ptr(LDKReplyShortChannelIdsEnd *NONNULL_PTR arg);
17153         export function ReplyShortChannelIdsEnd_clone_ptr(arg: number): number {
17154                 if(!isWasmInitialized) {
17155                         throw new Error("initializeWasm() must be awaited first!");
17156                 }
17157                 const nativeResponseValue = wasm.TS_ReplyShortChannelIdsEnd_clone_ptr(arg);
17158                 return nativeResponseValue;
17159         }
17160         // struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_clone(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR orig);
17161         export function ReplyShortChannelIdsEnd_clone(orig: number): number {
17162                 if(!isWasmInitialized) {
17163                         throw new Error("initializeWasm() must be awaited first!");
17164                 }
17165                 const nativeResponseValue = wasm.TS_ReplyShortChannelIdsEnd_clone(orig);
17166                 return nativeResponseValue;
17167         }
17168         // void GossipTimestampFilter_free(struct LDKGossipTimestampFilter this_obj);
17169         export function GossipTimestampFilter_free(this_obj: number): void {
17170                 if(!isWasmInitialized) {
17171                         throw new Error("initializeWasm() must be awaited first!");
17172                 }
17173                 const nativeResponseValue = wasm.TS_GossipTimestampFilter_free(this_obj);
17174                 // debug statements here
17175         }
17176         // const uint8_t (*GossipTimestampFilter_get_chain_hash(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr))[32];
17177         export function GossipTimestampFilter_get_chain_hash(this_ptr: number): Uint8Array {
17178                 if(!isWasmInitialized) {
17179                         throw new Error("initializeWasm() must be awaited first!");
17180                 }
17181                 const nativeResponseValue = wasm.TS_GossipTimestampFilter_get_chain_hash(this_ptr);
17182                 return decodeUint8Array(nativeResponseValue);
17183         }
17184         // void GossipTimestampFilter_set_chain_hash(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
17185         export function GossipTimestampFilter_set_chain_hash(this_ptr: number, val: Uint8Array): void {
17186                 if(!isWasmInitialized) {
17187                         throw new Error("initializeWasm() must be awaited first!");
17188                 }
17189                 const nativeResponseValue = wasm.TS_GossipTimestampFilter_set_chain_hash(this_ptr, encodeUint8Array(val));
17190                 // debug statements here
17191         }
17192         // uint32_t GossipTimestampFilter_get_first_timestamp(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
17193         export function GossipTimestampFilter_get_first_timestamp(this_ptr: number): number {
17194                 if(!isWasmInitialized) {
17195                         throw new Error("initializeWasm() must be awaited first!");
17196                 }
17197                 const nativeResponseValue = wasm.TS_GossipTimestampFilter_get_first_timestamp(this_ptr);
17198                 return nativeResponseValue;
17199         }
17200         // void GossipTimestampFilter_set_first_timestamp(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
17201         export function GossipTimestampFilter_set_first_timestamp(this_ptr: number, val: number): void {
17202                 if(!isWasmInitialized) {
17203                         throw new Error("initializeWasm() must be awaited first!");
17204                 }
17205                 const nativeResponseValue = wasm.TS_GossipTimestampFilter_set_first_timestamp(this_ptr, val);
17206                 // debug statements here
17207         }
17208         // uint32_t GossipTimestampFilter_get_timestamp_range(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
17209         export function GossipTimestampFilter_get_timestamp_range(this_ptr: number): number {
17210                 if(!isWasmInitialized) {
17211                         throw new Error("initializeWasm() must be awaited first!");
17212                 }
17213                 const nativeResponseValue = wasm.TS_GossipTimestampFilter_get_timestamp_range(this_ptr);
17214                 return nativeResponseValue;
17215         }
17216         // void GossipTimestampFilter_set_timestamp_range(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
17217         export function GossipTimestampFilter_set_timestamp_range(this_ptr: number, val: number): void {
17218                 if(!isWasmInitialized) {
17219                         throw new Error("initializeWasm() must be awaited first!");
17220                 }
17221                 const nativeResponseValue = wasm.TS_GossipTimestampFilter_set_timestamp_range(this_ptr, val);
17222                 // debug statements here
17223         }
17224         // MUST_USE_RES struct LDKGossipTimestampFilter GossipTimestampFilter_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_timestamp_arg, uint32_t timestamp_range_arg);
17225         export function GossipTimestampFilter_new(chain_hash_arg: Uint8Array, first_timestamp_arg: number, timestamp_range_arg: number): number {
17226                 if(!isWasmInitialized) {
17227                         throw new Error("initializeWasm() must be awaited first!");
17228                 }
17229                 const nativeResponseValue = wasm.TS_GossipTimestampFilter_new(encodeUint8Array(chain_hash_arg), first_timestamp_arg, timestamp_range_arg);
17230                 return nativeResponseValue;
17231         }
17232         // uint64_t GossipTimestampFilter_clone_ptr(LDKGossipTimestampFilter *NONNULL_PTR arg);
17233         export function GossipTimestampFilter_clone_ptr(arg: number): number {
17234                 if(!isWasmInitialized) {
17235                         throw new Error("initializeWasm() must be awaited first!");
17236                 }
17237                 const nativeResponseValue = wasm.TS_GossipTimestampFilter_clone_ptr(arg);
17238                 return nativeResponseValue;
17239         }
17240         // struct LDKGossipTimestampFilter GossipTimestampFilter_clone(const struct LDKGossipTimestampFilter *NONNULL_PTR orig);
17241         export function GossipTimestampFilter_clone(orig: number): number {
17242                 if(!isWasmInitialized) {
17243                         throw new Error("initializeWasm() must be awaited first!");
17244                 }
17245                 const nativeResponseValue = wasm.TS_GossipTimestampFilter_clone(orig);
17246                 return nativeResponseValue;
17247         }
17248         // void ErrorAction_free(struct LDKErrorAction this_ptr);
17249         export function ErrorAction_free(this_ptr: number): void {
17250                 if(!isWasmInitialized) {
17251                         throw new Error("initializeWasm() must be awaited first!");
17252                 }
17253                 const nativeResponseValue = wasm.TS_ErrorAction_free(this_ptr);
17254                 // debug statements here
17255         }
17256         // uint64_t ErrorAction_clone_ptr(LDKErrorAction *NONNULL_PTR arg);
17257         export function ErrorAction_clone_ptr(arg: number): number {
17258                 if(!isWasmInitialized) {
17259                         throw new Error("initializeWasm() must be awaited first!");
17260                 }
17261                 const nativeResponseValue = wasm.TS_ErrorAction_clone_ptr(arg);
17262                 return nativeResponseValue;
17263         }
17264         // struct LDKErrorAction ErrorAction_clone(const struct LDKErrorAction *NONNULL_PTR orig);
17265         export function ErrorAction_clone(orig: number): number {
17266                 if(!isWasmInitialized) {
17267                         throw new Error("initializeWasm() must be awaited first!");
17268                 }
17269                 const nativeResponseValue = wasm.TS_ErrorAction_clone(orig);
17270                 return nativeResponseValue;
17271         }
17272         // struct LDKErrorAction ErrorAction_disconnect_peer(struct LDKErrorMessage msg);
17273         export function ErrorAction_disconnect_peer(msg: number): number {
17274                 if(!isWasmInitialized) {
17275                         throw new Error("initializeWasm() must be awaited first!");
17276                 }
17277                 const nativeResponseValue = wasm.TS_ErrorAction_disconnect_peer(msg);
17278                 return nativeResponseValue;
17279         }
17280         // struct LDKErrorAction ErrorAction_ignore_error(void);
17281         export function ErrorAction_ignore_error(): number {
17282                 if(!isWasmInitialized) {
17283                         throw new Error("initializeWasm() must be awaited first!");
17284                 }
17285                 const nativeResponseValue = wasm.TS_ErrorAction_ignore_error();
17286                 return nativeResponseValue;
17287         }
17288         // struct LDKErrorAction ErrorAction_ignore_and_log(enum LDKLevel a);
17289         export function ErrorAction_ignore_and_log(a: Level): number {
17290                 if(!isWasmInitialized) {
17291                         throw new Error("initializeWasm() must be awaited first!");
17292                 }
17293                 const nativeResponseValue = wasm.TS_ErrorAction_ignore_and_log(a);
17294                 return nativeResponseValue;
17295         }
17296         // struct LDKErrorAction ErrorAction_ignore_duplicate_gossip(void);
17297         export function ErrorAction_ignore_duplicate_gossip(): number {
17298                 if(!isWasmInitialized) {
17299                         throw new Error("initializeWasm() must be awaited first!");
17300                 }
17301                 const nativeResponseValue = wasm.TS_ErrorAction_ignore_duplicate_gossip();
17302                 return nativeResponseValue;
17303         }
17304         // struct LDKErrorAction ErrorAction_send_error_message(struct LDKErrorMessage msg);
17305         export function ErrorAction_send_error_message(msg: number): number {
17306                 if(!isWasmInitialized) {
17307                         throw new Error("initializeWasm() must be awaited first!");
17308                 }
17309                 const nativeResponseValue = wasm.TS_ErrorAction_send_error_message(msg);
17310                 return nativeResponseValue;
17311         }
17312         // void LightningError_free(struct LDKLightningError this_obj);
17313         export function LightningError_free(this_obj: number): void {
17314                 if(!isWasmInitialized) {
17315                         throw new Error("initializeWasm() must be awaited first!");
17316                 }
17317                 const nativeResponseValue = wasm.TS_LightningError_free(this_obj);
17318                 // debug statements here
17319         }
17320         // struct LDKStr LightningError_get_err(const struct LDKLightningError *NONNULL_PTR this_ptr);
17321         export function LightningError_get_err(this_ptr: number): String {
17322                 if(!isWasmInitialized) {
17323                         throw new Error("initializeWasm() must be awaited first!");
17324                 }
17325                 const nativeResponseValue = wasm.TS_LightningError_get_err(this_ptr);
17326                 return nativeResponseValue;
17327         }
17328         // void LightningError_set_err(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKStr val);
17329         export function LightningError_set_err(this_ptr: number, val: String): void {
17330                 if(!isWasmInitialized) {
17331                         throw new Error("initializeWasm() must be awaited first!");
17332                 }
17333                 const nativeResponseValue = wasm.TS_LightningError_set_err(this_ptr, val);
17334                 // debug statements here
17335         }
17336         // struct LDKErrorAction LightningError_get_action(const struct LDKLightningError *NONNULL_PTR this_ptr);
17337         export function LightningError_get_action(this_ptr: number): number {
17338                 if(!isWasmInitialized) {
17339                         throw new Error("initializeWasm() must be awaited first!");
17340                 }
17341                 const nativeResponseValue = wasm.TS_LightningError_get_action(this_ptr);
17342                 return nativeResponseValue;
17343         }
17344         // void LightningError_set_action(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKErrorAction val);
17345         export function LightningError_set_action(this_ptr: number, val: number): void {
17346                 if(!isWasmInitialized) {
17347                         throw new Error("initializeWasm() must be awaited first!");
17348                 }
17349                 const nativeResponseValue = wasm.TS_LightningError_set_action(this_ptr, val);
17350                 // debug statements here
17351         }
17352         // MUST_USE_RES struct LDKLightningError LightningError_new(struct LDKStr err_arg, struct LDKErrorAction action_arg);
17353         export function LightningError_new(err_arg: String, action_arg: number): number {
17354                 if(!isWasmInitialized) {
17355                         throw new Error("initializeWasm() must be awaited first!");
17356                 }
17357                 const nativeResponseValue = wasm.TS_LightningError_new(err_arg, action_arg);
17358                 return nativeResponseValue;
17359         }
17360         // uint64_t LightningError_clone_ptr(LDKLightningError *NONNULL_PTR arg);
17361         export function LightningError_clone_ptr(arg: number): number {
17362                 if(!isWasmInitialized) {
17363                         throw new Error("initializeWasm() must be awaited first!");
17364                 }
17365                 const nativeResponseValue = wasm.TS_LightningError_clone_ptr(arg);
17366                 return nativeResponseValue;
17367         }
17368         // struct LDKLightningError LightningError_clone(const struct LDKLightningError *NONNULL_PTR orig);
17369         export function LightningError_clone(orig: number): number {
17370                 if(!isWasmInitialized) {
17371                         throw new Error("initializeWasm() must be awaited first!");
17372                 }
17373                 const nativeResponseValue = wasm.TS_LightningError_clone(orig);
17374                 return nativeResponseValue;
17375         }
17376         // void CommitmentUpdate_free(struct LDKCommitmentUpdate this_obj);
17377         export function CommitmentUpdate_free(this_obj: number): void {
17378                 if(!isWasmInitialized) {
17379                         throw new Error("initializeWasm() must be awaited first!");
17380                 }
17381                 const nativeResponseValue = wasm.TS_CommitmentUpdate_free(this_obj);
17382                 // debug statements here
17383         }
17384         // struct LDKCVec_UpdateAddHTLCZ CommitmentUpdate_get_update_add_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
17385         export function CommitmentUpdate_get_update_add_htlcs(this_ptr: number): number[] {
17386                 if(!isWasmInitialized) {
17387                         throw new Error("initializeWasm() must be awaited first!");
17388                 }
17389                 const nativeResponseValue = wasm.TS_CommitmentUpdate_get_update_add_htlcs(this_ptr);
17390                 return nativeResponseValue;
17391         }
17392         // void CommitmentUpdate_set_update_add_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateAddHTLCZ val);
17393         export function CommitmentUpdate_set_update_add_htlcs(this_ptr: number, val: number[]): void {
17394                 if(!isWasmInitialized) {
17395                         throw new Error("initializeWasm() must be awaited first!");
17396                 }
17397                 const nativeResponseValue = wasm.TS_CommitmentUpdate_set_update_add_htlcs(this_ptr, val);
17398                 // debug statements here
17399         }
17400         // struct LDKCVec_UpdateFulfillHTLCZ CommitmentUpdate_get_update_fulfill_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
17401         export function CommitmentUpdate_get_update_fulfill_htlcs(this_ptr: number): number[] {
17402                 if(!isWasmInitialized) {
17403                         throw new Error("initializeWasm() must be awaited first!");
17404                 }
17405                 const nativeResponseValue = wasm.TS_CommitmentUpdate_get_update_fulfill_htlcs(this_ptr);
17406                 return nativeResponseValue;
17407         }
17408         // void CommitmentUpdate_set_update_fulfill_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFulfillHTLCZ val);
17409         export function CommitmentUpdate_set_update_fulfill_htlcs(this_ptr: number, val: number[]): void {
17410                 if(!isWasmInitialized) {
17411                         throw new Error("initializeWasm() must be awaited first!");
17412                 }
17413                 const nativeResponseValue = wasm.TS_CommitmentUpdate_set_update_fulfill_htlcs(this_ptr, val);
17414                 // debug statements here
17415         }
17416         // struct LDKCVec_UpdateFailHTLCZ CommitmentUpdate_get_update_fail_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
17417         export function CommitmentUpdate_get_update_fail_htlcs(this_ptr: number): number[] {
17418                 if(!isWasmInitialized) {
17419                         throw new Error("initializeWasm() must be awaited first!");
17420                 }
17421                 const nativeResponseValue = wasm.TS_CommitmentUpdate_get_update_fail_htlcs(this_ptr);
17422                 return nativeResponseValue;
17423         }
17424         // void CommitmentUpdate_set_update_fail_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailHTLCZ val);
17425         export function CommitmentUpdate_set_update_fail_htlcs(this_ptr: number, val: number[]): void {
17426                 if(!isWasmInitialized) {
17427                         throw new Error("initializeWasm() must be awaited first!");
17428                 }
17429                 const nativeResponseValue = wasm.TS_CommitmentUpdate_set_update_fail_htlcs(this_ptr, val);
17430                 // debug statements here
17431         }
17432         // struct LDKCVec_UpdateFailMalformedHTLCZ CommitmentUpdate_get_update_fail_malformed_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
17433         export function CommitmentUpdate_get_update_fail_malformed_htlcs(this_ptr: number): number[] {
17434                 if(!isWasmInitialized) {
17435                         throw new Error("initializeWasm() must be awaited first!");
17436                 }
17437                 const nativeResponseValue = wasm.TS_CommitmentUpdate_get_update_fail_malformed_htlcs(this_ptr);
17438                 return nativeResponseValue;
17439         }
17440         // void CommitmentUpdate_set_update_fail_malformed_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailMalformedHTLCZ val);
17441         export function CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr: number, val: number[]): void {
17442                 if(!isWasmInitialized) {
17443                         throw new Error("initializeWasm() must be awaited first!");
17444                 }
17445                 const nativeResponseValue = wasm.TS_CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr, val);
17446                 // debug statements here
17447         }
17448         // struct LDKUpdateFee CommitmentUpdate_get_update_fee(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
17449         export function CommitmentUpdate_get_update_fee(this_ptr: number): number {
17450                 if(!isWasmInitialized) {
17451                         throw new Error("initializeWasm() must be awaited first!");
17452                 }
17453                 const nativeResponseValue = wasm.TS_CommitmentUpdate_get_update_fee(this_ptr);
17454                 return nativeResponseValue;
17455         }
17456         // void CommitmentUpdate_set_update_fee(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKUpdateFee val);
17457         export function CommitmentUpdate_set_update_fee(this_ptr: number, val: number): void {
17458                 if(!isWasmInitialized) {
17459                         throw new Error("initializeWasm() must be awaited first!");
17460                 }
17461                 const nativeResponseValue = wasm.TS_CommitmentUpdate_set_update_fee(this_ptr, val);
17462                 // debug statements here
17463         }
17464         // struct LDKCommitmentSigned CommitmentUpdate_get_commitment_signed(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
17465         export function CommitmentUpdate_get_commitment_signed(this_ptr: number): number {
17466                 if(!isWasmInitialized) {
17467                         throw new Error("initializeWasm() must be awaited first!");
17468                 }
17469                 const nativeResponseValue = wasm.TS_CommitmentUpdate_get_commitment_signed(this_ptr);
17470                 return nativeResponseValue;
17471         }
17472         // void CommitmentUpdate_set_commitment_signed(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCommitmentSigned val);
17473         export function CommitmentUpdate_set_commitment_signed(this_ptr: number, val: number): void {
17474                 if(!isWasmInitialized) {
17475                         throw new Error("initializeWasm() must be awaited first!");
17476                 }
17477                 const nativeResponseValue = wasm.TS_CommitmentUpdate_set_commitment_signed(this_ptr, val);
17478                 // debug statements here
17479         }
17480         // 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);
17481         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 {
17482                 if(!isWasmInitialized) {
17483                         throw new Error("initializeWasm() must be awaited first!");
17484                 }
17485                 const nativeResponseValue = wasm.TS_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);
17486                 return nativeResponseValue;
17487         }
17488         // uint64_t CommitmentUpdate_clone_ptr(LDKCommitmentUpdate *NONNULL_PTR arg);
17489         export function CommitmentUpdate_clone_ptr(arg: number): number {
17490                 if(!isWasmInitialized) {
17491                         throw new Error("initializeWasm() must be awaited first!");
17492                 }
17493                 const nativeResponseValue = wasm.TS_CommitmentUpdate_clone_ptr(arg);
17494                 return nativeResponseValue;
17495         }
17496         // struct LDKCommitmentUpdate CommitmentUpdate_clone(const struct LDKCommitmentUpdate *NONNULL_PTR orig);
17497         export function CommitmentUpdate_clone(orig: number): number {
17498                 if(!isWasmInitialized) {
17499                         throw new Error("initializeWasm() must be awaited first!");
17500                 }
17501                 const nativeResponseValue = wasm.TS_CommitmentUpdate_clone(orig);
17502                 return nativeResponseValue;
17503         }
17504         // void ChannelMessageHandler_free(struct LDKChannelMessageHandler this_ptr);
17505         export function ChannelMessageHandler_free(this_ptr: number): void {
17506                 if(!isWasmInitialized) {
17507                         throw new Error("initializeWasm() must be awaited first!");
17508                 }
17509                 const nativeResponseValue = wasm.TS_ChannelMessageHandler_free(this_ptr);
17510                 // debug statements here
17511         }
17512         // void RoutingMessageHandler_free(struct LDKRoutingMessageHandler this_ptr);
17513         export function RoutingMessageHandler_free(this_ptr: number): void {
17514                 if(!isWasmInitialized) {
17515                         throw new Error("initializeWasm() must be awaited first!");
17516                 }
17517                 const nativeResponseValue = wasm.TS_RoutingMessageHandler_free(this_ptr);
17518                 // debug statements here
17519         }
17520         // struct LDKCVec_u8Z AcceptChannel_write(const struct LDKAcceptChannel *NONNULL_PTR obj);
17521         export function AcceptChannel_write(obj: number): Uint8Array {
17522                 if(!isWasmInitialized) {
17523                         throw new Error("initializeWasm() must be awaited first!");
17524                 }
17525                 const nativeResponseValue = wasm.TS_AcceptChannel_write(obj);
17526                 return decodeUint8Array(nativeResponseValue);
17527         }
17528         // struct LDKCResult_AcceptChannelDecodeErrorZ AcceptChannel_read(struct LDKu8slice ser);
17529         export function AcceptChannel_read(ser: Uint8Array): number {
17530                 if(!isWasmInitialized) {
17531                         throw new Error("initializeWasm() must be awaited first!");
17532                 }
17533                 const nativeResponseValue = wasm.TS_AcceptChannel_read(encodeUint8Array(ser));
17534                 return nativeResponseValue;
17535         }
17536         // struct LDKCVec_u8Z AnnouncementSignatures_write(const struct LDKAnnouncementSignatures *NONNULL_PTR obj);
17537         export function AnnouncementSignatures_write(obj: number): Uint8Array {
17538                 if(!isWasmInitialized) {
17539                         throw new Error("initializeWasm() must be awaited first!");
17540                 }
17541                 const nativeResponseValue = wasm.TS_AnnouncementSignatures_write(obj);
17542                 return decodeUint8Array(nativeResponseValue);
17543         }
17544         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ AnnouncementSignatures_read(struct LDKu8slice ser);
17545         export function AnnouncementSignatures_read(ser: Uint8Array): number {
17546                 if(!isWasmInitialized) {
17547                         throw new Error("initializeWasm() must be awaited first!");
17548                 }
17549                 const nativeResponseValue = wasm.TS_AnnouncementSignatures_read(encodeUint8Array(ser));
17550                 return nativeResponseValue;
17551         }
17552         // struct LDKCVec_u8Z ChannelReestablish_write(const struct LDKChannelReestablish *NONNULL_PTR obj);
17553         export function ChannelReestablish_write(obj: number): Uint8Array {
17554                 if(!isWasmInitialized) {
17555                         throw new Error("initializeWasm() must be awaited first!");
17556                 }
17557                 const nativeResponseValue = wasm.TS_ChannelReestablish_write(obj);
17558                 return decodeUint8Array(nativeResponseValue);
17559         }
17560         // struct LDKCResult_ChannelReestablishDecodeErrorZ ChannelReestablish_read(struct LDKu8slice ser);
17561         export function ChannelReestablish_read(ser: Uint8Array): number {
17562                 if(!isWasmInitialized) {
17563                         throw new Error("initializeWasm() must be awaited first!");
17564                 }
17565                 const nativeResponseValue = wasm.TS_ChannelReestablish_read(encodeUint8Array(ser));
17566                 return nativeResponseValue;
17567         }
17568         // struct LDKCVec_u8Z ClosingSigned_write(const struct LDKClosingSigned *NONNULL_PTR obj);
17569         export function ClosingSigned_write(obj: number): Uint8Array {
17570                 if(!isWasmInitialized) {
17571                         throw new Error("initializeWasm() must be awaited first!");
17572                 }
17573                 const nativeResponseValue = wasm.TS_ClosingSigned_write(obj);
17574                 return decodeUint8Array(nativeResponseValue);
17575         }
17576         // struct LDKCResult_ClosingSignedDecodeErrorZ ClosingSigned_read(struct LDKu8slice ser);
17577         export function ClosingSigned_read(ser: Uint8Array): number {
17578                 if(!isWasmInitialized) {
17579                         throw new Error("initializeWasm() must be awaited first!");
17580                 }
17581                 const nativeResponseValue = wasm.TS_ClosingSigned_read(encodeUint8Array(ser));
17582                 return nativeResponseValue;
17583         }
17584         // struct LDKCVec_u8Z ClosingSignedFeeRange_write(const struct LDKClosingSignedFeeRange *NONNULL_PTR obj);
17585         export function ClosingSignedFeeRange_write(obj: number): Uint8Array {
17586                 if(!isWasmInitialized) {
17587                         throw new Error("initializeWasm() must be awaited first!");
17588                 }
17589                 const nativeResponseValue = wasm.TS_ClosingSignedFeeRange_write(obj);
17590                 return decodeUint8Array(nativeResponseValue);
17591         }
17592         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ ClosingSignedFeeRange_read(struct LDKu8slice ser);
17593         export function ClosingSignedFeeRange_read(ser: Uint8Array): number {
17594                 if(!isWasmInitialized) {
17595                         throw new Error("initializeWasm() must be awaited first!");
17596                 }
17597                 const nativeResponseValue = wasm.TS_ClosingSignedFeeRange_read(encodeUint8Array(ser));
17598                 return nativeResponseValue;
17599         }
17600         // struct LDKCVec_u8Z CommitmentSigned_write(const struct LDKCommitmentSigned *NONNULL_PTR obj);
17601         export function CommitmentSigned_write(obj: number): Uint8Array {
17602                 if(!isWasmInitialized) {
17603                         throw new Error("initializeWasm() must be awaited first!");
17604                 }
17605                 const nativeResponseValue = wasm.TS_CommitmentSigned_write(obj);
17606                 return decodeUint8Array(nativeResponseValue);
17607         }
17608         // struct LDKCResult_CommitmentSignedDecodeErrorZ CommitmentSigned_read(struct LDKu8slice ser);
17609         export function CommitmentSigned_read(ser: Uint8Array): number {
17610                 if(!isWasmInitialized) {
17611                         throw new Error("initializeWasm() must be awaited first!");
17612                 }
17613                 const nativeResponseValue = wasm.TS_CommitmentSigned_read(encodeUint8Array(ser));
17614                 return nativeResponseValue;
17615         }
17616         // struct LDKCVec_u8Z FundingCreated_write(const struct LDKFundingCreated *NONNULL_PTR obj);
17617         export function FundingCreated_write(obj: number): Uint8Array {
17618                 if(!isWasmInitialized) {
17619                         throw new Error("initializeWasm() must be awaited first!");
17620                 }
17621                 const nativeResponseValue = wasm.TS_FundingCreated_write(obj);
17622                 return decodeUint8Array(nativeResponseValue);
17623         }
17624         // struct LDKCResult_FundingCreatedDecodeErrorZ FundingCreated_read(struct LDKu8slice ser);
17625         export function FundingCreated_read(ser: Uint8Array): number {
17626                 if(!isWasmInitialized) {
17627                         throw new Error("initializeWasm() must be awaited first!");
17628                 }
17629                 const nativeResponseValue = wasm.TS_FundingCreated_read(encodeUint8Array(ser));
17630                 return nativeResponseValue;
17631         }
17632         // struct LDKCVec_u8Z FundingSigned_write(const struct LDKFundingSigned *NONNULL_PTR obj);
17633         export function FundingSigned_write(obj: number): Uint8Array {
17634                 if(!isWasmInitialized) {
17635                         throw new Error("initializeWasm() must be awaited first!");
17636                 }
17637                 const nativeResponseValue = wasm.TS_FundingSigned_write(obj);
17638                 return decodeUint8Array(nativeResponseValue);
17639         }
17640         // struct LDKCResult_FundingSignedDecodeErrorZ FundingSigned_read(struct LDKu8slice ser);
17641         export function FundingSigned_read(ser: Uint8Array): number {
17642                 if(!isWasmInitialized) {
17643                         throw new Error("initializeWasm() must be awaited first!");
17644                 }
17645                 const nativeResponseValue = wasm.TS_FundingSigned_read(encodeUint8Array(ser));
17646                 return nativeResponseValue;
17647         }
17648         // struct LDKCVec_u8Z FundingLocked_write(const struct LDKFundingLocked *NONNULL_PTR obj);
17649         export function FundingLocked_write(obj: number): Uint8Array {
17650                 if(!isWasmInitialized) {
17651                         throw new Error("initializeWasm() must be awaited first!");
17652                 }
17653                 const nativeResponseValue = wasm.TS_FundingLocked_write(obj);
17654                 return decodeUint8Array(nativeResponseValue);
17655         }
17656         // struct LDKCResult_FundingLockedDecodeErrorZ FundingLocked_read(struct LDKu8slice ser);
17657         export function FundingLocked_read(ser: Uint8Array): number {
17658                 if(!isWasmInitialized) {
17659                         throw new Error("initializeWasm() must be awaited first!");
17660                 }
17661                 const nativeResponseValue = wasm.TS_FundingLocked_read(encodeUint8Array(ser));
17662                 return nativeResponseValue;
17663         }
17664         // struct LDKCVec_u8Z Init_write(const struct LDKInit *NONNULL_PTR obj);
17665         export function Init_write(obj: number): Uint8Array {
17666                 if(!isWasmInitialized) {
17667                         throw new Error("initializeWasm() must be awaited first!");
17668                 }
17669                 const nativeResponseValue = wasm.TS_Init_write(obj);
17670                 return decodeUint8Array(nativeResponseValue);
17671         }
17672         // struct LDKCResult_InitDecodeErrorZ Init_read(struct LDKu8slice ser);
17673         export function Init_read(ser: Uint8Array): number {
17674                 if(!isWasmInitialized) {
17675                         throw new Error("initializeWasm() must be awaited first!");
17676                 }
17677                 const nativeResponseValue = wasm.TS_Init_read(encodeUint8Array(ser));
17678                 return nativeResponseValue;
17679         }
17680         // struct LDKCVec_u8Z OpenChannel_write(const struct LDKOpenChannel *NONNULL_PTR obj);
17681         export function OpenChannel_write(obj: number): Uint8Array {
17682                 if(!isWasmInitialized) {
17683                         throw new Error("initializeWasm() must be awaited first!");
17684                 }
17685                 const nativeResponseValue = wasm.TS_OpenChannel_write(obj);
17686                 return decodeUint8Array(nativeResponseValue);
17687         }
17688         // struct LDKCResult_OpenChannelDecodeErrorZ OpenChannel_read(struct LDKu8slice ser);
17689         export function OpenChannel_read(ser: Uint8Array): number {
17690                 if(!isWasmInitialized) {
17691                         throw new Error("initializeWasm() must be awaited first!");
17692                 }
17693                 const nativeResponseValue = wasm.TS_OpenChannel_read(encodeUint8Array(ser));
17694                 return nativeResponseValue;
17695         }
17696         // struct LDKCVec_u8Z RevokeAndACK_write(const struct LDKRevokeAndACK *NONNULL_PTR obj);
17697         export function RevokeAndACK_write(obj: number): Uint8Array {
17698                 if(!isWasmInitialized) {
17699                         throw new Error("initializeWasm() must be awaited first!");
17700                 }
17701                 const nativeResponseValue = wasm.TS_RevokeAndACK_write(obj);
17702                 return decodeUint8Array(nativeResponseValue);
17703         }
17704         // struct LDKCResult_RevokeAndACKDecodeErrorZ RevokeAndACK_read(struct LDKu8slice ser);
17705         export function RevokeAndACK_read(ser: Uint8Array): number {
17706                 if(!isWasmInitialized) {
17707                         throw new Error("initializeWasm() must be awaited first!");
17708                 }
17709                 const nativeResponseValue = wasm.TS_RevokeAndACK_read(encodeUint8Array(ser));
17710                 return nativeResponseValue;
17711         }
17712         // struct LDKCVec_u8Z Shutdown_write(const struct LDKShutdown *NONNULL_PTR obj);
17713         export function Shutdown_write(obj: number): Uint8Array {
17714                 if(!isWasmInitialized) {
17715                         throw new Error("initializeWasm() must be awaited first!");
17716                 }
17717                 const nativeResponseValue = wasm.TS_Shutdown_write(obj);
17718                 return decodeUint8Array(nativeResponseValue);
17719         }
17720         // struct LDKCResult_ShutdownDecodeErrorZ Shutdown_read(struct LDKu8slice ser);
17721         export function Shutdown_read(ser: Uint8Array): number {
17722                 if(!isWasmInitialized) {
17723                         throw new Error("initializeWasm() must be awaited first!");
17724                 }
17725                 const nativeResponseValue = wasm.TS_Shutdown_read(encodeUint8Array(ser));
17726                 return nativeResponseValue;
17727         }
17728         // struct LDKCVec_u8Z UpdateFailHTLC_write(const struct LDKUpdateFailHTLC *NONNULL_PTR obj);
17729         export function UpdateFailHTLC_write(obj: number): Uint8Array {
17730                 if(!isWasmInitialized) {
17731                         throw new Error("initializeWasm() must be awaited first!");
17732                 }
17733                 const nativeResponseValue = wasm.TS_UpdateFailHTLC_write(obj);
17734                 return decodeUint8Array(nativeResponseValue);
17735         }
17736         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ UpdateFailHTLC_read(struct LDKu8slice ser);
17737         export function UpdateFailHTLC_read(ser: Uint8Array): number {
17738                 if(!isWasmInitialized) {
17739                         throw new Error("initializeWasm() must be awaited first!");
17740                 }
17741                 const nativeResponseValue = wasm.TS_UpdateFailHTLC_read(encodeUint8Array(ser));
17742                 return nativeResponseValue;
17743         }
17744         // struct LDKCVec_u8Z UpdateFailMalformedHTLC_write(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR obj);
17745         export function UpdateFailMalformedHTLC_write(obj: number): Uint8Array {
17746                 if(!isWasmInitialized) {
17747                         throw new Error("initializeWasm() must be awaited first!");
17748                 }
17749                 const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_write(obj);
17750                 return decodeUint8Array(nativeResponseValue);
17751         }
17752         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ UpdateFailMalformedHTLC_read(struct LDKu8slice ser);
17753         export function UpdateFailMalformedHTLC_read(ser: Uint8Array): number {
17754                 if(!isWasmInitialized) {
17755                         throw new Error("initializeWasm() must be awaited first!");
17756                 }
17757                 const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_read(encodeUint8Array(ser));
17758                 return nativeResponseValue;
17759         }
17760         // struct LDKCVec_u8Z UpdateFee_write(const struct LDKUpdateFee *NONNULL_PTR obj);
17761         export function UpdateFee_write(obj: number): Uint8Array {
17762                 if(!isWasmInitialized) {
17763                         throw new Error("initializeWasm() must be awaited first!");
17764                 }
17765                 const nativeResponseValue = wasm.TS_UpdateFee_write(obj);
17766                 return decodeUint8Array(nativeResponseValue);
17767         }
17768         // struct LDKCResult_UpdateFeeDecodeErrorZ UpdateFee_read(struct LDKu8slice ser);
17769         export function UpdateFee_read(ser: Uint8Array): number {
17770                 if(!isWasmInitialized) {
17771                         throw new Error("initializeWasm() must be awaited first!");
17772                 }
17773                 const nativeResponseValue = wasm.TS_UpdateFee_read(encodeUint8Array(ser));
17774                 return nativeResponseValue;
17775         }
17776         // struct LDKCVec_u8Z UpdateFulfillHTLC_write(const struct LDKUpdateFulfillHTLC *NONNULL_PTR obj);
17777         export function UpdateFulfillHTLC_write(obj: number): Uint8Array {
17778                 if(!isWasmInitialized) {
17779                         throw new Error("initializeWasm() must be awaited first!");
17780                 }
17781                 const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_write(obj);
17782                 return decodeUint8Array(nativeResponseValue);
17783         }
17784         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ UpdateFulfillHTLC_read(struct LDKu8slice ser);
17785         export function UpdateFulfillHTLC_read(ser: Uint8Array): number {
17786                 if(!isWasmInitialized) {
17787                         throw new Error("initializeWasm() must be awaited first!");
17788                 }
17789                 const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_read(encodeUint8Array(ser));
17790                 return nativeResponseValue;
17791         }
17792         // struct LDKCVec_u8Z UpdateAddHTLC_write(const struct LDKUpdateAddHTLC *NONNULL_PTR obj);
17793         export function UpdateAddHTLC_write(obj: number): Uint8Array {
17794                 if(!isWasmInitialized) {
17795                         throw new Error("initializeWasm() must be awaited first!");
17796                 }
17797                 const nativeResponseValue = wasm.TS_UpdateAddHTLC_write(obj);
17798                 return decodeUint8Array(nativeResponseValue);
17799         }
17800         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ UpdateAddHTLC_read(struct LDKu8slice ser);
17801         export function UpdateAddHTLC_read(ser: Uint8Array): number {
17802                 if(!isWasmInitialized) {
17803                         throw new Error("initializeWasm() must be awaited first!");
17804                 }
17805                 const nativeResponseValue = wasm.TS_UpdateAddHTLC_read(encodeUint8Array(ser));
17806                 return nativeResponseValue;
17807         }
17808         // struct LDKCVec_u8Z Ping_write(const struct LDKPing *NONNULL_PTR obj);
17809         export function Ping_write(obj: number): Uint8Array {
17810                 if(!isWasmInitialized) {
17811                         throw new Error("initializeWasm() must be awaited first!");
17812                 }
17813                 const nativeResponseValue = wasm.TS_Ping_write(obj);
17814                 return decodeUint8Array(nativeResponseValue);
17815         }
17816         // struct LDKCResult_PingDecodeErrorZ Ping_read(struct LDKu8slice ser);
17817         export function Ping_read(ser: Uint8Array): number {
17818                 if(!isWasmInitialized) {
17819                         throw new Error("initializeWasm() must be awaited first!");
17820                 }
17821                 const nativeResponseValue = wasm.TS_Ping_read(encodeUint8Array(ser));
17822                 return nativeResponseValue;
17823         }
17824         // struct LDKCVec_u8Z Pong_write(const struct LDKPong *NONNULL_PTR obj);
17825         export function Pong_write(obj: number): Uint8Array {
17826                 if(!isWasmInitialized) {
17827                         throw new Error("initializeWasm() must be awaited first!");
17828                 }
17829                 const nativeResponseValue = wasm.TS_Pong_write(obj);
17830                 return decodeUint8Array(nativeResponseValue);
17831         }
17832         // struct LDKCResult_PongDecodeErrorZ Pong_read(struct LDKu8slice ser);
17833         export function Pong_read(ser: Uint8Array): number {
17834                 if(!isWasmInitialized) {
17835                         throw new Error("initializeWasm() must be awaited first!");
17836                 }
17837                 const nativeResponseValue = wasm.TS_Pong_read(encodeUint8Array(ser));
17838                 return nativeResponseValue;
17839         }
17840         // struct LDKCVec_u8Z UnsignedChannelAnnouncement_write(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR obj);
17841         export function UnsignedChannelAnnouncement_write(obj: number): Uint8Array {
17842                 if(!isWasmInitialized) {
17843                         throw new Error("initializeWasm() must be awaited first!");
17844                 }
17845                 const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_write(obj);
17846                 return decodeUint8Array(nativeResponseValue);
17847         }
17848         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ UnsignedChannelAnnouncement_read(struct LDKu8slice ser);
17849         export function UnsignedChannelAnnouncement_read(ser: Uint8Array): number {
17850                 if(!isWasmInitialized) {
17851                         throw new Error("initializeWasm() must be awaited first!");
17852                 }
17853                 const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_read(encodeUint8Array(ser));
17854                 return nativeResponseValue;
17855         }
17856         // struct LDKCVec_u8Z ChannelAnnouncement_write(const struct LDKChannelAnnouncement *NONNULL_PTR obj);
17857         export function ChannelAnnouncement_write(obj: number): Uint8Array {
17858                 if(!isWasmInitialized) {
17859                         throw new Error("initializeWasm() must be awaited first!");
17860                 }
17861                 const nativeResponseValue = wasm.TS_ChannelAnnouncement_write(obj);
17862                 return decodeUint8Array(nativeResponseValue);
17863         }
17864         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ ChannelAnnouncement_read(struct LDKu8slice ser);
17865         export function ChannelAnnouncement_read(ser: Uint8Array): number {
17866                 if(!isWasmInitialized) {
17867                         throw new Error("initializeWasm() must be awaited first!");
17868                 }
17869                 const nativeResponseValue = wasm.TS_ChannelAnnouncement_read(encodeUint8Array(ser));
17870                 return nativeResponseValue;
17871         }
17872         // struct LDKCVec_u8Z UnsignedChannelUpdate_write(const struct LDKUnsignedChannelUpdate *NONNULL_PTR obj);
17873         export function UnsignedChannelUpdate_write(obj: number): Uint8Array {
17874                 if(!isWasmInitialized) {
17875                         throw new Error("initializeWasm() must be awaited first!");
17876                 }
17877                 const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_write(obj);
17878                 return decodeUint8Array(nativeResponseValue);
17879         }
17880         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ UnsignedChannelUpdate_read(struct LDKu8slice ser);
17881         export function UnsignedChannelUpdate_read(ser: Uint8Array): number {
17882                 if(!isWasmInitialized) {
17883                         throw new Error("initializeWasm() must be awaited first!");
17884                 }
17885                 const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_read(encodeUint8Array(ser));
17886                 return nativeResponseValue;
17887         }
17888         // struct LDKCVec_u8Z ChannelUpdate_write(const struct LDKChannelUpdate *NONNULL_PTR obj);
17889         export function ChannelUpdate_write(obj: number): Uint8Array {
17890                 if(!isWasmInitialized) {
17891                         throw new Error("initializeWasm() must be awaited first!");
17892                 }
17893                 const nativeResponseValue = wasm.TS_ChannelUpdate_write(obj);
17894                 return decodeUint8Array(nativeResponseValue);
17895         }
17896         // struct LDKCResult_ChannelUpdateDecodeErrorZ ChannelUpdate_read(struct LDKu8slice ser);
17897         export function ChannelUpdate_read(ser: Uint8Array): number {
17898                 if(!isWasmInitialized) {
17899                         throw new Error("initializeWasm() must be awaited first!");
17900                 }
17901                 const nativeResponseValue = wasm.TS_ChannelUpdate_read(encodeUint8Array(ser));
17902                 return nativeResponseValue;
17903         }
17904         // struct LDKCVec_u8Z ErrorMessage_write(const struct LDKErrorMessage *NONNULL_PTR obj);
17905         export function ErrorMessage_write(obj: number): Uint8Array {
17906                 if(!isWasmInitialized) {
17907                         throw new Error("initializeWasm() must be awaited first!");
17908                 }
17909                 const nativeResponseValue = wasm.TS_ErrorMessage_write(obj);
17910                 return decodeUint8Array(nativeResponseValue);
17911         }
17912         // struct LDKCResult_ErrorMessageDecodeErrorZ ErrorMessage_read(struct LDKu8slice ser);
17913         export function ErrorMessage_read(ser: Uint8Array): number {
17914                 if(!isWasmInitialized) {
17915                         throw new Error("initializeWasm() must be awaited first!");
17916                 }
17917                 const nativeResponseValue = wasm.TS_ErrorMessage_read(encodeUint8Array(ser));
17918                 return nativeResponseValue;
17919         }
17920         // struct LDKCVec_u8Z UnsignedNodeAnnouncement_write(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR obj);
17921         export function UnsignedNodeAnnouncement_write(obj: number): Uint8Array {
17922                 if(!isWasmInitialized) {
17923                         throw new Error("initializeWasm() must be awaited first!");
17924                 }
17925                 const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_write(obj);
17926                 return decodeUint8Array(nativeResponseValue);
17927         }
17928         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ UnsignedNodeAnnouncement_read(struct LDKu8slice ser);
17929         export function UnsignedNodeAnnouncement_read(ser: Uint8Array): number {
17930                 if(!isWasmInitialized) {
17931                         throw new Error("initializeWasm() must be awaited first!");
17932                 }
17933                 const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_read(encodeUint8Array(ser));
17934                 return nativeResponseValue;
17935         }
17936         // struct LDKCVec_u8Z NodeAnnouncement_write(const struct LDKNodeAnnouncement *NONNULL_PTR obj);
17937         export function NodeAnnouncement_write(obj: number): Uint8Array {
17938                 if(!isWasmInitialized) {
17939                         throw new Error("initializeWasm() must be awaited first!");
17940                 }
17941                 const nativeResponseValue = wasm.TS_NodeAnnouncement_write(obj);
17942                 return decodeUint8Array(nativeResponseValue);
17943         }
17944         // struct LDKCResult_NodeAnnouncementDecodeErrorZ NodeAnnouncement_read(struct LDKu8slice ser);
17945         export function NodeAnnouncement_read(ser: Uint8Array): number {
17946                 if(!isWasmInitialized) {
17947                         throw new Error("initializeWasm() must be awaited first!");
17948                 }
17949                 const nativeResponseValue = wasm.TS_NodeAnnouncement_read(encodeUint8Array(ser));
17950                 return nativeResponseValue;
17951         }
17952         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ QueryShortChannelIds_read(struct LDKu8slice ser);
17953         export function QueryShortChannelIds_read(ser: Uint8Array): number {
17954                 if(!isWasmInitialized) {
17955                         throw new Error("initializeWasm() must be awaited first!");
17956                 }
17957                 const nativeResponseValue = wasm.TS_QueryShortChannelIds_read(encodeUint8Array(ser));
17958                 return nativeResponseValue;
17959         }
17960         // struct LDKCVec_u8Z QueryShortChannelIds_write(const struct LDKQueryShortChannelIds *NONNULL_PTR obj);
17961         export function QueryShortChannelIds_write(obj: number): Uint8Array {
17962                 if(!isWasmInitialized) {
17963                         throw new Error("initializeWasm() must be awaited first!");
17964                 }
17965                 const nativeResponseValue = wasm.TS_QueryShortChannelIds_write(obj);
17966                 return decodeUint8Array(nativeResponseValue);
17967         }
17968         // struct LDKCVec_u8Z ReplyShortChannelIdsEnd_write(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR obj);
17969         export function ReplyShortChannelIdsEnd_write(obj: number): Uint8Array {
17970                 if(!isWasmInitialized) {
17971                         throw new Error("initializeWasm() must be awaited first!");
17972                 }
17973                 const nativeResponseValue = wasm.TS_ReplyShortChannelIdsEnd_write(obj);
17974                 return decodeUint8Array(nativeResponseValue);
17975         }
17976         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ ReplyShortChannelIdsEnd_read(struct LDKu8slice ser);
17977         export function ReplyShortChannelIdsEnd_read(ser: Uint8Array): number {
17978                 if(!isWasmInitialized) {
17979                         throw new Error("initializeWasm() must be awaited first!");
17980                 }
17981                 const nativeResponseValue = wasm.TS_ReplyShortChannelIdsEnd_read(encodeUint8Array(ser));
17982                 return nativeResponseValue;
17983         }
17984         // MUST_USE_RES uint32_t QueryChannelRange_end_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_arg);
17985         export function QueryChannelRange_end_blocknum(this_arg: number): number {
17986                 if(!isWasmInitialized) {
17987                         throw new Error("initializeWasm() must be awaited first!");
17988                 }
17989                 const nativeResponseValue = wasm.TS_QueryChannelRange_end_blocknum(this_arg);
17990                 return nativeResponseValue;
17991         }
17992         // struct LDKCVec_u8Z QueryChannelRange_write(const struct LDKQueryChannelRange *NONNULL_PTR obj);
17993         export function QueryChannelRange_write(obj: number): Uint8Array {
17994                 if(!isWasmInitialized) {
17995                         throw new Error("initializeWasm() must be awaited first!");
17996                 }
17997                 const nativeResponseValue = wasm.TS_QueryChannelRange_write(obj);
17998                 return decodeUint8Array(nativeResponseValue);
17999         }
18000         // struct LDKCResult_QueryChannelRangeDecodeErrorZ QueryChannelRange_read(struct LDKu8slice ser);
18001         export function QueryChannelRange_read(ser: Uint8Array): number {
18002                 if(!isWasmInitialized) {
18003                         throw new Error("initializeWasm() must be awaited first!");
18004                 }
18005                 const nativeResponseValue = wasm.TS_QueryChannelRange_read(encodeUint8Array(ser));
18006                 return nativeResponseValue;
18007         }
18008         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ ReplyChannelRange_read(struct LDKu8slice ser);
18009         export function ReplyChannelRange_read(ser: Uint8Array): number {
18010                 if(!isWasmInitialized) {
18011                         throw new Error("initializeWasm() must be awaited first!");
18012                 }
18013                 const nativeResponseValue = wasm.TS_ReplyChannelRange_read(encodeUint8Array(ser));
18014                 return nativeResponseValue;
18015         }
18016         // struct LDKCVec_u8Z ReplyChannelRange_write(const struct LDKReplyChannelRange *NONNULL_PTR obj);
18017         export function ReplyChannelRange_write(obj: number): Uint8Array {
18018                 if(!isWasmInitialized) {
18019                         throw new Error("initializeWasm() must be awaited first!");
18020                 }
18021                 const nativeResponseValue = wasm.TS_ReplyChannelRange_write(obj);
18022                 return decodeUint8Array(nativeResponseValue);
18023         }
18024         // struct LDKCVec_u8Z GossipTimestampFilter_write(const struct LDKGossipTimestampFilter *NONNULL_PTR obj);
18025         export function GossipTimestampFilter_write(obj: number): Uint8Array {
18026                 if(!isWasmInitialized) {
18027                         throw new Error("initializeWasm() must be awaited first!");
18028                 }
18029                 const nativeResponseValue = wasm.TS_GossipTimestampFilter_write(obj);
18030                 return decodeUint8Array(nativeResponseValue);
18031         }
18032         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ GossipTimestampFilter_read(struct LDKu8slice ser);
18033         export function GossipTimestampFilter_read(ser: Uint8Array): number {
18034                 if(!isWasmInitialized) {
18035                         throw new Error("initializeWasm() must be awaited first!");
18036                 }
18037                 const nativeResponseValue = wasm.TS_GossipTimestampFilter_read(encodeUint8Array(ser));
18038                 return nativeResponseValue;
18039         }
18040         // void CustomMessageHandler_free(struct LDKCustomMessageHandler this_ptr);
18041         export function CustomMessageHandler_free(this_ptr: number): void {
18042                 if(!isWasmInitialized) {
18043                         throw new Error("initializeWasm() must be awaited first!");
18044                 }
18045                 const nativeResponseValue = wasm.TS_CustomMessageHandler_free(this_ptr);
18046                 // debug statements here
18047         }
18048         // void IgnoringMessageHandler_free(struct LDKIgnoringMessageHandler this_obj);
18049         export function IgnoringMessageHandler_free(this_obj: number): void {
18050                 if(!isWasmInitialized) {
18051                         throw new Error("initializeWasm() must be awaited first!");
18052                 }
18053                 const nativeResponseValue = wasm.TS_IgnoringMessageHandler_free(this_obj);
18054                 // debug statements here
18055         }
18056         // MUST_USE_RES struct LDKIgnoringMessageHandler IgnoringMessageHandler_new(void);
18057         export function IgnoringMessageHandler_new(): number {
18058                 if(!isWasmInitialized) {
18059                         throw new Error("initializeWasm() must be awaited first!");
18060                 }
18061                 const nativeResponseValue = wasm.TS_IgnoringMessageHandler_new();
18062                 return nativeResponseValue;
18063         }
18064         // struct LDKMessageSendEventsProvider IgnoringMessageHandler_as_MessageSendEventsProvider(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
18065         export function IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
18066                 if(!isWasmInitialized) {
18067                         throw new Error("initializeWasm() must be awaited first!");
18068                 }
18069                 const nativeResponseValue = wasm.TS_IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg);
18070                 return nativeResponseValue;
18071         }
18072         // struct LDKRoutingMessageHandler IgnoringMessageHandler_as_RoutingMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
18073         export function IgnoringMessageHandler_as_RoutingMessageHandler(this_arg: number): number {
18074                 if(!isWasmInitialized) {
18075                         throw new Error("initializeWasm() must be awaited first!");
18076                 }
18077                 const nativeResponseValue = wasm.TS_IgnoringMessageHandler_as_RoutingMessageHandler(this_arg);
18078                 return nativeResponseValue;
18079         }
18080         // struct LDKCustomMessageReader IgnoringMessageHandler_as_CustomMessageReader(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
18081         export function IgnoringMessageHandler_as_CustomMessageReader(this_arg: number): number {
18082                 if(!isWasmInitialized) {
18083                         throw new Error("initializeWasm() must be awaited first!");
18084                 }
18085                 const nativeResponseValue = wasm.TS_IgnoringMessageHandler_as_CustomMessageReader(this_arg);
18086                 return nativeResponseValue;
18087         }
18088         // struct LDKCustomMessageHandler IgnoringMessageHandler_as_CustomMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
18089         export function IgnoringMessageHandler_as_CustomMessageHandler(this_arg: number): number {
18090                 if(!isWasmInitialized) {
18091                         throw new Error("initializeWasm() must be awaited first!");
18092                 }
18093                 const nativeResponseValue = wasm.TS_IgnoringMessageHandler_as_CustomMessageHandler(this_arg);
18094                 return nativeResponseValue;
18095         }
18096         // void ErroringMessageHandler_free(struct LDKErroringMessageHandler this_obj);
18097         export function ErroringMessageHandler_free(this_obj: number): void {
18098                 if(!isWasmInitialized) {
18099                         throw new Error("initializeWasm() must be awaited first!");
18100                 }
18101                 const nativeResponseValue = wasm.TS_ErroringMessageHandler_free(this_obj);
18102                 // debug statements here
18103         }
18104         // MUST_USE_RES struct LDKErroringMessageHandler ErroringMessageHandler_new(void);
18105         export function ErroringMessageHandler_new(): number {
18106                 if(!isWasmInitialized) {
18107                         throw new Error("initializeWasm() must be awaited first!");
18108                 }
18109                 const nativeResponseValue = wasm.TS_ErroringMessageHandler_new();
18110                 return nativeResponseValue;
18111         }
18112         // struct LDKMessageSendEventsProvider ErroringMessageHandler_as_MessageSendEventsProvider(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
18113         export function ErroringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
18114                 if(!isWasmInitialized) {
18115                         throw new Error("initializeWasm() must be awaited first!");
18116                 }
18117                 const nativeResponseValue = wasm.TS_ErroringMessageHandler_as_MessageSendEventsProvider(this_arg);
18118                 return nativeResponseValue;
18119         }
18120         // struct LDKChannelMessageHandler ErroringMessageHandler_as_ChannelMessageHandler(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
18121         export function ErroringMessageHandler_as_ChannelMessageHandler(this_arg: number): number {
18122                 if(!isWasmInitialized) {
18123                         throw new Error("initializeWasm() must be awaited first!");
18124                 }
18125                 const nativeResponseValue = wasm.TS_ErroringMessageHandler_as_ChannelMessageHandler(this_arg);
18126                 return nativeResponseValue;
18127         }
18128         // void MessageHandler_free(struct LDKMessageHandler this_obj);
18129         export function MessageHandler_free(this_obj: number): void {
18130                 if(!isWasmInitialized) {
18131                         throw new Error("initializeWasm() must be awaited first!");
18132                 }
18133                 const nativeResponseValue = wasm.TS_MessageHandler_free(this_obj);
18134                 // debug statements here
18135         }
18136         // const struct LDKChannelMessageHandler *MessageHandler_get_chan_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
18137         export function MessageHandler_get_chan_handler(this_ptr: number): number {
18138                 if(!isWasmInitialized) {
18139                         throw new Error("initializeWasm() must be awaited first!");
18140                 }
18141                 const nativeResponseValue = wasm.TS_MessageHandler_get_chan_handler(this_ptr);
18142                 return nativeResponseValue;
18143         }
18144         // void MessageHandler_set_chan_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKChannelMessageHandler val);
18145         export function MessageHandler_set_chan_handler(this_ptr: number, val: number): void {
18146                 if(!isWasmInitialized) {
18147                         throw new Error("initializeWasm() must be awaited first!");
18148                 }
18149                 const nativeResponseValue = wasm.TS_MessageHandler_set_chan_handler(this_ptr, val);
18150                 // debug statements here
18151         }
18152         // const struct LDKRoutingMessageHandler *MessageHandler_get_route_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
18153         export function MessageHandler_get_route_handler(this_ptr: number): number {
18154                 if(!isWasmInitialized) {
18155                         throw new Error("initializeWasm() must be awaited first!");
18156                 }
18157                 const nativeResponseValue = wasm.TS_MessageHandler_get_route_handler(this_ptr);
18158                 return nativeResponseValue;
18159         }
18160         // void MessageHandler_set_route_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKRoutingMessageHandler val);
18161         export function MessageHandler_set_route_handler(this_ptr: number, val: number): void {
18162                 if(!isWasmInitialized) {
18163                         throw new Error("initializeWasm() must be awaited first!");
18164                 }
18165                 const nativeResponseValue = wasm.TS_MessageHandler_set_route_handler(this_ptr, val);
18166                 // debug statements here
18167         }
18168         // MUST_USE_RES struct LDKMessageHandler MessageHandler_new(struct LDKChannelMessageHandler chan_handler_arg, struct LDKRoutingMessageHandler route_handler_arg);
18169         export function MessageHandler_new(chan_handler_arg: number, route_handler_arg: number): number {
18170                 if(!isWasmInitialized) {
18171                         throw new Error("initializeWasm() must be awaited first!");
18172                 }
18173                 const nativeResponseValue = wasm.TS_MessageHandler_new(chan_handler_arg, route_handler_arg);
18174                 return nativeResponseValue;
18175         }
18176         // uint64_t SocketDescriptor_clone_ptr(LDKSocketDescriptor *NONNULL_PTR arg);
18177         export function SocketDescriptor_clone_ptr(arg: number): number {
18178                 if(!isWasmInitialized) {
18179                         throw new Error("initializeWasm() must be awaited first!");
18180                 }
18181                 const nativeResponseValue = wasm.TS_SocketDescriptor_clone_ptr(arg);
18182                 return nativeResponseValue;
18183         }
18184         // struct LDKSocketDescriptor SocketDescriptor_clone(const struct LDKSocketDescriptor *NONNULL_PTR orig);
18185         export function SocketDescriptor_clone(orig: number): number {
18186                 if(!isWasmInitialized) {
18187                         throw new Error("initializeWasm() must be awaited first!");
18188                 }
18189                 const nativeResponseValue = wasm.TS_SocketDescriptor_clone(orig);
18190                 return nativeResponseValue;
18191         }
18192         // void SocketDescriptor_free(struct LDKSocketDescriptor this_ptr);
18193         export function SocketDescriptor_free(this_ptr: number): void {
18194                 if(!isWasmInitialized) {
18195                         throw new Error("initializeWasm() must be awaited first!");
18196                 }
18197                 const nativeResponseValue = wasm.TS_SocketDescriptor_free(this_ptr);
18198                 // debug statements here
18199         }
18200         // void PeerHandleError_free(struct LDKPeerHandleError this_obj);
18201         export function PeerHandleError_free(this_obj: number): void {
18202                 if(!isWasmInitialized) {
18203                         throw new Error("initializeWasm() must be awaited first!");
18204                 }
18205                 const nativeResponseValue = wasm.TS_PeerHandleError_free(this_obj);
18206                 // debug statements here
18207         }
18208         // bool PeerHandleError_get_no_connection_possible(const struct LDKPeerHandleError *NONNULL_PTR this_ptr);
18209         export function PeerHandleError_get_no_connection_possible(this_ptr: number): boolean {
18210                 if(!isWasmInitialized) {
18211                         throw new Error("initializeWasm() must be awaited first!");
18212                 }
18213                 const nativeResponseValue = wasm.TS_PeerHandleError_get_no_connection_possible(this_ptr);
18214                 return nativeResponseValue;
18215         }
18216         // void PeerHandleError_set_no_connection_possible(struct LDKPeerHandleError *NONNULL_PTR this_ptr, bool val);
18217         export function PeerHandleError_set_no_connection_possible(this_ptr: number, val: boolean): void {
18218                 if(!isWasmInitialized) {
18219                         throw new Error("initializeWasm() must be awaited first!");
18220                 }
18221                 const nativeResponseValue = wasm.TS_PeerHandleError_set_no_connection_possible(this_ptr, val);
18222                 // debug statements here
18223         }
18224         // MUST_USE_RES struct LDKPeerHandleError PeerHandleError_new(bool no_connection_possible_arg);
18225         export function PeerHandleError_new(no_connection_possible_arg: boolean): number {
18226                 if(!isWasmInitialized) {
18227                         throw new Error("initializeWasm() must be awaited first!");
18228                 }
18229                 const nativeResponseValue = wasm.TS_PeerHandleError_new(no_connection_possible_arg);
18230                 return nativeResponseValue;
18231         }
18232         // uint64_t PeerHandleError_clone_ptr(LDKPeerHandleError *NONNULL_PTR arg);
18233         export function PeerHandleError_clone_ptr(arg: number): number {
18234                 if(!isWasmInitialized) {
18235                         throw new Error("initializeWasm() must be awaited first!");
18236                 }
18237                 const nativeResponseValue = wasm.TS_PeerHandleError_clone_ptr(arg);
18238                 return nativeResponseValue;
18239         }
18240         // struct LDKPeerHandleError PeerHandleError_clone(const struct LDKPeerHandleError *NONNULL_PTR orig);
18241         export function PeerHandleError_clone(orig: number): number {
18242                 if(!isWasmInitialized) {
18243                         throw new Error("initializeWasm() must be awaited first!");
18244                 }
18245                 const nativeResponseValue = wasm.TS_PeerHandleError_clone(orig);
18246                 return nativeResponseValue;
18247         }
18248         // void PeerManager_free(struct LDKPeerManager this_obj);
18249         export function PeerManager_free(this_obj: number): void {
18250                 if(!isWasmInitialized) {
18251                         throw new Error("initializeWasm() must be awaited first!");
18252                 }
18253                 const nativeResponseValue = wasm.TS_PeerManager_free(this_obj);
18254                 // debug statements here
18255         }
18256         // MUST_USE_RES struct LDKPeerManager PeerManager_new(struct LDKMessageHandler message_handler, struct LDKSecretKey our_node_secret, const uint8_t (*ephemeral_random_data)[32], struct LDKLogger logger, struct LDKCustomMessageHandler custom_message_handler);
18257         export function PeerManager_new(message_handler: number, our_node_secret: Uint8Array, ephemeral_random_data: Uint8Array, logger: number, custom_message_handler: number): number {
18258                 if(!isWasmInitialized) {
18259                         throw new Error("initializeWasm() must be awaited first!");
18260                 }
18261                 const nativeResponseValue = wasm.TS_PeerManager_new(message_handler, encodeUint8Array(our_node_secret), encodeUint8Array(ephemeral_random_data), logger, custom_message_handler);
18262                 return nativeResponseValue;
18263         }
18264         // MUST_USE_RES struct LDKCVec_PublicKeyZ PeerManager_get_peer_node_ids(const struct LDKPeerManager *NONNULL_PTR this_arg);
18265         export function PeerManager_get_peer_node_ids(this_arg: number): Uint8Array[] {
18266                 if(!isWasmInitialized) {
18267                         throw new Error("initializeWasm() must be awaited first!");
18268                 }
18269                 const nativeResponseValue = wasm.TS_PeerManager_get_peer_node_ids(this_arg);
18270                 return nativeResponseValue;
18271         }
18272         // 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);
18273         export function PeerManager_new_outbound_connection(this_arg: number, their_node_id: Uint8Array, descriptor: number): number {
18274                 if(!isWasmInitialized) {
18275                         throw new Error("initializeWasm() must be awaited first!");
18276                 }
18277                 const nativeResponseValue = wasm.TS_PeerManager_new_outbound_connection(this_arg, encodeUint8Array(their_node_id), descriptor);
18278                 return nativeResponseValue;
18279         }
18280         // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_new_inbound_connection(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor descriptor);
18281         export function PeerManager_new_inbound_connection(this_arg: number, descriptor: number): number {
18282                 if(!isWasmInitialized) {
18283                         throw new Error("initializeWasm() must be awaited first!");
18284                 }
18285                 const nativeResponseValue = wasm.TS_PeerManager_new_inbound_connection(this_arg, descriptor);
18286                 return nativeResponseValue;
18287         }
18288         // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_write_buffer_space_avail(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor *NONNULL_PTR descriptor);
18289         export function PeerManager_write_buffer_space_avail(this_arg: number, descriptor: number): number {
18290                 if(!isWasmInitialized) {
18291                         throw new Error("initializeWasm() must be awaited first!");
18292                 }
18293                 const nativeResponseValue = wasm.TS_PeerManager_write_buffer_space_avail(this_arg, descriptor);
18294                 return nativeResponseValue;
18295         }
18296         // 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);
18297         export function PeerManager_read_event(this_arg: number, peer_descriptor: number, data: Uint8Array): number {
18298                 if(!isWasmInitialized) {
18299                         throw new Error("initializeWasm() must be awaited first!");
18300                 }
18301                 const nativeResponseValue = wasm.TS_PeerManager_read_event(this_arg, peer_descriptor, encodeUint8Array(data));
18302                 return nativeResponseValue;
18303         }
18304         // void PeerManager_process_events(const struct LDKPeerManager *NONNULL_PTR this_arg);
18305         export function PeerManager_process_events(this_arg: number): void {
18306                 if(!isWasmInitialized) {
18307                         throw new Error("initializeWasm() must be awaited first!");
18308                 }
18309                 const nativeResponseValue = wasm.TS_PeerManager_process_events(this_arg);
18310                 // debug statements here
18311         }
18312         // void PeerManager_socket_disconnected(const struct LDKPeerManager *NONNULL_PTR this_arg, const struct LDKSocketDescriptor *NONNULL_PTR descriptor);
18313         export function PeerManager_socket_disconnected(this_arg: number, descriptor: number): void {
18314                 if(!isWasmInitialized) {
18315                         throw new Error("initializeWasm() must be awaited first!");
18316                 }
18317                 const nativeResponseValue = wasm.TS_PeerManager_socket_disconnected(this_arg, descriptor);
18318                 // debug statements here
18319         }
18320         // void PeerManager_disconnect_by_node_id(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKPublicKey node_id, bool no_connection_possible);
18321         export function PeerManager_disconnect_by_node_id(this_arg: number, node_id: Uint8Array, no_connection_possible: boolean): void {
18322                 if(!isWasmInitialized) {
18323                         throw new Error("initializeWasm() must be awaited first!");
18324                 }
18325                 const nativeResponseValue = wasm.TS_PeerManager_disconnect_by_node_id(this_arg, encodeUint8Array(node_id), no_connection_possible);
18326                 // debug statements here
18327         }
18328         // void PeerManager_disconnect_all_peers(const struct LDKPeerManager *NONNULL_PTR this_arg);
18329         export function PeerManager_disconnect_all_peers(this_arg: number): void {
18330                 if(!isWasmInitialized) {
18331                         throw new Error("initializeWasm() must be awaited first!");
18332                 }
18333                 const nativeResponseValue = wasm.TS_PeerManager_disconnect_all_peers(this_arg);
18334                 // debug statements here
18335         }
18336         // void PeerManager_timer_tick_occurred(const struct LDKPeerManager *NONNULL_PTR this_arg);
18337         export function PeerManager_timer_tick_occurred(this_arg: number): void {
18338                 if(!isWasmInitialized) {
18339                         throw new Error("initializeWasm() must be awaited first!");
18340                 }
18341                 const nativeResponseValue = wasm.TS_PeerManager_timer_tick_occurred(this_arg);
18342                 // debug statements here
18343         }
18344         // uint64_t htlc_success_tx_weight(bool opt_anchors);
18345         export function htlc_success_tx_weight(opt_anchors: boolean): number {
18346                 if(!isWasmInitialized) {
18347                         throw new Error("initializeWasm() must be awaited first!");
18348                 }
18349                 const nativeResponseValue = wasm.TS_htlc_success_tx_weight(opt_anchors);
18350                 return nativeResponseValue;
18351         }
18352         // uint64_t htlc_timeout_tx_weight(bool opt_anchors);
18353         export function htlc_timeout_tx_weight(opt_anchors: boolean): number {
18354                 if(!isWasmInitialized) {
18355                         throw new Error("initializeWasm() must be awaited first!");
18356                 }
18357                 const nativeResponseValue = wasm.TS_htlc_timeout_tx_weight(opt_anchors);
18358                 return nativeResponseValue;
18359         }
18360         // struct LDKThirtyTwoBytes build_commitment_secret(const uint8_t (*commitment_seed)[32], uint64_t idx);
18361         export function build_commitment_secret(commitment_seed: Uint8Array, idx: number): Uint8Array {
18362                 if(!isWasmInitialized) {
18363                         throw new Error("initializeWasm() must be awaited first!");
18364                 }
18365                 const nativeResponseValue = wasm.TS_build_commitment_secret(encodeUint8Array(commitment_seed), idx);
18366                 return decodeUint8Array(nativeResponseValue);
18367         }
18368         // struct LDKTransaction build_closing_transaction(uint64_t to_holder_value_sat, uint64_t to_counterparty_value_sat, struct LDKCVec_u8Z to_holder_script, struct LDKCVec_u8Z to_counterparty_script, struct LDKOutPoint funding_outpoint);
18369         export function build_closing_transaction(to_holder_value_sat: number, to_counterparty_value_sat: number, to_holder_script: Uint8Array, to_counterparty_script: Uint8Array, funding_outpoint: number): Uint8Array {
18370                 if(!isWasmInitialized) {
18371                         throw new Error("initializeWasm() must be awaited first!");
18372                 }
18373                 const nativeResponseValue = wasm.TS_build_closing_transaction(to_holder_value_sat, to_counterparty_value_sat, encodeUint8Array(to_holder_script), encodeUint8Array(to_counterparty_script), funding_outpoint);
18374                 return decodeUint8Array(nativeResponseValue);
18375         }
18376         // struct LDKCResult_SecretKeyErrorZ derive_private_key(struct LDKPublicKey per_commitment_point, const uint8_t (*base_secret)[32]);
18377         export function derive_private_key(per_commitment_point: Uint8Array, base_secret: Uint8Array): number {
18378                 if(!isWasmInitialized) {
18379                         throw new Error("initializeWasm() must be awaited first!");
18380                 }
18381                 const nativeResponseValue = wasm.TS_derive_private_key(encodeUint8Array(per_commitment_point), encodeUint8Array(base_secret));
18382                 return nativeResponseValue;
18383         }
18384         // struct LDKCResult_PublicKeyErrorZ derive_public_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey base_point);
18385         export function derive_public_key(per_commitment_point: Uint8Array, base_point: Uint8Array): number {
18386                 if(!isWasmInitialized) {
18387                         throw new Error("initializeWasm() must be awaited first!");
18388                 }
18389                 const nativeResponseValue = wasm.TS_derive_public_key(encodeUint8Array(per_commitment_point), encodeUint8Array(base_point));
18390                 return nativeResponseValue;
18391         }
18392         // struct LDKCResult_SecretKeyErrorZ derive_private_revocation_key(const uint8_t (*per_commitment_secret)[32], const uint8_t (*countersignatory_revocation_base_secret)[32]);
18393         export function derive_private_revocation_key(per_commitment_secret: Uint8Array, countersignatory_revocation_base_secret: Uint8Array): number {
18394                 if(!isWasmInitialized) {
18395                         throw new Error("initializeWasm() must be awaited first!");
18396                 }
18397                 const nativeResponseValue = wasm.TS_derive_private_revocation_key(encodeUint8Array(per_commitment_secret), encodeUint8Array(countersignatory_revocation_base_secret));
18398                 return nativeResponseValue;
18399         }
18400         // struct LDKCResult_PublicKeyErrorZ derive_public_revocation_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey countersignatory_revocation_base_point);
18401         export function derive_public_revocation_key(per_commitment_point: Uint8Array, countersignatory_revocation_base_point: Uint8Array): number {
18402                 if(!isWasmInitialized) {
18403                         throw new Error("initializeWasm() must be awaited first!");
18404                 }
18405                 const nativeResponseValue = wasm.TS_derive_public_revocation_key(encodeUint8Array(per_commitment_point), encodeUint8Array(countersignatory_revocation_base_point));
18406                 return nativeResponseValue;
18407         }
18408         // void TxCreationKeys_free(struct LDKTxCreationKeys this_obj);
18409         export function TxCreationKeys_free(this_obj: number): void {
18410                 if(!isWasmInitialized) {
18411                         throw new Error("initializeWasm() must be awaited first!");
18412                 }
18413                 const nativeResponseValue = wasm.TS_TxCreationKeys_free(this_obj);
18414                 // debug statements here
18415         }
18416         // struct LDKPublicKey TxCreationKeys_get_per_commitment_point(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
18417         export function TxCreationKeys_get_per_commitment_point(this_ptr: number): Uint8Array {
18418                 if(!isWasmInitialized) {
18419                         throw new Error("initializeWasm() must be awaited first!");
18420                 }
18421                 const nativeResponseValue = wasm.TS_TxCreationKeys_get_per_commitment_point(this_ptr);
18422                 return decodeUint8Array(nativeResponseValue);
18423         }
18424         // void TxCreationKeys_set_per_commitment_point(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
18425         export function TxCreationKeys_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
18426                 if(!isWasmInitialized) {
18427                         throw new Error("initializeWasm() must be awaited first!");
18428                 }
18429                 const nativeResponseValue = wasm.TS_TxCreationKeys_set_per_commitment_point(this_ptr, encodeUint8Array(val));
18430                 // debug statements here
18431         }
18432         // struct LDKPublicKey TxCreationKeys_get_revocation_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
18433         export function TxCreationKeys_get_revocation_key(this_ptr: number): Uint8Array {
18434                 if(!isWasmInitialized) {
18435                         throw new Error("initializeWasm() must be awaited first!");
18436                 }
18437                 const nativeResponseValue = wasm.TS_TxCreationKeys_get_revocation_key(this_ptr);
18438                 return decodeUint8Array(nativeResponseValue);
18439         }
18440         // void TxCreationKeys_set_revocation_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
18441         export function TxCreationKeys_set_revocation_key(this_ptr: number, val: Uint8Array): void {
18442                 if(!isWasmInitialized) {
18443                         throw new Error("initializeWasm() must be awaited first!");
18444                 }
18445                 const nativeResponseValue = wasm.TS_TxCreationKeys_set_revocation_key(this_ptr, encodeUint8Array(val));
18446                 // debug statements here
18447         }
18448         // struct LDKPublicKey TxCreationKeys_get_broadcaster_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
18449         export function TxCreationKeys_get_broadcaster_htlc_key(this_ptr: number): Uint8Array {
18450                 if(!isWasmInitialized) {
18451                         throw new Error("initializeWasm() must be awaited first!");
18452                 }
18453                 const nativeResponseValue = wasm.TS_TxCreationKeys_get_broadcaster_htlc_key(this_ptr);
18454                 return decodeUint8Array(nativeResponseValue);
18455         }
18456         // void TxCreationKeys_set_broadcaster_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
18457         export function TxCreationKeys_set_broadcaster_htlc_key(this_ptr: number, val: Uint8Array): void {
18458                 if(!isWasmInitialized) {
18459                         throw new Error("initializeWasm() must be awaited first!");
18460                 }
18461                 const nativeResponseValue = wasm.TS_TxCreationKeys_set_broadcaster_htlc_key(this_ptr, encodeUint8Array(val));
18462                 // debug statements here
18463         }
18464         // struct LDKPublicKey TxCreationKeys_get_countersignatory_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
18465         export function TxCreationKeys_get_countersignatory_htlc_key(this_ptr: number): Uint8Array {
18466                 if(!isWasmInitialized) {
18467                         throw new Error("initializeWasm() must be awaited first!");
18468                 }
18469                 const nativeResponseValue = wasm.TS_TxCreationKeys_get_countersignatory_htlc_key(this_ptr);
18470                 return decodeUint8Array(nativeResponseValue);
18471         }
18472         // void TxCreationKeys_set_countersignatory_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
18473         export function TxCreationKeys_set_countersignatory_htlc_key(this_ptr: number, val: Uint8Array): void {
18474                 if(!isWasmInitialized) {
18475                         throw new Error("initializeWasm() must be awaited first!");
18476                 }
18477                 const nativeResponseValue = wasm.TS_TxCreationKeys_set_countersignatory_htlc_key(this_ptr, encodeUint8Array(val));
18478                 // debug statements here
18479         }
18480         // struct LDKPublicKey TxCreationKeys_get_broadcaster_delayed_payment_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
18481         export function TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr: number): Uint8Array {
18482                 if(!isWasmInitialized) {
18483                         throw new Error("initializeWasm() must be awaited first!");
18484                 }
18485                 const nativeResponseValue = wasm.TS_TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr);
18486                 return decodeUint8Array(nativeResponseValue);
18487         }
18488         // void TxCreationKeys_set_broadcaster_delayed_payment_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
18489         export function TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr: number, val: Uint8Array): void {
18490                 if(!isWasmInitialized) {
18491                         throw new Error("initializeWasm() must be awaited first!");
18492                 }
18493                 const nativeResponseValue = wasm.TS_TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr, encodeUint8Array(val));
18494                 // debug statements here
18495         }
18496         // 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);
18497         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 {
18498                 if(!isWasmInitialized) {
18499                         throw new Error("initializeWasm() must be awaited first!");
18500                 }
18501                 const nativeResponseValue = wasm.TS_TxCreationKeys_new(encodeUint8Array(per_commitment_point_arg), encodeUint8Array(revocation_key_arg), encodeUint8Array(broadcaster_htlc_key_arg), encodeUint8Array(countersignatory_htlc_key_arg), encodeUint8Array(broadcaster_delayed_payment_key_arg));
18502                 return nativeResponseValue;
18503         }
18504         // uint64_t TxCreationKeys_clone_ptr(LDKTxCreationKeys *NONNULL_PTR arg);
18505         export function TxCreationKeys_clone_ptr(arg: number): number {
18506                 if(!isWasmInitialized) {
18507                         throw new Error("initializeWasm() must be awaited first!");
18508                 }
18509                 const nativeResponseValue = wasm.TS_TxCreationKeys_clone_ptr(arg);
18510                 return nativeResponseValue;
18511         }
18512         // struct LDKTxCreationKeys TxCreationKeys_clone(const struct LDKTxCreationKeys *NONNULL_PTR orig);
18513         export function TxCreationKeys_clone(orig: number): number {
18514                 if(!isWasmInitialized) {
18515                         throw new Error("initializeWasm() must be awaited first!");
18516                 }
18517                 const nativeResponseValue = wasm.TS_TxCreationKeys_clone(orig);
18518                 return nativeResponseValue;
18519         }
18520         // struct LDKCVec_u8Z TxCreationKeys_write(const struct LDKTxCreationKeys *NONNULL_PTR obj);
18521         export function TxCreationKeys_write(obj: number): Uint8Array {
18522                 if(!isWasmInitialized) {
18523                         throw new Error("initializeWasm() must be awaited first!");
18524                 }
18525                 const nativeResponseValue = wasm.TS_TxCreationKeys_write(obj);
18526                 return decodeUint8Array(nativeResponseValue);
18527         }
18528         // struct LDKCResult_TxCreationKeysDecodeErrorZ TxCreationKeys_read(struct LDKu8slice ser);
18529         export function TxCreationKeys_read(ser: Uint8Array): number {
18530                 if(!isWasmInitialized) {
18531                         throw new Error("initializeWasm() must be awaited first!");
18532                 }
18533                 const nativeResponseValue = wasm.TS_TxCreationKeys_read(encodeUint8Array(ser));
18534                 return nativeResponseValue;
18535         }
18536         // void ChannelPublicKeys_free(struct LDKChannelPublicKeys this_obj);
18537         export function ChannelPublicKeys_free(this_obj: number): void {
18538                 if(!isWasmInitialized) {
18539                         throw new Error("initializeWasm() must be awaited first!");
18540                 }
18541                 const nativeResponseValue = wasm.TS_ChannelPublicKeys_free(this_obj);
18542                 // debug statements here
18543         }
18544         // struct LDKPublicKey ChannelPublicKeys_get_funding_pubkey(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
18545         export function ChannelPublicKeys_get_funding_pubkey(this_ptr: number): Uint8Array {
18546                 if(!isWasmInitialized) {
18547                         throw new Error("initializeWasm() must be awaited first!");
18548                 }
18549                 const nativeResponseValue = wasm.TS_ChannelPublicKeys_get_funding_pubkey(this_ptr);
18550                 return decodeUint8Array(nativeResponseValue);
18551         }
18552         // void ChannelPublicKeys_set_funding_pubkey(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
18553         export function ChannelPublicKeys_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
18554                 if(!isWasmInitialized) {
18555                         throw new Error("initializeWasm() must be awaited first!");
18556                 }
18557                 const nativeResponseValue = wasm.TS_ChannelPublicKeys_set_funding_pubkey(this_ptr, encodeUint8Array(val));
18558                 // debug statements here
18559         }
18560         // struct LDKPublicKey ChannelPublicKeys_get_revocation_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
18561         export function ChannelPublicKeys_get_revocation_basepoint(this_ptr: number): Uint8Array {
18562                 if(!isWasmInitialized) {
18563                         throw new Error("initializeWasm() must be awaited first!");
18564                 }
18565                 const nativeResponseValue = wasm.TS_ChannelPublicKeys_get_revocation_basepoint(this_ptr);
18566                 return decodeUint8Array(nativeResponseValue);
18567         }
18568         // void ChannelPublicKeys_set_revocation_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
18569         export function ChannelPublicKeys_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
18570                 if(!isWasmInitialized) {
18571                         throw new Error("initializeWasm() must be awaited first!");
18572                 }
18573                 const nativeResponseValue = wasm.TS_ChannelPublicKeys_set_revocation_basepoint(this_ptr, encodeUint8Array(val));
18574                 // debug statements here
18575         }
18576         // struct LDKPublicKey ChannelPublicKeys_get_payment_point(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
18577         export function ChannelPublicKeys_get_payment_point(this_ptr: number): Uint8Array {
18578                 if(!isWasmInitialized) {
18579                         throw new Error("initializeWasm() must be awaited first!");
18580                 }
18581                 const nativeResponseValue = wasm.TS_ChannelPublicKeys_get_payment_point(this_ptr);
18582                 return decodeUint8Array(nativeResponseValue);
18583         }
18584         // void ChannelPublicKeys_set_payment_point(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
18585         export function ChannelPublicKeys_set_payment_point(this_ptr: number, val: Uint8Array): void {
18586                 if(!isWasmInitialized) {
18587                         throw new Error("initializeWasm() must be awaited first!");
18588                 }
18589                 const nativeResponseValue = wasm.TS_ChannelPublicKeys_set_payment_point(this_ptr, encodeUint8Array(val));
18590                 // debug statements here
18591         }
18592         // struct LDKPublicKey ChannelPublicKeys_get_delayed_payment_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
18593         export function ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
18594                 if(!isWasmInitialized) {
18595                         throw new Error("initializeWasm() must be awaited first!");
18596                 }
18597                 const nativeResponseValue = wasm.TS_ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr);
18598                 return decodeUint8Array(nativeResponseValue);
18599         }
18600         // void ChannelPublicKeys_set_delayed_payment_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
18601         export function ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
18602                 if(!isWasmInitialized) {
18603                         throw new Error("initializeWasm() must be awaited first!");
18604                 }
18605                 const nativeResponseValue = wasm.TS_ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr, encodeUint8Array(val));
18606                 // debug statements here
18607         }
18608         // struct LDKPublicKey ChannelPublicKeys_get_htlc_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
18609         export function ChannelPublicKeys_get_htlc_basepoint(this_ptr: number): Uint8Array {
18610                 if(!isWasmInitialized) {
18611                         throw new Error("initializeWasm() must be awaited first!");
18612                 }
18613                 const nativeResponseValue = wasm.TS_ChannelPublicKeys_get_htlc_basepoint(this_ptr);
18614                 return decodeUint8Array(nativeResponseValue);
18615         }
18616         // void ChannelPublicKeys_set_htlc_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
18617         export function ChannelPublicKeys_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
18618                 if(!isWasmInitialized) {
18619                         throw new Error("initializeWasm() must be awaited first!");
18620                 }
18621                 const nativeResponseValue = wasm.TS_ChannelPublicKeys_set_htlc_basepoint(this_ptr, encodeUint8Array(val));
18622                 // debug statements here
18623         }
18624         // 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);
18625         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 {
18626                 if(!isWasmInitialized) {
18627                         throw new Error("initializeWasm() must be awaited first!");
18628                 }
18629                 const nativeResponseValue = wasm.TS_ChannelPublicKeys_new(encodeUint8Array(funding_pubkey_arg), encodeUint8Array(revocation_basepoint_arg), encodeUint8Array(payment_point_arg), encodeUint8Array(delayed_payment_basepoint_arg), encodeUint8Array(htlc_basepoint_arg));
18630                 return nativeResponseValue;
18631         }
18632         // uint64_t ChannelPublicKeys_clone_ptr(LDKChannelPublicKeys *NONNULL_PTR arg);
18633         export function ChannelPublicKeys_clone_ptr(arg: number): number {
18634                 if(!isWasmInitialized) {
18635                         throw new Error("initializeWasm() must be awaited first!");
18636                 }
18637                 const nativeResponseValue = wasm.TS_ChannelPublicKeys_clone_ptr(arg);
18638                 return nativeResponseValue;
18639         }
18640         // struct LDKChannelPublicKeys ChannelPublicKeys_clone(const struct LDKChannelPublicKeys *NONNULL_PTR orig);
18641         export function ChannelPublicKeys_clone(orig: number): number {
18642                 if(!isWasmInitialized) {
18643                         throw new Error("initializeWasm() must be awaited first!");
18644                 }
18645                 const nativeResponseValue = wasm.TS_ChannelPublicKeys_clone(orig);
18646                 return nativeResponseValue;
18647         }
18648         // struct LDKCVec_u8Z ChannelPublicKeys_write(const struct LDKChannelPublicKeys *NONNULL_PTR obj);
18649         export function ChannelPublicKeys_write(obj: number): Uint8Array {
18650                 if(!isWasmInitialized) {
18651                         throw new Error("initializeWasm() must be awaited first!");
18652                 }
18653                 const nativeResponseValue = wasm.TS_ChannelPublicKeys_write(obj);
18654                 return decodeUint8Array(nativeResponseValue);
18655         }
18656         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ ChannelPublicKeys_read(struct LDKu8slice ser);
18657         export function ChannelPublicKeys_read(ser: Uint8Array): number {
18658                 if(!isWasmInitialized) {
18659                         throw new Error("initializeWasm() must be awaited first!");
18660                 }
18661                 const nativeResponseValue = wasm.TS_ChannelPublicKeys_read(encodeUint8Array(ser));
18662                 return nativeResponseValue;
18663         }
18664         // 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);
18665         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 {
18666                 if(!isWasmInitialized) {
18667                         throw new Error("initializeWasm() must be awaited first!");
18668                 }
18669                 const nativeResponseValue = wasm.TS_TxCreationKeys_derive_new(encodeUint8Array(per_commitment_point), encodeUint8Array(broadcaster_delayed_payment_base), encodeUint8Array(broadcaster_htlc_base), encodeUint8Array(countersignatory_revocation_base), encodeUint8Array(countersignatory_htlc_base));
18670                 return nativeResponseValue;
18671         }
18672         // 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);
18673         export function TxCreationKeys_from_channel_static_keys(per_commitment_point: Uint8Array, broadcaster_keys: number, countersignatory_keys: number): number {
18674                 if(!isWasmInitialized) {
18675                         throw new Error("initializeWasm() must be awaited first!");
18676                 }
18677                 const nativeResponseValue = wasm.TS_TxCreationKeys_from_channel_static_keys(encodeUint8Array(per_commitment_point), broadcaster_keys, countersignatory_keys);
18678                 return nativeResponseValue;
18679         }
18680         // struct LDKCVec_u8Z get_revokeable_redeemscript(struct LDKPublicKey revocation_key, uint16_t contest_delay, struct LDKPublicKey broadcaster_delayed_payment_key);
18681         export function get_revokeable_redeemscript(revocation_key: Uint8Array, contest_delay: number, broadcaster_delayed_payment_key: Uint8Array): Uint8Array {
18682                 if(!isWasmInitialized) {
18683                         throw new Error("initializeWasm() must be awaited first!");
18684                 }
18685                 const nativeResponseValue = wasm.TS_get_revokeable_redeemscript(encodeUint8Array(revocation_key), contest_delay, encodeUint8Array(broadcaster_delayed_payment_key));
18686                 return decodeUint8Array(nativeResponseValue);
18687         }
18688         // void HTLCOutputInCommitment_free(struct LDKHTLCOutputInCommitment this_obj);
18689         export function HTLCOutputInCommitment_free(this_obj: number): void {
18690                 if(!isWasmInitialized) {
18691                         throw new Error("initializeWasm() must be awaited first!");
18692                 }
18693                 const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_free(this_obj);
18694                 // debug statements here
18695         }
18696         // bool HTLCOutputInCommitment_get_offered(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
18697         export function HTLCOutputInCommitment_get_offered(this_ptr: number): boolean {
18698                 if(!isWasmInitialized) {
18699                         throw new Error("initializeWasm() must be awaited first!");
18700                 }
18701                 const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_get_offered(this_ptr);
18702                 return nativeResponseValue;
18703         }
18704         // void HTLCOutputInCommitment_set_offered(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, bool val);
18705         export function HTLCOutputInCommitment_set_offered(this_ptr: number, val: boolean): void {
18706                 if(!isWasmInitialized) {
18707                         throw new Error("initializeWasm() must be awaited first!");
18708                 }
18709                 const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_set_offered(this_ptr, val);
18710                 // debug statements here
18711         }
18712         // uint64_t HTLCOutputInCommitment_get_amount_msat(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
18713         export function HTLCOutputInCommitment_get_amount_msat(this_ptr: number): number {
18714                 if(!isWasmInitialized) {
18715                         throw new Error("initializeWasm() must be awaited first!");
18716                 }
18717                 const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_get_amount_msat(this_ptr);
18718                 return nativeResponseValue;
18719         }
18720         // void HTLCOutputInCommitment_set_amount_msat(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint64_t val);
18721         export function HTLCOutputInCommitment_set_amount_msat(this_ptr: number, val: number): void {
18722                 if(!isWasmInitialized) {
18723                         throw new Error("initializeWasm() must be awaited first!");
18724                 }
18725                 const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_set_amount_msat(this_ptr, val);
18726                 // debug statements here
18727         }
18728         // uint32_t HTLCOutputInCommitment_get_cltv_expiry(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
18729         export function HTLCOutputInCommitment_get_cltv_expiry(this_ptr: number): number {
18730                 if(!isWasmInitialized) {
18731                         throw new Error("initializeWasm() must be awaited first!");
18732                 }
18733                 const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_get_cltv_expiry(this_ptr);
18734                 return nativeResponseValue;
18735         }
18736         // void HTLCOutputInCommitment_set_cltv_expiry(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint32_t val);
18737         export function HTLCOutputInCommitment_set_cltv_expiry(this_ptr: number, val: number): void {
18738                 if(!isWasmInitialized) {
18739                         throw new Error("initializeWasm() must be awaited first!");
18740                 }
18741                 const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_set_cltv_expiry(this_ptr, val);
18742                 // debug statements here
18743         }
18744         // const uint8_t (*HTLCOutputInCommitment_get_payment_hash(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr))[32];
18745         export function HTLCOutputInCommitment_get_payment_hash(this_ptr: number): Uint8Array {
18746                 if(!isWasmInitialized) {
18747                         throw new Error("initializeWasm() must be awaited first!");
18748                 }
18749                 const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_get_payment_hash(this_ptr);
18750                 return decodeUint8Array(nativeResponseValue);
18751         }
18752         // void HTLCOutputInCommitment_set_payment_hash(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
18753         export function HTLCOutputInCommitment_set_payment_hash(this_ptr: number, val: Uint8Array): void {
18754                 if(!isWasmInitialized) {
18755                         throw new Error("initializeWasm() must be awaited first!");
18756                 }
18757                 const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_set_payment_hash(this_ptr, encodeUint8Array(val));
18758                 // debug statements here
18759         }
18760         // struct LDKCOption_u32Z HTLCOutputInCommitment_get_transaction_output_index(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
18761         export function HTLCOutputInCommitment_get_transaction_output_index(this_ptr: number): number {
18762                 if(!isWasmInitialized) {
18763                         throw new Error("initializeWasm() must be awaited first!");
18764                 }
18765                 const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_get_transaction_output_index(this_ptr);
18766                 return nativeResponseValue;
18767         }
18768         // void HTLCOutputInCommitment_set_transaction_output_index(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKCOption_u32Z val);
18769         export function HTLCOutputInCommitment_set_transaction_output_index(this_ptr: number, val: number): void {
18770                 if(!isWasmInitialized) {
18771                         throw new Error("initializeWasm() must be awaited first!");
18772                 }
18773                 const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_set_transaction_output_index(this_ptr, val);
18774                 // debug statements here
18775         }
18776         // 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);
18777         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 {
18778                 if(!isWasmInitialized) {
18779                         throw new Error("initializeWasm() must be awaited first!");
18780                 }
18781                 const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_new(offered_arg, amount_msat_arg, cltv_expiry_arg, encodeUint8Array(payment_hash_arg), transaction_output_index_arg);
18782                 return nativeResponseValue;
18783         }
18784         // uint64_t HTLCOutputInCommitment_clone_ptr(LDKHTLCOutputInCommitment *NONNULL_PTR arg);
18785         export function HTLCOutputInCommitment_clone_ptr(arg: number): number {
18786                 if(!isWasmInitialized) {
18787                         throw new Error("initializeWasm() must be awaited first!");
18788                 }
18789                 const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_clone_ptr(arg);
18790                 return nativeResponseValue;
18791         }
18792         // struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_clone(const struct LDKHTLCOutputInCommitment *NONNULL_PTR orig);
18793         export function HTLCOutputInCommitment_clone(orig: number): number {
18794                 if(!isWasmInitialized) {
18795                         throw new Error("initializeWasm() must be awaited first!");
18796                 }
18797                 const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_clone(orig);
18798                 return nativeResponseValue;
18799         }
18800         // struct LDKCVec_u8Z HTLCOutputInCommitment_write(const struct LDKHTLCOutputInCommitment *NONNULL_PTR obj);
18801         export function HTLCOutputInCommitment_write(obj: number): Uint8Array {
18802                 if(!isWasmInitialized) {
18803                         throw new Error("initializeWasm() must be awaited first!");
18804                 }
18805                 const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_write(obj);
18806                 return decodeUint8Array(nativeResponseValue);
18807         }
18808         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ HTLCOutputInCommitment_read(struct LDKu8slice ser);
18809         export function HTLCOutputInCommitment_read(ser: Uint8Array): number {
18810                 if(!isWasmInitialized) {
18811                         throw new Error("initializeWasm() must be awaited first!");
18812                 }
18813                 const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_read(encodeUint8Array(ser));
18814                 return nativeResponseValue;
18815         }
18816         // struct LDKCVec_u8Z get_htlc_redeemscript(const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc, bool opt_anchors, const struct LDKTxCreationKeys *NONNULL_PTR keys);
18817         export function get_htlc_redeemscript(htlc: number, opt_anchors: boolean, keys: number): Uint8Array {
18818                 if(!isWasmInitialized) {
18819                         throw new Error("initializeWasm() must be awaited first!");
18820                 }
18821                 const nativeResponseValue = wasm.TS_get_htlc_redeemscript(htlc, opt_anchors, keys);
18822                 return decodeUint8Array(nativeResponseValue);
18823         }
18824         // struct LDKCVec_u8Z make_funding_redeemscript(struct LDKPublicKey broadcaster, struct LDKPublicKey countersignatory);
18825         export function make_funding_redeemscript(broadcaster: Uint8Array, countersignatory: Uint8Array): Uint8Array {
18826                 if(!isWasmInitialized) {
18827                         throw new Error("initializeWasm() must be awaited first!");
18828                 }
18829                 const nativeResponseValue = wasm.TS_make_funding_redeemscript(encodeUint8Array(broadcaster), encodeUint8Array(countersignatory));
18830                 return decodeUint8Array(nativeResponseValue);
18831         }
18832         // struct LDKTransaction build_htlc_transaction(const uint8_t (*commitment_txid)[32], uint32_t feerate_per_kw, uint16_t contest_delay, const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc, bool opt_anchors, struct LDKPublicKey broadcaster_delayed_payment_key, struct LDKPublicKey revocation_key);
18833         export function build_htlc_transaction(commitment_txid: Uint8Array, feerate_per_kw: number, contest_delay: number, htlc: number, opt_anchors: boolean, broadcaster_delayed_payment_key: Uint8Array, revocation_key: Uint8Array): Uint8Array {
18834                 if(!isWasmInitialized) {
18835                         throw new Error("initializeWasm() must be awaited first!");
18836                 }
18837                 const nativeResponseValue = wasm.TS_build_htlc_transaction(encodeUint8Array(commitment_txid), feerate_per_kw, contest_delay, htlc, opt_anchors, encodeUint8Array(broadcaster_delayed_payment_key), encodeUint8Array(revocation_key));
18838                 return decodeUint8Array(nativeResponseValue);
18839         }
18840         // struct LDKCVec_u8Z get_anchor_redeemscript(struct LDKPublicKey funding_pubkey);
18841         export function get_anchor_redeemscript(funding_pubkey: Uint8Array): Uint8Array {
18842                 if(!isWasmInitialized) {
18843                         throw new Error("initializeWasm() must be awaited first!");
18844                 }
18845                 const nativeResponseValue = wasm.TS_get_anchor_redeemscript(encodeUint8Array(funding_pubkey));
18846                 return decodeUint8Array(nativeResponseValue);
18847         }
18848         // void ChannelTransactionParameters_free(struct LDKChannelTransactionParameters this_obj);
18849         export function ChannelTransactionParameters_free(this_obj: number): void {
18850                 if(!isWasmInitialized) {
18851                         throw new Error("initializeWasm() must be awaited first!");
18852                 }
18853                 const nativeResponseValue = wasm.TS_ChannelTransactionParameters_free(this_obj);
18854                 // debug statements here
18855         }
18856         // struct LDKChannelPublicKeys ChannelTransactionParameters_get_holder_pubkeys(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
18857         export function ChannelTransactionParameters_get_holder_pubkeys(this_ptr: number): number {
18858                 if(!isWasmInitialized) {
18859                         throw new Error("initializeWasm() must be awaited first!");
18860                 }
18861                 const nativeResponseValue = wasm.TS_ChannelTransactionParameters_get_holder_pubkeys(this_ptr);
18862                 return nativeResponseValue;
18863         }
18864         // void ChannelTransactionParameters_set_holder_pubkeys(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
18865         export function ChannelTransactionParameters_set_holder_pubkeys(this_ptr: number, val: number): void {
18866                 if(!isWasmInitialized) {
18867                         throw new Error("initializeWasm() must be awaited first!");
18868                 }
18869                 const nativeResponseValue = wasm.TS_ChannelTransactionParameters_set_holder_pubkeys(this_ptr, val);
18870                 // debug statements here
18871         }
18872         // uint16_t ChannelTransactionParameters_get_holder_selected_contest_delay(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
18873         export function ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr: number): number {
18874                 if(!isWasmInitialized) {
18875                         throw new Error("initializeWasm() must be awaited first!");
18876                 }
18877                 const nativeResponseValue = wasm.TS_ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr);
18878                 return nativeResponseValue;
18879         }
18880         // void ChannelTransactionParameters_set_holder_selected_contest_delay(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
18881         export function ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr: number, val: number): void {
18882                 if(!isWasmInitialized) {
18883                         throw new Error("initializeWasm() must be awaited first!");
18884                 }
18885                 const nativeResponseValue = wasm.TS_ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr, val);
18886                 // debug statements here
18887         }
18888         // bool ChannelTransactionParameters_get_is_outbound_from_holder(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
18889         export function ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr: number): boolean {
18890                 if(!isWasmInitialized) {
18891                         throw new Error("initializeWasm() must be awaited first!");
18892                 }
18893                 const nativeResponseValue = wasm.TS_ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr);
18894                 return nativeResponseValue;
18895         }
18896         // void ChannelTransactionParameters_set_is_outbound_from_holder(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, bool val);
18897         export function ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr: number, val: boolean): void {
18898                 if(!isWasmInitialized) {
18899                         throw new Error("initializeWasm() must be awaited first!");
18900                 }
18901                 const nativeResponseValue = wasm.TS_ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr, val);
18902                 // debug statements here
18903         }
18904         // struct LDKCounterpartyChannelTransactionParameters ChannelTransactionParameters_get_counterparty_parameters(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
18905         export function ChannelTransactionParameters_get_counterparty_parameters(this_ptr: number): number {
18906                 if(!isWasmInitialized) {
18907                         throw new Error("initializeWasm() must be awaited first!");
18908                 }
18909                 const nativeResponseValue = wasm.TS_ChannelTransactionParameters_get_counterparty_parameters(this_ptr);
18910                 return nativeResponseValue;
18911         }
18912         // void ChannelTransactionParameters_set_counterparty_parameters(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKCounterpartyChannelTransactionParameters val);
18913         export function ChannelTransactionParameters_set_counterparty_parameters(this_ptr: number, val: number): void {
18914                 if(!isWasmInitialized) {
18915                         throw new Error("initializeWasm() must be awaited first!");
18916                 }
18917                 const nativeResponseValue = wasm.TS_ChannelTransactionParameters_set_counterparty_parameters(this_ptr, val);
18918                 // debug statements here
18919         }
18920         // struct LDKOutPoint ChannelTransactionParameters_get_funding_outpoint(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
18921         export function ChannelTransactionParameters_get_funding_outpoint(this_ptr: number): number {
18922                 if(!isWasmInitialized) {
18923                         throw new Error("initializeWasm() must be awaited first!");
18924                 }
18925                 const nativeResponseValue = wasm.TS_ChannelTransactionParameters_get_funding_outpoint(this_ptr);
18926                 return nativeResponseValue;
18927         }
18928         // void ChannelTransactionParameters_set_funding_outpoint(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKOutPoint val);
18929         export function ChannelTransactionParameters_set_funding_outpoint(this_ptr: number, val: number): void {
18930                 if(!isWasmInitialized) {
18931                         throw new Error("initializeWasm() must be awaited first!");
18932                 }
18933                 const nativeResponseValue = wasm.TS_ChannelTransactionParameters_set_funding_outpoint(this_ptr, val);
18934                 // debug statements here
18935         }
18936         // enum LDKCOption_NoneZ ChannelTransactionParameters_get_opt_anchors(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
18937         export function ChannelTransactionParameters_get_opt_anchors(this_ptr: number): COption_NoneZ {
18938                 if(!isWasmInitialized) {
18939                         throw new Error("initializeWasm() must be awaited first!");
18940                 }
18941                 const nativeResponseValue = wasm.TS_ChannelTransactionParameters_get_opt_anchors(this_ptr);
18942                 return nativeResponseValue;
18943         }
18944         // void ChannelTransactionParameters_set_opt_anchors(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, enum LDKCOption_NoneZ val);
18945         export function ChannelTransactionParameters_set_opt_anchors(this_ptr: number, val: COption_NoneZ): void {
18946                 if(!isWasmInitialized) {
18947                         throw new Error("initializeWasm() must be awaited first!");
18948                 }
18949                 const nativeResponseValue = wasm.TS_ChannelTransactionParameters_set_opt_anchors(this_ptr, val);
18950                 // debug statements here
18951         }
18952         // MUST_USE_RES struct LDKChannelTransactionParameters ChannelTransactionParameters_new(struct LDKChannelPublicKeys holder_pubkeys_arg, uint16_t holder_selected_contest_delay_arg, bool is_outbound_from_holder_arg, struct LDKCounterpartyChannelTransactionParameters counterparty_parameters_arg, struct LDKOutPoint funding_outpoint_arg, enum LDKCOption_NoneZ opt_anchors_arg);
18953         export function ChannelTransactionParameters_new(holder_pubkeys_arg: number, holder_selected_contest_delay_arg: number, is_outbound_from_holder_arg: boolean, counterparty_parameters_arg: number, funding_outpoint_arg: number, opt_anchors_arg: COption_NoneZ): number {
18954                 if(!isWasmInitialized) {
18955                         throw new Error("initializeWasm() must be awaited first!");
18956                 }
18957                 const nativeResponseValue = wasm.TS_ChannelTransactionParameters_new(holder_pubkeys_arg, holder_selected_contest_delay_arg, is_outbound_from_holder_arg, counterparty_parameters_arg, funding_outpoint_arg, opt_anchors_arg);
18958                 return nativeResponseValue;
18959         }
18960         // uint64_t ChannelTransactionParameters_clone_ptr(LDKChannelTransactionParameters *NONNULL_PTR arg);
18961         export function ChannelTransactionParameters_clone_ptr(arg: number): number {
18962                 if(!isWasmInitialized) {
18963                         throw new Error("initializeWasm() must be awaited first!");
18964                 }
18965                 const nativeResponseValue = wasm.TS_ChannelTransactionParameters_clone_ptr(arg);
18966                 return nativeResponseValue;
18967         }
18968         // struct LDKChannelTransactionParameters ChannelTransactionParameters_clone(const struct LDKChannelTransactionParameters *NONNULL_PTR orig);
18969         export function ChannelTransactionParameters_clone(orig: number): number {
18970                 if(!isWasmInitialized) {
18971                         throw new Error("initializeWasm() must be awaited first!");
18972                 }
18973                 const nativeResponseValue = wasm.TS_ChannelTransactionParameters_clone(orig);
18974                 return nativeResponseValue;
18975         }
18976         // void CounterpartyChannelTransactionParameters_free(struct LDKCounterpartyChannelTransactionParameters this_obj);
18977         export function CounterpartyChannelTransactionParameters_free(this_obj: number): void {
18978                 if(!isWasmInitialized) {
18979                         throw new Error("initializeWasm() must be awaited first!");
18980                 }
18981                 const nativeResponseValue = wasm.TS_CounterpartyChannelTransactionParameters_free(this_obj);
18982                 // debug statements here
18983         }
18984         // struct LDKChannelPublicKeys CounterpartyChannelTransactionParameters_get_pubkeys(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
18985         export function CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr: number): number {
18986                 if(!isWasmInitialized) {
18987                         throw new Error("initializeWasm() must be awaited first!");
18988                 }
18989                 const nativeResponseValue = wasm.TS_CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr);
18990                 return nativeResponseValue;
18991         }
18992         // void CounterpartyChannelTransactionParameters_set_pubkeys(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
18993         export function CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr: number, val: number): void {
18994                 if(!isWasmInitialized) {
18995                         throw new Error("initializeWasm() must be awaited first!");
18996                 }
18997                 const nativeResponseValue = wasm.TS_CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr, val);
18998                 // debug statements here
18999         }
19000         // uint16_t CounterpartyChannelTransactionParameters_get_selected_contest_delay(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
19001         export function CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr: number): number {
19002                 if(!isWasmInitialized) {
19003                         throw new Error("initializeWasm() must be awaited first!");
19004                 }
19005                 const nativeResponseValue = wasm.TS_CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr);
19006                 return nativeResponseValue;
19007         }
19008         // void CounterpartyChannelTransactionParameters_set_selected_contest_delay(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
19009         export function CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr: number, val: number): void {
19010                 if(!isWasmInitialized) {
19011                         throw new Error("initializeWasm() must be awaited first!");
19012                 }
19013                 const nativeResponseValue = wasm.TS_CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr, val);
19014                 // debug statements here
19015         }
19016         // MUST_USE_RES struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_new(struct LDKChannelPublicKeys pubkeys_arg, uint16_t selected_contest_delay_arg);
19017         export function CounterpartyChannelTransactionParameters_new(pubkeys_arg: number, selected_contest_delay_arg: number): number {
19018                 if(!isWasmInitialized) {
19019                         throw new Error("initializeWasm() must be awaited first!");
19020                 }
19021                 const nativeResponseValue = wasm.TS_CounterpartyChannelTransactionParameters_new(pubkeys_arg, selected_contest_delay_arg);
19022                 return nativeResponseValue;
19023         }
19024         // uint64_t CounterpartyChannelTransactionParameters_clone_ptr(LDKCounterpartyChannelTransactionParameters *NONNULL_PTR arg);
19025         export function CounterpartyChannelTransactionParameters_clone_ptr(arg: number): number {
19026                 if(!isWasmInitialized) {
19027                         throw new Error("initializeWasm() must be awaited first!");
19028                 }
19029                 const nativeResponseValue = wasm.TS_CounterpartyChannelTransactionParameters_clone_ptr(arg);
19030                 return nativeResponseValue;
19031         }
19032         // struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_clone(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR orig);
19033         export function CounterpartyChannelTransactionParameters_clone(orig: number): number {
19034                 if(!isWasmInitialized) {
19035                         throw new Error("initializeWasm() must be awaited first!");
19036                 }
19037                 const nativeResponseValue = wasm.TS_CounterpartyChannelTransactionParameters_clone(orig);
19038                 return nativeResponseValue;
19039         }
19040         // MUST_USE_RES bool ChannelTransactionParameters_is_populated(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
19041         export function ChannelTransactionParameters_is_populated(this_arg: number): boolean {
19042                 if(!isWasmInitialized) {
19043                         throw new Error("initializeWasm() must be awaited first!");
19044                 }
19045                 const nativeResponseValue = wasm.TS_ChannelTransactionParameters_is_populated(this_arg);
19046                 return nativeResponseValue;
19047         }
19048         // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_holder_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
19049         export function ChannelTransactionParameters_as_holder_broadcastable(this_arg: number): number {
19050                 if(!isWasmInitialized) {
19051                         throw new Error("initializeWasm() must be awaited first!");
19052                 }
19053                 const nativeResponseValue = wasm.TS_ChannelTransactionParameters_as_holder_broadcastable(this_arg);
19054                 return nativeResponseValue;
19055         }
19056         // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_counterparty_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
19057         export function ChannelTransactionParameters_as_counterparty_broadcastable(this_arg: number): number {
19058                 if(!isWasmInitialized) {
19059                         throw new Error("initializeWasm() must be awaited first!");
19060                 }
19061                 const nativeResponseValue = wasm.TS_ChannelTransactionParameters_as_counterparty_broadcastable(this_arg);
19062                 return nativeResponseValue;
19063         }
19064         // struct LDKCVec_u8Z CounterpartyChannelTransactionParameters_write(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR obj);
19065         export function CounterpartyChannelTransactionParameters_write(obj: number): Uint8Array {
19066                 if(!isWasmInitialized) {
19067                         throw new Error("initializeWasm() must be awaited first!");
19068                 }
19069                 const nativeResponseValue = wasm.TS_CounterpartyChannelTransactionParameters_write(obj);
19070                 return decodeUint8Array(nativeResponseValue);
19071         }
19072         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CounterpartyChannelTransactionParameters_read(struct LDKu8slice ser);
19073         export function CounterpartyChannelTransactionParameters_read(ser: Uint8Array): number {
19074                 if(!isWasmInitialized) {
19075                         throw new Error("initializeWasm() must be awaited first!");
19076                 }
19077                 const nativeResponseValue = wasm.TS_CounterpartyChannelTransactionParameters_read(encodeUint8Array(ser));
19078                 return nativeResponseValue;
19079         }
19080         // struct LDKCVec_u8Z ChannelTransactionParameters_write(const struct LDKChannelTransactionParameters *NONNULL_PTR obj);
19081         export function ChannelTransactionParameters_write(obj: number): Uint8Array {
19082                 if(!isWasmInitialized) {
19083                         throw new Error("initializeWasm() must be awaited first!");
19084                 }
19085                 const nativeResponseValue = wasm.TS_ChannelTransactionParameters_write(obj);
19086                 return decodeUint8Array(nativeResponseValue);
19087         }
19088         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ ChannelTransactionParameters_read(struct LDKu8slice ser);
19089         export function ChannelTransactionParameters_read(ser: Uint8Array): number {
19090                 if(!isWasmInitialized) {
19091                         throw new Error("initializeWasm() must be awaited first!");
19092                 }
19093                 const nativeResponseValue = wasm.TS_ChannelTransactionParameters_read(encodeUint8Array(ser));
19094                 return nativeResponseValue;
19095         }
19096         // void DirectedChannelTransactionParameters_free(struct LDKDirectedChannelTransactionParameters this_obj);
19097         export function DirectedChannelTransactionParameters_free(this_obj: number): void {
19098                 if(!isWasmInitialized) {
19099                         throw new Error("initializeWasm() must be awaited first!");
19100                 }
19101                 const nativeResponseValue = wasm.TS_DirectedChannelTransactionParameters_free(this_obj);
19102                 // debug statements here
19103         }
19104         // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_broadcaster_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
19105         export function DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg: number): number {
19106                 if(!isWasmInitialized) {
19107                         throw new Error("initializeWasm() must be awaited first!");
19108                 }
19109                 const nativeResponseValue = wasm.TS_DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg);
19110                 return nativeResponseValue;
19111         }
19112         // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_countersignatory_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
19113         export function DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg: number): number {
19114                 if(!isWasmInitialized) {
19115                         throw new Error("initializeWasm() must be awaited first!");
19116                 }
19117                 const nativeResponseValue = wasm.TS_DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg);
19118                 return nativeResponseValue;
19119         }
19120         // MUST_USE_RES uint16_t DirectedChannelTransactionParameters_contest_delay(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
19121         export function DirectedChannelTransactionParameters_contest_delay(this_arg: number): number {
19122                 if(!isWasmInitialized) {
19123                         throw new Error("initializeWasm() must be awaited first!");
19124                 }
19125                 const nativeResponseValue = wasm.TS_DirectedChannelTransactionParameters_contest_delay(this_arg);
19126                 return nativeResponseValue;
19127         }
19128         // MUST_USE_RES bool DirectedChannelTransactionParameters_is_outbound(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
19129         export function DirectedChannelTransactionParameters_is_outbound(this_arg: number): boolean {
19130                 if(!isWasmInitialized) {
19131                         throw new Error("initializeWasm() must be awaited first!");
19132                 }
19133                 const nativeResponseValue = wasm.TS_DirectedChannelTransactionParameters_is_outbound(this_arg);
19134                 return nativeResponseValue;
19135         }
19136         // MUST_USE_RES struct LDKOutPoint DirectedChannelTransactionParameters_funding_outpoint(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
19137         export function DirectedChannelTransactionParameters_funding_outpoint(this_arg: number): number {
19138                 if(!isWasmInitialized) {
19139                         throw new Error("initializeWasm() must be awaited first!");
19140                 }
19141                 const nativeResponseValue = wasm.TS_DirectedChannelTransactionParameters_funding_outpoint(this_arg);
19142                 return nativeResponseValue;
19143         }
19144         // MUST_USE_RES bool DirectedChannelTransactionParameters_opt_anchors(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
19145         export function DirectedChannelTransactionParameters_opt_anchors(this_arg: number): boolean {
19146                 if(!isWasmInitialized) {
19147                         throw new Error("initializeWasm() must be awaited first!");
19148                 }
19149                 const nativeResponseValue = wasm.TS_DirectedChannelTransactionParameters_opt_anchors(this_arg);
19150                 return nativeResponseValue;
19151         }
19152         // void HolderCommitmentTransaction_free(struct LDKHolderCommitmentTransaction this_obj);
19153         export function HolderCommitmentTransaction_free(this_obj: number): void {
19154                 if(!isWasmInitialized) {
19155                         throw new Error("initializeWasm() must be awaited first!");
19156                 }
19157                 const nativeResponseValue = wasm.TS_HolderCommitmentTransaction_free(this_obj);
19158                 // debug statements here
19159         }
19160         // struct LDKSignature HolderCommitmentTransaction_get_counterparty_sig(const struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr);
19161         export function HolderCommitmentTransaction_get_counterparty_sig(this_ptr: number): Uint8Array {
19162                 if(!isWasmInitialized) {
19163                         throw new Error("initializeWasm() must be awaited first!");
19164                 }
19165                 const nativeResponseValue = wasm.TS_HolderCommitmentTransaction_get_counterparty_sig(this_ptr);
19166                 return decodeUint8Array(nativeResponseValue);
19167         }
19168         // void HolderCommitmentTransaction_set_counterparty_sig(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKSignature val);
19169         export function HolderCommitmentTransaction_set_counterparty_sig(this_ptr: number, val: Uint8Array): void {
19170                 if(!isWasmInitialized) {
19171                         throw new Error("initializeWasm() must be awaited first!");
19172                 }
19173                 const nativeResponseValue = wasm.TS_HolderCommitmentTransaction_set_counterparty_sig(this_ptr, encodeUint8Array(val));
19174                 // debug statements here
19175         }
19176         // void HolderCommitmentTransaction_set_counterparty_htlc_sigs(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
19177         export function HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr: number, val: Uint8Array[]): void {
19178                 if(!isWasmInitialized) {
19179                         throw new Error("initializeWasm() must be awaited first!");
19180                 }
19181                 const nativeResponseValue = wasm.TS_HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr, val);
19182                 // debug statements here
19183         }
19184         // uint64_t HolderCommitmentTransaction_clone_ptr(LDKHolderCommitmentTransaction *NONNULL_PTR arg);
19185         export function HolderCommitmentTransaction_clone_ptr(arg: number): number {
19186                 if(!isWasmInitialized) {
19187                         throw new Error("initializeWasm() must be awaited first!");
19188                 }
19189                 const nativeResponseValue = wasm.TS_HolderCommitmentTransaction_clone_ptr(arg);
19190                 return nativeResponseValue;
19191         }
19192         // struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_clone(const struct LDKHolderCommitmentTransaction *NONNULL_PTR orig);
19193         export function HolderCommitmentTransaction_clone(orig: number): number {
19194                 if(!isWasmInitialized) {
19195                         throw new Error("initializeWasm() must be awaited first!");
19196                 }
19197                 const nativeResponseValue = wasm.TS_HolderCommitmentTransaction_clone(orig);
19198                 return nativeResponseValue;
19199         }
19200         // struct LDKCVec_u8Z HolderCommitmentTransaction_write(const struct LDKHolderCommitmentTransaction *NONNULL_PTR obj);
19201         export function HolderCommitmentTransaction_write(obj: number): Uint8Array {
19202                 if(!isWasmInitialized) {
19203                         throw new Error("initializeWasm() must be awaited first!");
19204                 }
19205                 const nativeResponseValue = wasm.TS_HolderCommitmentTransaction_write(obj);
19206                 return decodeUint8Array(nativeResponseValue);
19207         }
19208         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ HolderCommitmentTransaction_read(struct LDKu8slice ser);
19209         export function HolderCommitmentTransaction_read(ser: Uint8Array): number {
19210                 if(!isWasmInitialized) {
19211                         throw new Error("initializeWasm() must be awaited first!");
19212                 }
19213                 const nativeResponseValue = wasm.TS_HolderCommitmentTransaction_read(encodeUint8Array(ser));
19214                 return nativeResponseValue;
19215         }
19216         // 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);
19217         export function HolderCommitmentTransaction_new(commitment_tx: number, counterparty_sig: Uint8Array, counterparty_htlc_sigs: Uint8Array[], holder_funding_key: Uint8Array, counterparty_funding_key: Uint8Array): number {
19218                 if(!isWasmInitialized) {
19219                         throw new Error("initializeWasm() must be awaited first!");
19220                 }
19221                 const nativeResponseValue = wasm.TS_HolderCommitmentTransaction_new(commitment_tx, encodeUint8Array(counterparty_sig), counterparty_htlc_sigs, encodeUint8Array(holder_funding_key), encodeUint8Array(counterparty_funding_key));
19222                 return nativeResponseValue;
19223         }
19224         // void BuiltCommitmentTransaction_free(struct LDKBuiltCommitmentTransaction this_obj);
19225         export function BuiltCommitmentTransaction_free(this_obj: number): void {
19226                 if(!isWasmInitialized) {
19227                         throw new Error("initializeWasm() must be awaited first!");
19228                 }
19229                 const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_free(this_obj);
19230                 // debug statements here
19231         }
19232         // struct LDKTransaction BuiltCommitmentTransaction_get_transaction(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr);
19233         export function BuiltCommitmentTransaction_get_transaction(this_ptr: number): Uint8Array {
19234                 if(!isWasmInitialized) {
19235                         throw new Error("initializeWasm() must be awaited first!");
19236                 }
19237                 const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_get_transaction(this_ptr);
19238                 return decodeUint8Array(nativeResponseValue);
19239         }
19240         // void BuiltCommitmentTransaction_set_transaction(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKTransaction val);
19241         export function BuiltCommitmentTransaction_set_transaction(this_ptr: number, val: Uint8Array): void {
19242                 if(!isWasmInitialized) {
19243                         throw new Error("initializeWasm() must be awaited first!");
19244                 }
19245                 const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_set_transaction(this_ptr, encodeUint8Array(val));
19246                 // debug statements here
19247         }
19248         // const uint8_t (*BuiltCommitmentTransaction_get_txid(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr))[32];
19249         export function BuiltCommitmentTransaction_get_txid(this_ptr: number): Uint8Array {
19250                 if(!isWasmInitialized) {
19251                         throw new Error("initializeWasm() must be awaited first!");
19252                 }
19253                 const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_get_txid(this_ptr);
19254                 return decodeUint8Array(nativeResponseValue);
19255         }
19256         // void BuiltCommitmentTransaction_set_txid(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
19257         export function BuiltCommitmentTransaction_set_txid(this_ptr: number, val: Uint8Array): void {
19258                 if(!isWasmInitialized) {
19259                         throw new Error("initializeWasm() must be awaited first!");
19260                 }
19261                 const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_set_txid(this_ptr, encodeUint8Array(val));
19262                 // debug statements here
19263         }
19264         // MUST_USE_RES struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_new(struct LDKTransaction transaction_arg, struct LDKThirtyTwoBytes txid_arg);
19265         export function BuiltCommitmentTransaction_new(transaction_arg: Uint8Array, txid_arg: Uint8Array): number {
19266                 if(!isWasmInitialized) {
19267                         throw new Error("initializeWasm() must be awaited first!");
19268                 }
19269                 const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_new(encodeUint8Array(transaction_arg), encodeUint8Array(txid_arg));
19270                 return nativeResponseValue;
19271         }
19272         // uint64_t BuiltCommitmentTransaction_clone_ptr(LDKBuiltCommitmentTransaction *NONNULL_PTR arg);
19273         export function BuiltCommitmentTransaction_clone_ptr(arg: number): number {
19274                 if(!isWasmInitialized) {
19275                         throw new Error("initializeWasm() must be awaited first!");
19276                 }
19277                 const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_clone_ptr(arg);
19278                 return nativeResponseValue;
19279         }
19280         // struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_clone(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR orig);
19281         export function BuiltCommitmentTransaction_clone(orig: number): number {
19282                 if(!isWasmInitialized) {
19283                         throw new Error("initializeWasm() must be awaited first!");
19284                 }
19285                 const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_clone(orig);
19286                 return nativeResponseValue;
19287         }
19288         // struct LDKCVec_u8Z BuiltCommitmentTransaction_write(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR obj);
19289         export function BuiltCommitmentTransaction_write(obj: number): Uint8Array {
19290                 if(!isWasmInitialized) {
19291                         throw new Error("initializeWasm() must be awaited first!");
19292                 }
19293                 const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_write(obj);
19294                 return decodeUint8Array(nativeResponseValue);
19295         }
19296         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ BuiltCommitmentTransaction_read(struct LDKu8slice ser);
19297         export function BuiltCommitmentTransaction_read(ser: Uint8Array): number {
19298                 if(!isWasmInitialized) {
19299                         throw new Error("initializeWasm() must be awaited first!");
19300                 }
19301                 const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_read(encodeUint8Array(ser));
19302                 return nativeResponseValue;
19303         }
19304         // 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);
19305         export function BuiltCommitmentTransaction_get_sighash_all(this_arg: number, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
19306                 if(!isWasmInitialized) {
19307                         throw new Error("initializeWasm() must be awaited first!");
19308                 }
19309                 const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_get_sighash_all(this_arg, encodeUint8Array(funding_redeemscript), channel_value_satoshis);
19310                 return decodeUint8Array(nativeResponseValue);
19311         }
19312         // 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);
19313         export function BuiltCommitmentTransaction_sign(this_arg: number, funding_key: Uint8Array, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
19314                 if(!isWasmInitialized) {
19315                         throw new Error("initializeWasm() must be awaited first!");
19316                 }
19317                 const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_sign(this_arg, encodeUint8Array(funding_key), encodeUint8Array(funding_redeemscript), channel_value_satoshis);
19318                 return decodeUint8Array(nativeResponseValue);
19319         }
19320         // void ClosingTransaction_free(struct LDKClosingTransaction this_obj);
19321         export function ClosingTransaction_free(this_obj: number): void {
19322                 if(!isWasmInitialized) {
19323                         throw new Error("initializeWasm() must be awaited first!");
19324                 }
19325                 const nativeResponseValue = wasm.TS_ClosingTransaction_free(this_obj);
19326                 // debug statements here
19327         }
19328         // uint64_t ClosingTransaction_clone_ptr(LDKClosingTransaction *NONNULL_PTR arg);
19329         export function ClosingTransaction_clone_ptr(arg: number): number {
19330                 if(!isWasmInitialized) {
19331                         throw new Error("initializeWasm() must be awaited first!");
19332                 }
19333                 const nativeResponseValue = wasm.TS_ClosingTransaction_clone_ptr(arg);
19334                 return nativeResponseValue;
19335         }
19336         // struct LDKClosingTransaction ClosingTransaction_clone(const struct LDKClosingTransaction *NONNULL_PTR orig);
19337         export function ClosingTransaction_clone(orig: number): number {
19338                 if(!isWasmInitialized) {
19339                         throw new Error("initializeWasm() must be awaited first!");
19340                 }
19341                 const nativeResponseValue = wasm.TS_ClosingTransaction_clone(orig);
19342                 return nativeResponseValue;
19343         }
19344         // uint64_t ClosingTransaction_hash(const struct LDKClosingTransaction *NONNULL_PTR o);
19345         export function ClosingTransaction_hash(o: number): number {
19346                 if(!isWasmInitialized) {
19347                         throw new Error("initializeWasm() must be awaited first!");
19348                 }
19349                 const nativeResponseValue = wasm.TS_ClosingTransaction_hash(o);
19350                 return nativeResponseValue;
19351         }
19352         // MUST_USE_RES struct LDKClosingTransaction ClosingTransaction_new(uint64_t to_holder_value_sat, uint64_t to_counterparty_value_sat, struct LDKCVec_u8Z to_holder_script, struct LDKCVec_u8Z to_counterparty_script, struct LDKOutPoint funding_outpoint);
19353         export function ClosingTransaction_new(to_holder_value_sat: number, to_counterparty_value_sat: number, to_holder_script: Uint8Array, to_counterparty_script: Uint8Array, funding_outpoint: number): number {
19354                 if(!isWasmInitialized) {
19355                         throw new Error("initializeWasm() must be awaited first!");
19356                 }
19357                 const nativeResponseValue = wasm.TS_ClosingTransaction_new(to_holder_value_sat, to_counterparty_value_sat, encodeUint8Array(to_holder_script), encodeUint8Array(to_counterparty_script), funding_outpoint);
19358                 return nativeResponseValue;
19359         }
19360         // MUST_USE_RES struct LDKTrustedClosingTransaction ClosingTransaction_trust(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
19361         export function ClosingTransaction_trust(this_arg: number): number {
19362                 if(!isWasmInitialized) {
19363                         throw new Error("initializeWasm() must be awaited first!");
19364                 }
19365                 const nativeResponseValue = wasm.TS_ClosingTransaction_trust(this_arg);
19366                 return nativeResponseValue;
19367         }
19368         // MUST_USE_RES struct LDKCResult_TrustedClosingTransactionNoneZ ClosingTransaction_verify(const struct LDKClosingTransaction *NONNULL_PTR this_arg, struct LDKOutPoint funding_outpoint);
19369         export function ClosingTransaction_verify(this_arg: number, funding_outpoint: number): number {
19370                 if(!isWasmInitialized) {
19371                         throw new Error("initializeWasm() must be awaited first!");
19372                 }
19373                 const nativeResponseValue = wasm.TS_ClosingTransaction_verify(this_arg, funding_outpoint);
19374                 return nativeResponseValue;
19375         }
19376         // MUST_USE_RES uint64_t ClosingTransaction_to_holder_value_sat(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
19377         export function ClosingTransaction_to_holder_value_sat(this_arg: number): number {
19378                 if(!isWasmInitialized) {
19379                         throw new Error("initializeWasm() must be awaited first!");
19380                 }
19381                 const nativeResponseValue = wasm.TS_ClosingTransaction_to_holder_value_sat(this_arg);
19382                 return nativeResponseValue;
19383         }
19384         // MUST_USE_RES uint64_t ClosingTransaction_to_counterparty_value_sat(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
19385         export function ClosingTransaction_to_counterparty_value_sat(this_arg: number): number {
19386                 if(!isWasmInitialized) {
19387                         throw new Error("initializeWasm() must be awaited first!");
19388                 }
19389                 const nativeResponseValue = wasm.TS_ClosingTransaction_to_counterparty_value_sat(this_arg);
19390                 return nativeResponseValue;
19391         }
19392         // MUST_USE_RES struct LDKu8slice ClosingTransaction_to_holder_script(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
19393         export function ClosingTransaction_to_holder_script(this_arg: number): Uint8Array {
19394                 if(!isWasmInitialized) {
19395                         throw new Error("initializeWasm() must be awaited first!");
19396                 }
19397                 const nativeResponseValue = wasm.TS_ClosingTransaction_to_holder_script(this_arg);
19398                 return decodeUint8Array(nativeResponseValue);
19399         }
19400         // MUST_USE_RES struct LDKu8slice ClosingTransaction_to_counterparty_script(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
19401         export function ClosingTransaction_to_counterparty_script(this_arg: number): Uint8Array {
19402                 if(!isWasmInitialized) {
19403                         throw new Error("initializeWasm() must be awaited first!");
19404                 }
19405                 const nativeResponseValue = wasm.TS_ClosingTransaction_to_counterparty_script(this_arg);
19406                 return decodeUint8Array(nativeResponseValue);
19407         }
19408         // void TrustedClosingTransaction_free(struct LDKTrustedClosingTransaction this_obj);
19409         export function TrustedClosingTransaction_free(this_obj: number): void {
19410                 if(!isWasmInitialized) {
19411                         throw new Error("initializeWasm() must be awaited first!");
19412                 }
19413                 const nativeResponseValue = wasm.TS_TrustedClosingTransaction_free(this_obj);
19414                 // debug statements here
19415         }
19416         // MUST_USE_RES struct LDKTransaction TrustedClosingTransaction_built_transaction(const struct LDKTrustedClosingTransaction *NONNULL_PTR this_arg);
19417         export function TrustedClosingTransaction_built_transaction(this_arg: number): Uint8Array {
19418                 if(!isWasmInitialized) {
19419                         throw new Error("initializeWasm() must be awaited first!");
19420                 }
19421                 const nativeResponseValue = wasm.TS_TrustedClosingTransaction_built_transaction(this_arg);
19422                 return decodeUint8Array(nativeResponseValue);
19423         }
19424         // MUST_USE_RES struct LDKThirtyTwoBytes TrustedClosingTransaction_get_sighash_all(const struct LDKTrustedClosingTransaction *NONNULL_PTR this_arg, struct LDKu8slice funding_redeemscript, uint64_t channel_value_satoshis);
19425         export function TrustedClosingTransaction_get_sighash_all(this_arg: number, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
19426                 if(!isWasmInitialized) {
19427                         throw new Error("initializeWasm() must be awaited first!");
19428                 }
19429                 const nativeResponseValue = wasm.TS_TrustedClosingTransaction_get_sighash_all(this_arg, encodeUint8Array(funding_redeemscript), channel_value_satoshis);
19430                 return decodeUint8Array(nativeResponseValue);
19431         }
19432         // MUST_USE_RES struct LDKSignature TrustedClosingTransaction_sign(const struct LDKTrustedClosingTransaction *NONNULL_PTR this_arg, const uint8_t (*funding_key)[32], struct LDKu8slice funding_redeemscript, uint64_t channel_value_satoshis);
19433         export function TrustedClosingTransaction_sign(this_arg: number, funding_key: Uint8Array, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
19434                 if(!isWasmInitialized) {
19435                         throw new Error("initializeWasm() must be awaited first!");
19436                 }
19437                 const nativeResponseValue = wasm.TS_TrustedClosingTransaction_sign(this_arg, encodeUint8Array(funding_key), encodeUint8Array(funding_redeemscript), channel_value_satoshis);
19438                 return decodeUint8Array(nativeResponseValue);
19439         }
19440         // void CommitmentTransaction_free(struct LDKCommitmentTransaction this_obj);
19441         export function CommitmentTransaction_free(this_obj: number): void {
19442                 if(!isWasmInitialized) {
19443                         throw new Error("initializeWasm() must be awaited first!");
19444                 }
19445                 const nativeResponseValue = wasm.TS_CommitmentTransaction_free(this_obj);
19446                 // debug statements here
19447         }
19448         // uint64_t CommitmentTransaction_clone_ptr(LDKCommitmentTransaction *NONNULL_PTR arg);
19449         export function CommitmentTransaction_clone_ptr(arg: number): number {
19450                 if(!isWasmInitialized) {
19451                         throw new Error("initializeWasm() must be awaited first!");
19452                 }
19453                 const nativeResponseValue = wasm.TS_CommitmentTransaction_clone_ptr(arg);
19454                 return nativeResponseValue;
19455         }
19456         // struct LDKCommitmentTransaction CommitmentTransaction_clone(const struct LDKCommitmentTransaction *NONNULL_PTR orig);
19457         export function CommitmentTransaction_clone(orig: number): number {
19458                 if(!isWasmInitialized) {
19459                         throw new Error("initializeWasm() must be awaited first!");
19460                 }
19461                 const nativeResponseValue = wasm.TS_CommitmentTransaction_clone(orig);
19462                 return nativeResponseValue;
19463         }
19464         // struct LDKCVec_u8Z CommitmentTransaction_write(const struct LDKCommitmentTransaction *NONNULL_PTR obj);
19465         export function CommitmentTransaction_write(obj: number): Uint8Array {
19466                 if(!isWasmInitialized) {
19467                         throw new Error("initializeWasm() must be awaited first!");
19468                 }
19469                 const nativeResponseValue = wasm.TS_CommitmentTransaction_write(obj);
19470                 return decodeUint8Array(nativeResponseValue);
19471         }
19472         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CommitmentTransaction_read(struct LDKu8slice ser);
19473         export function CommitmentTransaction_read(ser: Uint8Array): number {
19474                 if(!isWasmInitialized) {
19475                         throw new Error("initializeWasm() must be awaited first!");
19476                 }
19477                 const nativeResponseValue = wasm.TS_CommitmentTransaction_read(encodeUint8Array(ser));
19478                 return nativeResponseValue;
19479         }
19480         // MUST_USE_RES uint64_t CommitmentTransaction_commitment_number(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
19481         export function CommitmentTransaction_commitment_number(this_arg: number): number {
19482                 if(!isWasmInitialized) {
19483                         throw new Error("initializeWasm() must be awaited first!");
19484                 }
19485                 const nativeResponseValue = wasm.TS_CommitmentTransaction_commitment_number(this_arg);
19486                 return nativeResponseValue;
19487         }
19488         // MUST_USE_RES uint64_t CommitmentTransaction_to_broadcaster_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
19489         export function CommitmentTransaction_to_broadcaster_value_sat(this_arg: number): number {
19490                 if(!isWasmInitialized) {
19491                         throw new Error("initializeWasm() must be awaited first!");
19492                 }
19493                 const nativeResponseValue = wasm.TS_CommitmentTransaction_to_broadcaster_value_sat(this_arg);
19494                 return nativeResponseValue;
19495         }
19496         // MUST_USE_RES uint64_t CommitmentTransaction_to_countersignatory_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
19497         export function CommitmentTransaction_to_countersignatory_value_sat(this_arg: number): number {
19498                 if(!isWasmInitialized) {
19499                         throw new Error("initializeWasm() must be awaited first!");
19500                 }
19501                 const nativeResponseValue = wasm.TS_CommitmentTransaction_to_countersignatory_value_sat(this_arg);
19502                 return nativeResponseValue;
19503         }
19504         // MUST_USE_RES uint32_t CommitmentTransaction_feerate_per_kw(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
19505         export function CommitmentTransaction_feerate_per_kw(this_arg: number): number {
19506                 if(!isWasmInitialized) {
19507                         throw new Error("initializeWasm() must be awaited first!");
19508                 }
19509                 const nativeResponseValue = wasm.TS_CommitmentTransaction_feerate_per_kw(this_arg);
19510                 return nativeResponseValue;
19511         }
19512         // MUST_USE_RES struct LDKTrustedCommitmentTransaction CommitmentTransaction_trust(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
19513         export function CommitmentTransaction_trust(this_arg: number): number {
19514                 if(!isWasmInitialized) {
19515                         throw new Error("initializeWasm() must be awaited first!");
19516                 }
19517                 const nativeResponseValue = wasm.TS_CommitmentTransaction_trust(this_arg);
19518                 return nativeResponseValue;
19519         }
19520         // 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);
19521         export function CommitmentTransaction_verify(this_arg: number, channel_parameters: number, broadcaster_keys: number, countersignatory_keys: number): number {
19522                 if(!isWasmInitialized) {
19523                         throw new Error("initializeWasm() must be awaited first!");
19524                 }
19525                 const nativeResponseValue = wasm.TS_CommitmentTransaction_verify(this_arg, channel_parameters, broadcaster_keys, countersignatory_keys);
19526                 return nativeResponseValue;
19527         }
19528         // void TrustedCommitmentTransaction_free(struct LDKTrustedCommitmentTransaction this_obj);
19529         export function TrustedCommitmentTransaction_free(this_obj: number): void {
19530                 if(!isWasmInitialized) {
19531                         throw new Error("initializeWasm() must be awaited first!");
19532                 }
19533                 const nativeResponseValue = wasm.TS_TrustedCommitmentTransaction_free(this_obj);
19534                 // debug statements here
19535         }
19536         // MUST_USE_RES struct LDKThirtyTwoBytes TrustedCommitmentTransaction_txid(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
19537         export function TrustedCommitmentTransaction_txid(this_arg: number): Uint8Array {
19538                 if(!isWasmInitialized) {
19539                         throw new Error("initializeWasm() must be awaited first!");
19540                 }
19541                 const nativeResponseValue = wasm.TS_TrustedCommitmentTransaction_txid(this_arg);
19542                 return decodeUint8Array(nativeResponseValue);
19543         }
19544         // MUST_USE_RES struct LDKBuiltCommitmentTransaction TrustedCommitmentTransaction_built_transaction(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
19545         export function TrustedCommitmentTransaction_built_transaction(this_arg: number): number {
19546                 if(!isWasmInitialized) {
19547                         throw new Error("initializeWasm() must be awaited first!");
19548                 }
19549                 const nativeResponseValue = wasm.TS_TrustedCommitmentTransaction_built_transaction(this_arg);
19550                 return nativeResponseValue;
19551         }
19552         // MUST_USE_RES struct LDKTxCreationKeys TrustedCommitmentTransaction_keys(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
19553         export function TrustedCommitmentTransaction_keys(this_arg: number): number {
19554                 if(!isWasmInitialized) {
19555                         throw new Error("initializeWasm() must be awaited first!");
19556                 }
19557                 const nativeResponseValue = wasm.TS_TrustedCommitmentTransaction_keys(this_arg);
19558                 return nativeResponseValue;
19559         }
19560         // MUST_USE_RES bool TrustedCommitmentTransaction_opt_anchors(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
19561         export function TrustedCommitmentTransaction_opt_anchors(this_arg: number): boolean {
19562                 if(!isWasmInitialized) {
19563                         throw new Error("initializeWasm() must be awaited first!");
19564                 }
19565                 const nativeResponseValue = wasm.TS_TrustedCommitmentTransaction_opt_anchors(this_arg);
19566                 return nativeResponseValue;
19567         }
19568         // 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);
19569         export function TrustedCommitmentTransaction_get_htlc_sigs(this_arg: number, htlc_base_key: Uint8Array, channel_parameters: number): number {
19570                 if(!isWasmInitialized) {
19571                         throw new Error("initializeWasm() must be awaited first!");
19572                 }
19573                 const nativeResponseValue = wasm.TS_TrustedCommitmentTransaction_get_htlc_sigs(this_arg, encodeUint8Array(htlc_base_key), channel_parameters);
19574                 return nativeResponseValue;
19575         }
19576         // uint64_t get_commitment_transaction_number_obscure_factor(struct LDKPublicKey broadcaster_payment_basepoint, struct LDKPublicKey countersignatory_payment_basepoint, bool outbound_from_broadcaster);
19577         export function get_commitment_transaction_number_obscure_factor(broadcaster_payment_basepoint: Uint8Array, countersignatory_payment_basepoint: Uint8Array, outbound_from_broadcaster: boolean): number {
19578                 if(!isWasmInitialized) {
19579                         throw new Error("initializeWasm() must be awaited first!");
19580                 }
19581                 const nativeResponseValue = wasm.TS_get_commitment_transaction_number_obscure_factor(encodeUint8Array(broadcaster_payment_basepoint), encodeUint8Array(countersignatory_payment_basepoint), outbound_from_broadcaster);
19582                 return nativeResponseValue;
19583         }
19584         // bool InitFeatures_eq(const struct LDKInitFeatures *NONNULL_PTR a, const struct LDKInitFeatures *NONNULL_PTR b);
19585         export function InitFeatures_eq(a: number, b: number): boolean {
19586                 if(!isWasmInitialized) {
19587                         throw new Error("initializeWasm() must be awaited first!");
19588                 }
19589                 const nativeResponseValue = wasm.TS_InitFeatures_eq(a, b);
19590                 return nativeResponseValue;
19591         }
19592         // bool NodeFeatures_eq(const struct LDKNodeFeatures *NONNULL_PTR a, const struct LDKNodeFeatures *NONNULL_PTR b);
19593         export function NodeFeatures_eq(a: number, b: number): boolean {
19594                 if(!isWasmInitialized) {
19595                         throw new Error("initializeWasm() must be awaited first!");
19596                 }
19597                 const nativeResponseValue = wasm.TS_NodeFeatures_eq(a, b);
19598                 return nativeResponseValue;
19599         }
19600         // bool ChannelFeatures_eq(const struct LDKChannelFeatures *NONNULL_PTR a, const struct LDKChannelFeatures *NONNULL_PTR b);
19601         export function ChannelFeatures_eq(a: number, b: number): boolean {
19602                 if(!isWasmInitialized) {
19603                         throw new Error("initializeWasm() must be awaited first!");
19604                 }
19605                 const nativeResponseValue = wasm.TS_ChannelFeatures_eq(a, b);
19606                 return nativeResponseValue;
19607         }
19608         // bool InvoiceFeatures_eq(const struct LDKInvoiceFeatures *NONNULL_PTR a, const struct LDKInvoiceFeatures *NONNULL_PTR b);
19609         export function InvoiceFeatures_eq(a: number, b: number): boolean {
19610                 if(!isWasmInitialized) {
19611                         throw new Error("initializeWasm() must be awaited first!");
19612                 }
19613                 const nativeResponseValue = wasm.TS_InvoiceFeatures_eq(a, b);
19614                 return nativeResponseValue;
19615         }
19616         // bool ChannelTypeFeatures_eq(const struct LDKChannelTypeFeatures *NONNULL_PTR a, const struct LDKChannelTypeFeatures *NONNULL_PTR b);
19617         export function ChannelTypeFeatures_eq(a: number, b: number): boolean {
19618                 if(!isWasmInitialized) {
19619                         throw new Error("initializeWasm() must be awaited first!");
19620                 }
19621                 const nativeResponseValue = wasm.TS_ChannelTypeFeatures_eq(a, b);
19622                 return nativeResponseValue;
19623         }
19624         // uint64_t InitFeatures_clone_ptr(LDKInitFeatures *NONNULL_PTR arg);
19625         export function InitFeatures_clone_ptr(arg: number): number {
19626                 if(!isWasmInitialized) {
19627                         throw new Error("initializeWasm() must be awaited first!");
19628                 }
19629                 const nativeResponseValue = wasm.TS_InitFeatures_clone_ptr(arg);
19630                 return nativeResponseValue;
19631         }
19632         // struct LDKInitFeatures InitFeatures_clone(const struct LDKInitFeatures *NONNULL_PTR orig);
19633         export function InitFeatures_clone(orig: number): number {
19634                 if(!isWasmInitialized) {
19635                         throw new Error("initializeWasm() must be awaited first!");
19636                 }
19637                 const nativeResponseValue = wasm.TS_InitFeatures_clone(orig);
19638                 return nativeResponseValue;
19639         }
19640         // uint64_t NodeFeatures_clone_ptr(LDKNodeFeatures *NONNULL_PTR arg);
19641         export function NodeFeatures_clone_ptr(arg: number): number {
19642                 if(!isWasmInitialized) {
19643                         throw new Error("initializeWasm() must be awaited first!");
19644                 }
19645                 const nativeResponseValue = wasm.TS_NodeFeatures_clone_ptr(arg);
19646                 return nativeResponseValue;
19647         }
19648         // struct LDKNodeFeatures NodeFeatures_clone(const struct LDKNodeFeatures *NONNULL_PTR orig);
19649         export function NodeFeatures_clone(orig: number): number {
19650                 if(!isWasmInitialized) {
19651                         throw new Error("initializeWasm() must be awaited first!");
19652                 }
19653                 const nativeResponseValue = wasm.TS_NodeFeatures_clone(orig);
19654                 return nativeResponseValue;
19655         }
19656         // uint64_t ChannelFeatures_clone_ptr(LDKChannelFeatures *NONNULL_PTR arg);
19657         export function ChannelFeatures_clone_ptr(arg: number): number {
19658                 if(!isWasmInitialized) {
19659                         throw new Error("initializeWasm() must be awaited first!");
19660                 }
19661                 const nativeResponseValue = wasm.TS_ChannelFeatures_clone_ptr(arg);
19662                 return nativeResponseValue;
19663         }
19664         // struct LDKChannelFeatures ChannelFeatures_clone(const struct LDKChannelFeatures *NONNULL_PTR orig);
19665         export function ChannelFeatures_clone(orig: number): number {
19666                 if(!isWasmInitialized) {
19667                         throw new Error("initializeWasm() must be awaited first!");
19668                 }
19669                 const nativeResponseValue = wasm.TS_ChannelFeatures_clone(orig);
19670                 return nativeResponseValue;
19671         }
19672         // uint64_t InvoiceFeatures_clone_ptr(LDKInvoiceFeatures *NONNULL_PTR arg);
19673         export function InvoiceFeatures_clone_ptr(arg: number): number {
19674                 if(!isWasmInitialized) {
19675                         throw new Error("initializeWasm() must be awaited first!");
19676                 }
19677                 const nativeResponseValue = wasm.TS_InvoiceFeatures_clone_ptr(arg);
19678                 return nativeResponseValue;
19679         }
19680         // struct LDKInvoiceFeatures InvoiceFeatures_clone(const struct LDKInvoiceFeatures *NONNULL_PTR orig);
19681         export function InvoiceFeatures_clone(orig: number): number {
19682                 if(!isWasmInitialized) {
19683                         throw new Error("initializeWasm() must be awaited first!");
19684                 }
19685                 const nativeResponseValue = wasm.TS_InvoiceFeatures_clone(orig);
19686                 return nativeResponseValue;
19687         }
19688         // uint64_t ChannelTypeFeatures_clone_ptr(LDKChannelTypeFeatures *NONNULL_PTR arg);
19689         export function ChannelTypeFeatures_clone_ptr(arg: number): number {
19690                 if(!isWasmInitialized) {
19691                         throw new Error("initializeWasm() must be awaited first!");
19692                 }
19693                 const nativeResponseValue = wasm.TS_ChannelTypeFeatures_clone_ptr(arg);
19694                 return nativeResponseValue;
19695         }
19696         // struct LDKChannelTypeFeatures ChannelTypeFeatures_clone(const struct LDKChannelTypeFeatures *NONNULL_PTR orig);
19697         export function ChannelTypeFeatures_clone(orig: number): number {
19698                 if(!isWasmInitialized) {
19699                         throw new Error("initializeWasm() must be awaited first!");
19700                 }
19701                 const nativeResponseValue = wasm.TS_ChannelTypeFeatures_clone(orig);
19702                 return nativeResponseValue;
19703         }
19704         // void InitFeatures_free(struct LDKInitFeatures this_obj);
19705         export function InitFeatures_free(this_obj: number): void {
19706                 if(!isWasmInitialized) {
19707                         throw new Error("initializeWasm() must be awaited first!");
19708                 }
19709                 const nativeResponseValue = wasm.TS_InitFeatures_free(this_obj);
19710                 // debug statements here
19711         }
19712         // void NodeFeatures_free(struct LDKNodeFeatures this_obj);
19713         export function NodeFeatures_free(this_obj: number): void {
19714                 if(!isWasmInitialized) {
19715                         throw new Error("initializeWasm() must be awaited first!");
19716                 }
19717                 const nativeResponseValue = wasm.TS_NodeFeatures_free(this_obj);
19718                 // debug statements here
19719         }
19720         // void ChannelFeatures_free(struct LDKChannelFeatures this_obj);
19721         export function ChannelFeatures_free(this_obj: number): void {
19722                 if(!isWasmInitialized) {
19723                         throw new Error("initializeWasm() must be awaited first!");
19724                 }
19725                 const nativeResponseValue = wasm.TS_ChannelFeatures_free(this_obj);
19726                 // debug statements here
19727         }
19728         // void InvoiceFeatures_free(struct LDKInvoiceFeatures this_obj);
19729         export function InvoiceFeatures_free(this_obj: number): void {
19730                 if(!isWasmInitialized) {
19731                         throw new Error("initializeWasm() must be awaited first!");
19732                 }
19733                 const nativeResponseValue = wasm.TS_InvoiceFeatures_free(this_obj);
19734                 // debug statements here
19735         }
19736         // void ChannelTypeFeatures_free(struct LDKChannelTypeFeatures this_obj);
19737         export function ChannelTypeFeatures_free(this_obj: number): void {
19738                 if(!isWasmInitialized) {
19739                         throw new Error("initializeWasm() must be awaited first!");
19740                 }
19741                 const nativeResponseValue = wasm.TS_ChannelTypeFeatures_free(this_obj);
19742                 // debug statements here
19743         }
19744         // MUST_USE_RES struct LDKInitFeatures InitFeatures_empty(void);
19745         export function InitFeatures_empty(): number {
19746                 if(!isWasmInitialized) {
19747                         throw new Error("initializeWasm() must be awaited first!");
19748                 }
19749                 const nativeResponseValue = wasm.TS_InitFeatures_empty();
19750                 return nativeResponseValue;
19751         }
19752         // MUST_USE_RES struct LDKInitFeatures InitFeatures_known(void);
19753         export function InitFeatures_known(): number {
19754                 if(!isWasmInitialized) {
19755                         throw new Error("initializeWasm() must be awaited first!");
19756                 }
19757                 const nativeResponseValue = wasm.TS_InitFeatures_known();
19758                 return nativeResponseValue;
19759         }
19760         // MUST_USE_RES bool InitFeatures_requires_unknown_bits(const struct LDKInitFeatures *NONNULL_PTR this_arg);
19761         export function InitFeatures_requires_unknown_bits(this_arg: number): boolean {
19762                 if(!isWasmInitialized) {
19763                         throw new Error("initializeWasm() must be awaited first!");
19764                 }
19765                 const nativeResponseValue = wasm.TS_InitFeatures_requires_unknown_bits(this_arg);
19766                 return nativeResponseValue;
19767         }
19768         // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_empty(void);
19769         export function NodeFeatures_empty(): number {
19770                 if(!isWasmInitialized) {
19771                         throw new Error("initializeWasm() must be awaited first!");
19772                 }
19773                 const nativeResponseValue = wasm.TS_NodeFeatures_empty();
19774                 return nativeResponseValue;
19775         }
19776         // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_known(void);
19777         export function NodeFeatures_known(): number {
19778                 if(!isWasmInitialized) {
19779                         throw new Error("initializeWasm() must be awaited first!");
19780                 }
19781                 const nativeResponseValue = wasm.TS_NodeFeatures_known();
19782                 return nativeResponseValue;
19783         }
19784         // MUST_USE_RES bool NodeFeatures_requires_unknown_bits(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
19785         export function NodeFeatures_requires_unknown_bits(this_arg: number): boolean {
19786                 if(!isWasmInitialized) {
19787                         throw new Error("initializeWasm() must be awaited first!");
19788                 }
19789                 const nativeResponseValue = wasm.TS_NodeFeatures_requires_unknown_bits(this_arg);
19790                 return nativeResponseValue;
19791         }
19792         // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_empty(void);
19793         export function ChannelFeatures_empty(): number {
19794                 if(!isWasmInitialized) {
19795                         throw new Error("initializeWasm() must be awaited first!");
19796                 }
19797                 const nativeResponseValue = wasm.TS_ChannelFeatures_empty();
19798                 return nativeResponseValue;
19799         }
19800         // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_known(void);
19801         export function ChannelFeatures_known(): number {
19802                 if(!isWasmInitialized) {
19803                         throw new Error("initializeWasm() must be awaited first!");
19804                 }
19805                 const nativeResponseValue = wasm.TS_ChannelFeatures_known();
19806                 return nativeResponseValue;
19807         }
19808         // MUST_USE_RES bool ChannelFeatures_requires_unknown_bits(const struct LDKChannelFeatures *NONNULL_PTR this_arg);
19809         export function ChannelFeatures_requires_unknown_bits(this_arg: number): boolean {
19810                 if(!isWasmInitialized) {
19811                         throw new Error("initializeWasm() must be awaited first!");
19812                 }
19813                 const nativeResponseValue = wasm.TS_ChannelFeatures_requires_unknown_bits(this_arg);
19814                 return nativeResponseValue;
19815         }
19816         // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_empty(void);
19817         export function InvoiceFeatures_empty(): number {
19818                 if(!isWasmInitialized) {
19819                         throw new Error("initializeWasm() must be awaited first!");
19820                 }
19821                 const nativeResponseValue = wasm.TS_InvoiceFeatures_empty();
19822                 return nativeResponseValue;
19823         }
19824         // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_known(void);
19825         export function InvoiceFeatures_known(): number {
19826                 if(!isWasmInitialized) {
19827                         throw new Error("initializeWasm() must be awaited first!");
19828                 }
19829                 const nativeResponseValue = wasm.TS_InvoiceFeatures_known();
19830                 return nativeResponseValue;
19831         }
19832         // MUST_USE_RES bool InvoiceFeatures_requires_unknown_bits(const struct LDKInvoiceFeatures *NONNULL_PTR this_arg);
19833         export function InvoiceFeatures_requires_unknown_bits(this_arg: number): boolean {
19834                 if(!isWasmInitialized) {
19835                         throw new Error("initializeWasm() must be awaited first!");
19836                 }
19837                 const nativeResponseValue = wasm.TS_InvoiceFeatures_requires_unknown_bits(this_arg);
19838                 return nativeResponseValue;
19839         }
19840         // MUST_USE_RES struct LDKChannelTypeFeatures ChannelTypeFeatures_empty(void);
19841         export function ChannelTypeFeatures_empty(): number {
19842                 if(!isWasmInitialized) {
19843                         throw new Error("initializeWasm() must be awaited first!");
19844                 }
19845                 const nativeResponseValue = wasm.TS_ChannelTypeFeatures_empty();
19846                 return nativeResponseValue;
19847         }
19848         // MUST_USE_RES struct LDKChannelTypeFeatures ChannelTypeFeatures_known(void);
19849         export function ChannelTypeFeatures_known(): number {
19850                 if(!isWasmInitialized) {
19851                         throw new Error("initializeWasm() must be awaited first!");
19852                 }
19853                 const nativeResponseValue = wasm.TS_ChannelTypeFeatures_known();
19854                 return nativeResponseValue;
19855         }
19856         // MUST_USE_RES bool ChannelTypeFeatures_requires_unknown_bits(const struct LDKChannelTypeFeatures *NONNULL_PTR this_arg);
19857         export function ChannelTypeFeatures_requires_unknown_bits(this_arg: number): boolean {
19858                 if(!isWasmInitialized) {
19859                         throw new Error("initializeWasm() must be awaited first!");
19860                 }
19861                 const nativeResponseValue = wasm.TS_ChannelTypeFeatures_requires_unknown_bits(this_arg);
19862                 return nativeResponseValue;
19863         }
19864         // struct LDKCVec_u8Z InitFeatures_write(const struct LDKInitFeatures *NONNULL_PTR obj);
19865         export function InitFeatures_write(obj: number): Uint8Array {
19866                 if(!isWasmInitialized) {
19867                         throw new Error("initializeWasm() must be awaited first!");
19868                 }
19869                 const nativeResponseValue = wasm.TS_InitFeatures_write(obj);
19870                 return decodeUint8Array(nativeResponseValue);
19871         }
19872         // struct LDKCResult_InitFeaturesDecodeErrorZ InitFeatures_read(struct LDKu8slice ser);
19873         export function InitFeatures_read(ser: Uint8Array): number {
19874                 if(!isWasmInitialized) {
19875                         throw new Error("initializeWasm() must be awaited first!");
19876                 }
19877                 const nativeResponseValue = wasm.TS_InitFeatures_read(encodeUint8Array(ser));
19878                 return nativeResponseValue;
19879         }
19880         // struct LDKCVec_u8Z ChannelFeatures_write(const struct LDKChannelFeatures *NONNULL_PTR obj);
19881         export function ChannelFeatures_write(obj: number): Uint8Array {
19882                 if(!isWasmInitialized) {
19883                         throw new Error("initializeWasm() must be awaited first!");
19884                 }
19885                 const nativeResponseValue = wasm.TS_ChannelFeatures_write(obj);
19886                 return decodeUint8Array(nativeResponseValue);
19887         }
19888         // struct LDKCResult_ChannelFeaturesDecodeErrorZ ChannelFeatures_read(struct LDKu8slice ser);
19889         export function ChannelFeatures_read(ser: Uint8Array): number {
19890                 if(!isWasmInitialized) {
19891                         throw new Error("initializeWasm() must be awaited first!");
19892                 }
19893                 const nativeResponseValue = wasm.TS_ChannelFeatures_read(encodeUint8Array(ser));
19894                 return nativeResponseValue;
19895         }
19896         // struct LDKCVec_u8Z NodeFeatures_write(const struct LDKNodeFeatures *NONNULL_PTR obj);
19897         export function NodeFeatures_write(obj: number): Uint8Array {
19898                 if(!isWasmInitialized) {
19899                         throw new Error("initializeWasm() must be awaited first!");
19900                 }
19901                 const nativeResponseValue = wasm.TS_NodeFeatures_write(obj);
19902                 return decodeUint8Array(nativeResponseValue);
19903         }
19904         // struct LDKCResult_NodeFeaturesDecodeErrorZ NodeFeatures_read(struct LDKu8slice ser);
19905         export function NodeFeatures_read(ser: Uint8Array): number {
19906                 if(!isWasmInitialized) {
19907                         throw new Error("initializeWasm() must be awaited first!");
19908                 }
19909                 const nativeResponseValue = wasm.TS_NodeFeatures_read(encodeUint8Array(ser));
19910                 return nativeResponseValue;
19911         }
19912         // struct LDKCVec_u8Z InvoiceFeatures_write(const struct LDKInvoiceFeatures *NONNULL_PTR obj);
19913         export function InvoiceFeatures_write(obj: number): Uint8Array {
19914                 if(!isWasmInitialized) {
19915                         throw new Error("initializeWasm() must be awaited first!");
19916                 }
19917                 const nativeResponseValue = wasm.TS_InvoiceFeatures_write(obj);
19918                 return decodeUint8Array(nativeResponseValue);
19919         }
19920         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ InvoiceFeatures_read(struct LDKu8slice ser);
19921         export function InvoiceFeatures_read(ser: Uint8Array): number {
19922                 if(!isWasmInitialized) {
19923                         throw new Error("initializeWasm() must be awaited first!");
19924                 }
19925                 const nativeResponseValue = wasm.TS_InvoiceFeatures_read(encodeUint8Array(ser));
19926                 return nativeResponseValue;
19927         }
19928         // struct LDKCVec_u8Z ChannelTypeFeatures_write(const struct LDKChannelTypeFeatures *NONNULL_PTR obj);
19929         export function ChannelTypeFeatures_write(obj: number): Uint8Array {
19930                 if(!isWasmInitialized) {
19931                         throw new Error("initializeWasm() must be awaited first!");
19932                 }
19933                 const nativeResponseValue = wasm.TS_ChannelTypeFeatures_write(obj);
19934                 return decodeUint8Array(nativeResponseValue);
19935         }
19936         // struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ ChannelTypeFeatures_read(struct LDKu8slice ser);
19937         export function ChannelTypeFeatures_read(ser: Uint8Array): number {
19938                 if(!isWasmInitialized) {
19939                         throw new Error("initializeWasm() must be awaited first!");
19940                 }
19941                 const nativeResponseValue = wasm.TS_ChannelTypeFeatures_read(encodeUint8Array(ser));
19942                 return nativeResponseValue;
19943         }
19944         // void ShutdownScript_free(struct LDKShutdownScript this_obj);
19945         export function ShutdownScript_free(this_obj: number): void {
19946                 if(!isWasmInitialized) {
19947                         throw new Error("initializeWasm() must be awaited first!");
19948                 }
19949                 const nativeResponseValue = wasm.TS_ShutdownScript_free(this_obj);
19950                 // debug statements here
19951         }
19952         // uint64_t ShutdownScript_clone_ptr(LDKShutdownScript *NONNULL_PTR arg);
19953         export function ShutdownScript_clone_ptr(arg: number): number {
19954                 if(!isWasmInitialized) {
19955                         throw new Error("initializeWasm() must be awaited first!");
19956                 }
19957                 const nativeResponseValue = wasm.TS_ShutdownScript_clone_ptr(arg);
19958                 return nativeResponseValue;
19959         }
19960         // struct LDKShutdownScript ShutdownScript_clone(const struct LDKShutdownScript *NONNULL_PTR orig);
19961         export function ShutdownScript_clone(orig: number): number {
19962                 if(!isWasmInitialized) {
19963                         throw new Error("initializeWasm() must be awaited first!");
19964                 }
19965                 const nativeResponseValue = wasm.TS_ShutdownScript_clone(orig);
19966                 return nativeResponseValue;
19967         }
19968         // void InvalidShutdownScript_free(struct LDKInvalidShutdownScript this_obj);
19969         export function InvalidShutdownScript_free(this_obj: number): void {
19970                 if(!isWasmInitialized) {
19971                         throw new Error("initializeWasm() must be awaited first!");
19972                 }
19973                 const nativeResponseValue = wasm.TS_InvalidShutdownScript_free(this_obj);
19974                 // debug statements here
19975         }
19976         // struct LDKu8slice InvalidShutdownScript_get_script(const struct LDKInvalidShutdownScript *NONNULL_PTR this_ptr);
19977         export function InvalidShutdownScript_get_script(this_ptr: number): Uint8Array {
19978                 if(!isWasmInitialized) {
19979                         throw new Error("initializeWasm() must be awaited first!");
19980                 }
19981                 const nativeResponseValue = wasm.TS_InvalidShutdownScript_get_script(this_ptr);
19982                 return decodeUint8Array(nativeResponseValue);
19983         }
19984         // void InvalidShutdownScript_set_script(struct LDKInvalidShutdownScript *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
19985         export function InvalidShutdownScript_set_script(this_ptr: number, val: Uint8Array): void {
19986                 if(!isWasmInitialized) {
19987                         throw new Error("initializeWasm() must be awaited first!");
19988                 }
19989                 const nativeResponseValue = wasm.TS_InvalidShutdownScript_set_script(this_ptr, encodeUint8Array(val));
19990                 // debug statements here
19991         }
19992         // MUST_USE_RES struct LDKInvalidShutdownScript InvalidShutdownScript_new(struct LDKCVec_u8Z script_arg);
19993         export function InvalidShutdownScript_new(script_arg: Uint8Array): number {
19994                 if(!isWasmInitialized) {
19995                         throw new Error("initializeWasm() must be awaited first!");
19996                 }
19997                 const nativeResponseValue = wasm.TS_InvalidShutdownScript_new(encodeUint8Array(script_arg));
19998                 return nativeResponseValue;
19999         }
20000         // uint64_t InvalidShutdownScript_clone_ptr(LDKInvalidShutdownScript *NONNULL_PTR arg);
20001         export function InvalidShutdownScript_clone_ptr(arg: number): number {
20002                 if(!isWasmInitialized) {
20003                         throw new Error("initializeWasm() must be awaited first!");
20004                 }
20005                 const nativeResponseValue = wasm.TS_InvalidShutdownScript_clone_ptr(arg);
20006                 return nativeResponseValue;
20007         }
20008         // struct LDKInvalidShutdownScript InvalidShutdownScript_clone(const struct LDKInvalidShutdownScript *NONNULL_PTR orig);
20009         export function InvalidShutdownScript_clone(orig: number): number {
20010                 if(!isWasmInitialized) {
20011                         throw new Error("initializeWasm() must be awaited first!");
20012                 }
20013                 const nativeResponseValue = wasm.TS_InvalidShutdownScript_clone(orig);
20014                 return nativeResponseValue;
20015         }
20016         // struct LDKCVec_u8Z ShutdownScript_write(const struct LDKShutdownScript *NONNULL_PTR obj);
20017         export function ShutdownScript_write(obj: number): Uint8Array {
20018                 if(!isWasmInitialized) {
20019                         throw new Error("initializeWasm() must be awaited first!");
20020                 }
20021                 const nativeResponseValue = wasm.TS_ShutdownScript_write(obj);
20022                 return decodeUint8Array(nativeResponseValue);
20023         }
20024         // struct LDKCResult_ShutdownScriptDecodeErrorZ ShutdownScript_read(struct LDKu8slice ser);
20025         export function ShutdownScript_read(ser: Uint8Array): number {
20026                 if(!isWasmInitialized) {
20027                         throw new Error("initializeWasm() must be awaited first!");
20028                 }
20029                 const nativeResponseValue = wasm.TS_ShutdownScript_read(encodeUint8Array(ser));
20030                 return nativeResponseValue;
20031         }
20032         // MUST_USE_RES struct LDKShutdownScript ShutdownScript_new_p2wpkh(const uint8_t (*pubkey_hash)[20]);
20033         export function ShutdownScript_new_p2wpkh(pubkey_hash: Uint8Array): number {
20034                 if(!isWasmInitialized) {
20035                         throw new Error("initializeWasm() must be awaited first!");
20036                 }
20037                 const nativeResponseValue = wasm.TS_ShutdownScript_new_p2wpkh(encodeUint8Array(pubkey_hash));
20038                 return nativeResponseValue;
20039         }
20040         // MUST_USE_RES struct LDKShutdownScript ShutdownScript_new_p2wsh(const uint8_t (*script_hash)[32]);
20041         export function ShutdownScript_new_p2wsh(script_hash: Uint8Array): number {
20042                 if(!isWasmInitialized) {
20043                         throw new Error("initializeWasm() must be awaited first!");
20044                 }
20045                 const nativeResponseValue = wasm.TS_ShutdownScript_new_p2wsh(encodeUint8Array(script_hash));
20046                 return nativeResponseValue;
20047         }
20048         // MUST_USE_RES struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ ShutdownScript_new_witness_program(uint8_t version, struct LDKu8slice program);
20049         export function ShutdownScript_new_witness_program(version: number, program: Uint8Array): number {
20050                 if(!isWasmInitialized) {
20051                         throw new Error("initializeWasm() must be awaited first!");
20052                 }
20053                 const nativeResponseValue = wasm.TS_ShutdownScript_new_witness_program(version, encodeUint8Array(program));
20054                 return nativeResponseValue;
20055         }
20056         // MUST_USE_RES struct LDKCVec_u8Z ShutdownScript_into_inner(struct LDKShutdownScript this_arg);
20057         export function ShutdownScript_into_inner(this_arg: number): Uint8Array {
20058                 if(!isWasmInitialized) {
20059                         throw new Error("initializeWasm() must be awaited first!");
20060                 }
20061                 const nativeResponseValue = wasm.TS_ShutdownScript_into_inner(this_arg);
20062                 return decodeUint8Array(nativeResponseValue);
20063         }
20064         // MUST_USE_RES struct LDKPublicKey ShutdownScript_as_legacy_pubkey(const struct LDKShutdownScript *NONNULL_PTR this_arg);
20065         export function ShutdownScript_as_legacy_pubkey(this_arg: number): Uint8Array {
20066                 if(!isWasmInitialized) {
20067                         throw new Error("initializeWasm() must be awaited first!");
20068                 }
20069                 const nativeResponseValue = wasm.TS_ShutdownScript_as_legacy_pubkey(this_arg);
20070                 return decodeUint8Array(nativeResponseValue);
20071         }
20072         // MUST_USE_RES bool ShutdownScript_is_compatible(const struct LDKShutdownScript *NONNULL_PTR this_arg, const struct LDKInitFeatures *NONNULL_PTR features);
20073         export function ShutdownScript_is_compatible(this_arg: number, features: number): boolean {
20074                 if(!isWasmInitialized) {
20075                         throw new Error("initializeWasm() must be awaited first!");
20076                 }
20077                 const nativeResponseValue = wasm.TS_ShutdownScript_is_compatible(this_arg, features);
20078                 return nativeResponseValue;
20079         }
20080         // void CustomMessageReader_free(struct LDKCustomMessageReader this_ptr);
20081         export function CustomMessageReader_free(this_ptr: number): void {
20082                 if(!isWasmInitialized) {
20083                         throw new Error("initializeWasm() must be awaited first!");
20084                 }
20085                 const nativeResponseValue = wasm.TS_CustomMessageReader_free(this_ptr);
20086                 // debug statements here
20087         }
20088         // uint64_t Type_clone_ptr(LDKType *NONNULL_PTR arg);
20089         export function Type_clone_ptr(arg: number): number {
20090                 if(!isWasmInitialized) {
20091                         throw new Error("initializeWasm() must be awaited first!");
20092                 }
20093                 const nativeResponseValue = wasm.TS_Type_clone_ptr(arg);
20094                 return nativeResponseValue;
20095         }
20096         // struct LDKType Type_clone(const struct LDKType *NONNULL_PTR orig);
20097         export function Type_clone(orig: number): number {
20098                 if(!isWasmInitialized) {
20099                         throw new Error("initializeWasm() must be awaited first!");
20100                 }
20101                 const nativeResponseValue = wasm.TS_Type_clone(orig);
20102                 return nativeResponseValue;
20103         }
20104         // void Type_free(struct LDKType this_ptr);
20105         export function Type_free(this_ptr: number): void {
20106                 if(!isWasmInitialized) {
20107                         throw new Error("initializeWasm() must be awaited first!");
20108                 }
20109                 const nativeResponseValue = wasm.TS_Type_free(this_ptr);
20110                 // debug statements here
20111         }
20112         // void NodeId_free(struct LDKNodeId this_obj);
20113         export function NodeId_free(this_obj: number): void {
20114                 if(!isWasmInitialized) {
20115                         throw new Error("initializeWasm() must be awaited first!");
20116                 }
20117                 const nativeResponseValue = wasm.TS_NodeId_free(this_obj);
20118                 // debug statements here
20119         }
20120         // uint64_t NodeId_clone_ptr(LDKNodeId *NONNULL_PTR arg);
20121         export function NodeId_clone_ptr(arg: number): number {
20122                 if(!isWasmInitialized) {
20123                         throw new Error("initializeWasm() must be awaited first!");
20124                 }
20125                 const nativeResponseValue = wasm.TS_NodeId_clone_ptr(arg);
20126                 return nativeResponseValue;
20127         }
20128         // struct LDKNodeId NodeId_clone(const struct LDKNodeId *NONNULL_PTR orig);
20129         export function NodeId_clone(orig: number): number {
20130                 if(!isWasmInitialized) {
20131                         throw new Error("initializeWasm() must be awaited first!");
20132                 }
20133                 const nativeResponseValue = wasm.TS_NodeId_clone(orig);
20134                 return nativeResponseValue;
20135         }
20136         // MUST_USE_RES struct LDKNodeId NodeId_from_pubkey(struct LDKPublicKey pubkey);
20137         export function NodeId_from_pubkey(pubkey: Uint8Array): number {
20138                 if(!isWasmInitialized) {
20139                         throw new Error("initializeWasm() must be awaited first!");
20140                 }
20141                 const nativeResponseValue = wasm.TS_NodeId_from_pubkey(encodeUint8Array(pubkey));
20142                 return nativeResponseValue;
20143         }
20144         // MUST_USE_RES struct LDKu8slice NodeId_as_slice(const struct LDKNodeId *NONNULL_PTR this_arg);
20145         export function NodeId_as_slice(this_arg: number): Uint8Array {
20146                 if(!isWasmInitialized) {
20147                         throw new Error("initializeWasm() must be awaited first!");
20148                 }
20149                 const nativeResponseValue = wasm.TS_NodeId_as_slice(this_arg);
20150                 return decodeUint8Array(nativeResponseValue);
20151         }
20152         // uint64_t NodeId_hash(const struct LDKNodeId *NONNULL_PTR o);
20153         export function NodeId_hash(o: number): number {
20154                 if(!isWasmInitialized) {
20155                         throw new Error("initializeWasm() must be awaited first!");
20156                 }
20157                 const nativeResponseValue = wasm.TS_NodeId_hash(o);
20158                 return nativeResponseValue;
20159         }
20160         // struct LDKCVec_u8Z NodeId_write(const struct LDKNodeId *NONNULL_PTR obj);
20161         export function NodeId_write(obj: number): Uint8Array {
20162                 if(!isWasmInitialized) {
20163                         throw new Error("initializeWasm() must be awaited first!");
20164                 }
20165                 const nativeResponseValue = wasm.TS_NodeId_write(obj);
20166                 return decodeUint8Array(nativeResponseValue);
20167         }
20168         // struct LDKCResult_NodeIdDecodeErrorZ NodeId_read(struct LDKu8slice ser);
20169         export function NodeId_read(ser: Uint8Array): number {
20170                 if(!isWasmInitialized) {
20171                         throw new Error("initializeWasm() must be awaited first!");
20172                 }
20173                 const nativeResponseValue = wasm.TS_NodeId_read(encodeUint8Array(ser));
20174                 return nativeResponseValue;
20175         }
20176         // void NetworkGraph_free(struct LDKNetworkGraph this_obj);
20177         export function NetworkGraph_free(this_obj: number): void {
20178                 if(!isWasmInitialized) {
20179                         throw new Error("initializeWasm() must be awaited first!");
20180                 }
20181                 const nativeResponseValue = wasm.TS_NetworkGraph_free(this_obj);
20182                 // debug statements here
20183         }
20184         // uint64_t NetworkGraph_clone_ptr(LDKNetworkGraph *NONNULL_PTR arg);
20185         export function NetworkGraph_clone_ptr(arg: number): number {
20186                 if(!isWasmInitialized) {
20187                         throw new Error("initializeWasm() must be awaited first!");
20188                 }
20189                 const nativeResponseValue = wasm.TS_NetworkGraph_clone_ptr(arg);
20190                 return nativeResponseValue;
20191         }
20192         // struct LDKNetworkGraph NetworkGraph_clone(const struct LDKNetworkGraph *NONNULL_PTR orig);
20193         export function NetworkGraph_clone(orig: number): number {
20194                 if(!isWasmInitialized) {
20195                         throw new Error("initializeWasm() must be awaited first!");
20196                 }
20197                 const nativeResponseValue = wasm.TS_NetworkGraph_clone(orig);
20198                 return nativeResponseValue;
20199         }
20200         // void ReadOnlyNetworkGraph_free(struct LDKReadOnlyNetworkGraph this_obj);
20201         export function ReadOnlyNetworkGraph_free(this_obj: number): void {
20202                 if(!isWasmInitialized) {
20203                         throw new Error("initializeWasm() must be awaited first!");
20204                 }
20205                 const nativeResponseValue = wasm.TS_ReadOnlyNetworkGraph_free(this_obj);
20206                 // debug statements here
20207         }
20208         // void NetworkUpdate_free(struct LDKNetworkUpdate this_ptr);
20209         export function NetworkUpdate_free(this_ptr: number): void {
20210                 if(!isWasmInitialized) {
20211                         throw new Error("initializeWasm() must be awaited first!");
20212                 }
20213                 const nativeResponseValue = wasm.TS_NetworkUpdate_free(this_ptr);
20214                 // debug statements here
20215         }
20216         // uint64_t NetworkUpdate_clone_ptr(LDKNetworkUpdate *NONNULL_PTR arg);
20217         export function NetworkUpdate_clone_ptr(arg: number): number {
20218                 if(!isWasmInitialized) {
20219                         throw new Error("initializeWasm() must be awaited first!");
20220                 }
20221                 const nativeResponseValue = wasm.TS_NetworkUpdate_clone_ptr(arg);
20222                 return nativeResponseValue;
20223         }
20224         // struct LDKNetworkUpdate NetworkUpdate_clone(const struct LDKNetworkUpdate *NONNULL_PTR orig);
20225         export function NetworkUpdate_clone(orig: number): number {
20226                 if(!isWasmInitialized) {
20227                         throw new Error("initializeWasm() must be awaited first!");
20228                 }
20229                 const nativeResponseValue = wasm.TS_NetworkUpdate_clone(orig);
20230                 return nativeResponseValue;
20231         }
20232         // struct LDKNetworkUpdate NetworkUpdate_channel_update_message(struct LDKChannelUpdate msg);
20233         export function NetworkUpdate_channel_update_message(msg: number): number {
20234                 if(!isWasmInitialized) {
20235                         throw new Error("initializeWasm() must be awaited first!");
20236                 }
20237                 const nativeResponseValue = wasm.TS_NetworkUpdate_channel_update_message(msg);
20238                 return nativeResponseValue;
20239         }
20240         // struct LDKNetworkUpdate NetworkUpdate_channel_closed(uint64_t short_channel_id, bool is_permanent);
20241         export function NetworkUpdate_channel_closed(short_channel_id: number, is_permanent: boolean): number {
20242                 if(!isWasmInitialized) {
20243                         throw new Error("initializeWasm() must be awaited first!");
20244                 }
20245                 const nativeResponseValue = wasm.TS_NetworkUpdate_channel_closed(short_channel_id, is_permanent);
20246                 return nativeResponseValue;
20247         }
20248         // struct LDKNetworkUpdate NetworkUpdate_node_failure(struct LDKPublicKey node_id, bool is_permanent);
20249         export function NetworkUpdate_node_failure(node_id: Uint8Array, is_permanent: boolean): number {
20250                 if(!isWasmInitialized) {
20251                         throw new Error("initializeWasm() must be awaited first!");
20252                 }
20253                 const nativeResponseValue = wasm.TS_NetworkUpdate_node_failure(encodeUint8Array(node_id), is_permanent);
20254                 return nativeResponseValue;
20255         }
20256         // struct LDKCVec_u8Z NetworkUpdate_write(const struct LDKNetworkUpdate *NONNULL_PTR obj);
20257         export function NetworkUpdate_write(obj: number): Uint8Array {
20258                 if(!isWasmInitialized) {
20259                         throw new Error("initializeWasm() must be awaited first!");
20260                 }
20261                 const nativeResponseValue = wasm.TS_NetworkUpdate_write(obj);
20262                 return decodeUint8Array(nativeResponseValue);
20263         }
20264         // struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ NetworkUpdate_read(struct LDKu8slice ser);
20265         export function NetworkUpdate_read(ser: Uint8Array): number {
20266                 if(!isWasmInitialized) {
20267                         throw new Error("initializeWasm() must be awaited first!");
20268                 }
20269                 const nativeResponseValue = wasm.TS_NetworkUpdate_read(encodeUint8Array(ser));
20270                 return nativeResponseValue;
20271         }
20272         // struct LDKEventHandler NetGraphMsgHandler_as_EventHandler(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
20273         export function NetGraphMsgHandler_as_EventHandler(this_arg: number): number {
20274                 if(!isWasmInitialized) {
20275                         throw new Error("initializeWasm() must be awaited first!");
20276                 }
20277                 const nativeResponseValue = wasm.TS_NetGraphMsgHandler_as_EventHandler(this_arg);
20278                 return nativeResponseValue;
20279         }
20280         // void NetGraphMsgHandler_free(struct LDKNetGraphMsgHandler this_obj);
20281         export function NetGraphMsgHandler_free(this_obj: number): void {
20282                 if(!isWasmInitialized) {
20283                         throw new Error("initializeWasm() must be awaited first!");
20284                 }
20285                 const nativeResponseValue = wasm.TS_NetGraphMsgHandler_free(this_obj);
20286                 // debug statements here
20287         }
20288         // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_new(const struct LDKNetworkGraph *NONNULL_PTR network_graph, struct LDKCOption_AccessZ chain_access, struct LDKLogger logger);
20289         export function NetGraphMsgHandler_new(network_graph: number, chain_access: number, logger: number): number {
20290                 if(!isWasmInitialized) {
20291                         throw new Error("initializeWasm() must be awaited first!");
20292                 }
20293                 const nativeResponseValue = wasm.TS_NetGraphMsgHandler_new(network_graph, chain_access, logger);
20294                 return nativeResponseValue;
20295         }
20296         // void NetGraphMsgHandler_add_chain_access(struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg, struct LDKCOption_AccessZ chain_access);
20297         export function NetGraphMsgHandler_add_chain_access(this_arg: number, chain_access: number): void {
20298                 if(!isWasmInitialized) {
20299                         throw new Error("initializeWasm() must be awaited first!");
20300                 }
20301                 const nativeResponseValue = wasm.TS_NetGraphMsgHandler_add_chain_access(this_arg, chain_access);
20302                 // debug statements here
20303         }
20304         // struct LDKRoutingMessageHandler NetGraphMsgHandler_as_RoutingMessageHandler(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
20305         export function NetGraphMsgHandler_as_RoutingMessageHandler(this_arg: number): number {
20306                 if(!isWasmInitialized) {
20307                         throw new Error("initializeWasm() must be awaited first!");
20308                 }
20309                 const nativeResponseValue = wasm.TS_NetGraphMsgHandler_as_RoutingMessageHandler(this_arg);
20310                 return nativeResponseValue;
20311         }
20312         // struct LDKMessageSendEventsProvider NetGraphMsgHandler_as_MessageSendEventsProvider(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
20313         export function NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg: number): number {
20314                 if(!isWasmInitialized) {
20315                         throw new Error("initializeWasm() must be awaited first!");
20316                 }
20317                 const nativeResponseValue = wasm.TS_NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg);
20318                 return nativeResponseValue;
20319         }
20320         // void DirectionalChannelInfo_free(struct LDKDirectionalChannelInfo this_obj);
20321         export function DirectionalChannelInfo_free(this_obj: number): void {
20322                 if(!isWasmInitialized) {
20323                         throw new Error("initializeWasm() must be awaited first!");
20324                 }
20325                 const nativeResponseValue = wasm.TS_DirectionalChannelInfo_free(this_obj);
20326                 // debug statements here
20327         }
20328         // uint32_t DirectionalChannelInfo_get_last_update(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
20329         export function DirectionalChannelInfo_get_last_update(this_ptr: number): number {
20330                 if(!isWasmInitialized) {
20331                         throw new Error("initializeWasm() must be awaited first!");
20332                 }
20333                 const nativeResponseValue = wasm.TS_DirectionalChannelInfo_get_last_update(this_ptr);
20334                 return nativeResponseValue;
20335         }
20336         // void DirectionalChannelInfo_set_last_update(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint32_t val);
20337         export function DirectionalChannelInfo_set_last_update(this_ptr: number, val: number): void {
20338                 if(!isWasmInitialized) {
20339                         throw new Error("initializeWasm() must be awaited first!");
20340                 }
20341                 const nativeResponseValue = wasm.TS_DirectionalChannelInfo_set_last_update(this_ptr, val);
20342                 // debug statements here
20343         }
20344         // bool DirectionalChannelInfo_get_enabled(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
20345         export function DirectionalChannelInfo_get_enabled(this_ptr: number): boolean {
20346                 if(!isWasmInitialized) {
20347                         throw new Error("initializeWasm() must be awaited first!");
20348                 }
20349                 const nativeResponseValue = wasm.TS_DirectionalChannelInfo_get_enabled(this_ptr);
20350                 return nativeResponseValue;
20351         }
20352         // void DirectionalChannelInfo_set_enabled(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, bool val);
20353         export function DirectionalChannelInfo_set_enabled(this_ptr: number, val: boolean): void {
20354                 if(!isWasmInitialized) {
20355                         throw new Error("initializeWasm() must be awaited first!");
20356                 }
20357                 const nativeResponseValue = wasm.TS_DirectionalChannelInfo_set_enabled(this_ptr, val);
20358                 // debug statements here
20359         }
20360         // uint16_t DirectionalChannelInfo_get_cltv_expiry_delta(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
20361         export function DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr: number): number {
20362                 if(!isWasmInitialized) {
20363                         throw new Error("initializeWasm() must be awaited first!");
20364                 }
20365                 const nativeResponseValue = wasm.TS_DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr);
20366                 return nativeResponseValue;
20367         }
20368         // void DirectionalChannelInfo_set_cltv_expiry_delta(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint16_t val);
20369         export function DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr: number, val: number): void {
20370                 if(!isWasmInitialized) {
20371                         throw new Error("initializeWasm() must be awaited first!");
20372                 }
20373                 const nativeResponseValue = wasm.TS_DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr, val);
20374                 // debug statements here
20375         }
20376         // uint64_t DirectionalChannelInfo_get_htlc_minimum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
20377         export function DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr: number): number {
20378                 if(!isWasmInitialized) {
20379                         throw new Error("initializeWasm() must be awaited first!");
20380                 }
20381                 const nativeResponseValue = wasm.TS_DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr);
20382                 return nativeResponseValue;
20383         }
20384         // void DirectionalChannelInfo_set_htlc_minimum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint64_t val);
20385         export function DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr: number, val: number): void {
20386                 if(!isWasmInitialized) {
20387                         throw new Error("initializeWasm() must be awaited first!");
20388                 }
20389                 const nativeResponseValue = wasm.TS_DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr, val);
20390                 // debug statements here
20391         }
20392         // struct LDKCOption_u64Z DirectionalChannelInfo_get_htlc_maximum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
20393         export function DirectionalChannelInfo_get_htlc_maximum_msat(this_ptr: number): number {
20394                 if(!isWasmInitialized) {
20395                         throw new Error("initializeWasm() must be awaited first!");
20396                 }
20397                 const nativeResponseValue = wasm.TS_DirectionalChannelInfo_get_htlc_maximum_msat(this_ptr);
20398                 return nativeResponseValue;
20399         }
20400         // void DirectionalChannelInfo_set_htlc_maximum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
20401         export function DirectionalChannelInfo_set_htlc_maximum_msat(this_ptr: number, val: number): void {
20402                 if(!isWasmInitialized) {
20403                         throw new Error("initializeWasm() must be awaited first!");
20404                 }
20405                 const nativeResponseValue = wasm.TS_DirectionalChannelInfo_set_htlc_maximum_msat(this_ptr, val);
20406                 // debug statements here
20407         }
20408         // struct LDKRoutingFees DirectionalChannelInfo_get_fees(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
20409         export function DirectionalChannelInfo_get_fees(this_ptr: number): number {
20410                 if(!isWasmInitialized) {
20411                         throw new Error("initializeWasm() must be awaited first!");
20412                 }
20413                 const nativeResponseValue = wasm.TS_DirectionalChannelInfo_get_fees(this_ptr);
20414                 return nativeResponseValue;
20415         }
20416         // void DirectionalChannelInfo_set_fees(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
20417         export function DirectionalChannelInfo_set_fees(this_ptr: number, val: number): void {
20418                 if(!isWasmInitialized) {
20419                         throw new Error("initializeWasm() must be awaited first!");
20420                 }
20421                 const nativeResponseValue = wasm.TS_DirectionalChannelInfo_set_fees(this_ptr, val);
20422                 // debug statements here
20423         }
20424         // struct LDKChannelUpdate DirectionalChannelInfo_get_last_update_message(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
20425         export function DirectionalChannelInfo_get_last_update_message(this_ptr: number): number {
20426                 if(!isWasmInitialized) {
20427                         throw new Error("initializeWasm() must be awaited first!");
20428                 }
20429                 const nativeResponseValue = wasm.TS_DirectionalChannelInfo_get_last_update_message(this_ptr);
20430                 return nativeResponseValue;
20431         }
20432         // void DirectionalChannelInfo_set_last_update_message(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelUpdate val);
20433         export function DirectionalChannelInfo_set_last_update_message(this_ptr: number, val: number): void {
20434                 if(!isWasmInitialized) {
20435                         throw new Error("initializeWasm() must be awaited first!");
20436                 }
20437                 const nativeResponseValue = wasm.TS_DirectionalChannelInfo_set_last_update_message(this_ptr, val);
20438                 // debug statements here
20439         }
20440         // 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);
20441         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 {
20442                 if(!isWasmInitialized) {
20443                         throw new Error("initializeWasm() must be awaited first!");
20444                 }
20445                 const nativeResponseValue = wasm.TS_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);
20446                 return nativeResponseValue;
20447         }
20448         // uint64_t DirectionalChannelInfo_clone_ptr(LDKDirectionalChannelInfo *NONNULL_PTR arg);
20449         export function DirectionalChannelInfo_clone_ptr(arg: number): number {
20450                 if(!isWasmInitialized) {
20451                         throw new Error("initializeWasm() must be awaited first!");
20452                 }
20453                 const nativeResponseValue = wasm.TS_DirectionalChannelInfo_clone_ptr(arg);
20454                 return nativeResponseValue;
20455         }
20456         // struct LDKDirectionalChannelInfo DirectionalChannelInfo_clone(const struct LDKDirectionalChannelInfo *NONNULL_PTR orig);
20457         export function DirectionalChannelInfo_clone(orig: number): number {
20458                 if(!isWasmInitialized) {
20459                         throw new Error("initializeWasm() must be awaited first!");
20460                 }
20461                 const nativeResponseValue = wasm.TS_DirectionalChannelInfo_clone(orig);
20462                 return nativeResponseValue;
20463         }
20464         // struct LDKCVec_u8Z DirectionalChannelInfo_write(const struct LDKDirectionalChannelInfo *NONNULL_PTR obj);
20465         export function DirectionalChannelInfo_write(obj: number): Uint8Array {
20466                 if(!isWasmInitialized) {
20467                         throw new Error("initializeWasm() must be awaited first!");
20468                 }
20469                 const nativeResponseValue = wasm.TS_DirectionalChannelInfo_write(obj);
20470                 return decodeUint8Array(nativeResponseValue);
20471         }
20472         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ DirectionalChannelInfo_read(struct LDKu8slice ser);
20473         export function DirectionalChannelInfo_read(ser: Uint8Array): number {
20474                 if(!isWasmInitialized) {
20475                         throw new Error("initializeWasm() must be awaited first!");
20476                 }
20477                 const nativeResponseValue = wasm.TS_DirectionalChannelInfo_read(encodeUint8Array(ser));
20478                 return nativeResponseValue;
20479         }
20480         // void ChannelInfo_free(struct LDKChannelInfo this_obj);
20481         export function ChannelInfo_free(this_obj: number): void {
20482                 if(!isWasmInitialized) {
20483                         throw new Error("initializeWasm() must be awaited first!");
20484                 }
20485                 const nativeResponseValue = wasm.TS_ChannelInfo_free(this_obj);
20486                 // debug statements here
20487         }
20488         // struct LDKChannelFeatures ChannelInfo_get_features(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
20489         export function ChannelInfo_get_features(this_ptr: number): number {
20490                 if(!isWasmInitialized) {
20491                         throw new Error("initializeWasm() must be awaited first!");
20492                 }
20493                 const nativeResponseValue = wasm.TS_ChannelInfo_get_features(this_ptr);
20494                 return nativeResponseValue;
20495         }
20496         // void ChannelInfo_set_features(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
20497         export function ChannelInfo_set_features(this_ptr: number, val: number): void {
20498                 if(!isWasmInitialized) {
20499                         throw new Error("initializeWasm() must be awaited first!");
20500                 }
20501                 const nativeResponseValue = wasm.TS_ChannelInfo_set_features(this_ptr, val);
20502                 // debug statements here
20503         }
20504         // struct LDKNodeId ChannelInfo_get_node_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
20505         export function ChannelInfo_get_node_one(this_ptr: number): number {
20506                 if(!isWasmInitialized) {
20507                         throw new Error("initializeWasm() must be awaited first!");
20508                 }
20509                 const nativeResponseValue = wasm.TS_ChannelInfo_get_node_one(this_ptr);
20510                 return nativeResponseValue;
20511         }
20512         // void ChannelInfo_set_node_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKNodeId val);
20513         export function ChannelInfo_set_node_one(this_ptr: number, val: number): void {
20514                 if(!isWasmInitialized) {
20515                         throw new Error("initializeWasm() must be awaited first!");
20516                 }
20517                 const nativeResponseValue = wasm.TS_ChannelInfo_set_node_one(this_ptr, val);
20518                 // debug statements here
20519         }
20520         // struct LDKDirectionalChannelInfo ChannelInfo_get_one_to_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
20521         export function ChannelInfo_get_one_to_two(this_ptr: number): number {
20522                 if(!isWasmInitialized) {
20523                         throw new Error("initializeWasm() must be awaited first!");
20524                 }
20525                 const nativeResponseValue = wasm.TS_ChannelInfo_get_one_to_two(this_ptr);
20526                 return nativeResponseValue;
20527         }
20528         // void ChannelInfo_set_one_to_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
20529         export function ChannelInfo_set_one_to_two(this_ptr: number, val: number): void {
20530                 if(!isWasmInitialized) {
20531                         throw new Error("initializeWasm() must be awaited first!");
20532                 }
20533                 const nativeResponseValue = wasm.TS_ChannelInfo_set_one_to_two(this_ptr, val);
20534                 // debug statements here
20535         }
20536         // struct LDKNodeId ChannelInfo_get_node_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
20537         export function ChannelInfo_get_node_two(this_ptr: number): number {
20538                 if(!isWasmInitialized) {
20539                         throw new Error("initializeWasm() must be awaited first!");
20540                 }
20541                 const nativeResponseValue = wasm.TS_ChannelInfo_get_node_two(this_ptr);
20542                 return nativeResponseValue;
20543         }
20544         // void ChannelInfo_set_node_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKNodeId val);
20545         export function ChannelInfo_set_node_two(this_ptr: number, val: number): void {
20546                 if(!isWasmInitialized) {
20547                         throw new Error("initializeWasm() must be awaited first!");
20548                 }
20549                 const nativeResponseValue = wasm.TS_ChannelInfo_set_node_two(this_ptr, val);
20550                 // debug statements here
20551         }
20552         // struct LDKDirectionalChannelInfo ChannelInfo_get_two_to_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
20553         export function ChannelInfo_get_two_to_one(this_ptr: number): number {
20554                 if(!isWasmInitialized) {
20555                         throw new Error("initializeWasm() must be awaited first!");
20556                 }
20557                 const nativeResponseValue = wasm.TS_ChannelInfo_get_two_to_one(this_ptr);
20558                 return nativeResponseValue;
20559         }
20560         // void ChannelInfo_set_two_to_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
20561         export function ChannelInfo_set_two_to_one(this_ptr: number, val: number): void {
20562                 if(!isWasmInitialized) {
20563                         throw new Error("initializeWasm() must be awaited first!");
20564                 }
20565                 const nativeResponseValue = wasm.TS_ChannelInfo_set_two_to_one(this_ptr, val);
20566                 // debug statements here
20567         }
20568         // struct LDKCOption_u64Z ChannelInfo_get_capacity_sats(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
20569         export function ChannelInfo_get_capacity_sats(this_ptr: number): number {
20570                 if(!isWasmInitialized) {
20571                         throw new Error("initializeWasm() must be awaited first!");
20572                 }
20573                 const nativeResponseValue = wasm.TS_ChannelInfo_get_capacity_sats(this_ptr);
20574                 return nativeResponseValue;
20575         }
20576         // void ChannelInfo_set_capacity_sats(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
20577         export function ChannelInfo_set_capacity_sats(this_ptr: number, val: number): void {
20578                 if(!isWasmInitialized) {
20579                         throw new Error("initializeWasm() must be awaited first!");
20580                 }
20581                 const nativeResponseValue = wasm.TS_ChannelInfo_set_capacity_sats(this_ptr, val);
20582                 // debug statements here
20583         }
20584         // struct LDKChannelAnnouncement ChannelInfo_get_announcement_message(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
20585         export function ChannelInfo_get_announcement_message(this_ptr: number): number {
20586                 if(!isWasmInitialized) {
20587                         throw new Error("initializeWasm() must be awaited first!");
20588                 }
20589                 const nativeResponseValue = wasm.TS_ChannelInfo_get_announcement_message(this_ptr);
20590                 return nativeResponseValue;
20591         }
20592         // void ChannelInfo_set_announcement_message(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelAnnouncement val);
20593         export function ChannelInfo_set_announcement_message(this_ptr: number, val: number): void {
20594                 if(!isWasmInitialized) {
20595                         throw new Error("initializeWasm() must be awaited first!");
20596                 }
20597                 const nativeResponseValue = wasm.TS_ChannelInfo_set_announcement_message(this_ptr, val);
20598                 // debug statements here
20599         }
20600         // uint64_t ChannelInfo_clone_ptr(LDKChannelInfo *NONNULL_PTR arg);
20601         export function ChannelInfo_clone_ptr(arg: number): number {
20602                 if(!isWasmInitialized) {
20603                         throw new Error("initializeWasm() must be awaited first!");
20604                 }
20605                 const nativeResponseValue = wasm.TS_ChannelInfo_clone_ptr(arg);
20606                 return nativeResponseValue;
20607         }
20608         // struct LDKChannelInfo ChannelInfo_clone(const struct LDKChannelInfo *NONNULL_PTR orig);
20609         export function ChannelInfo_clone(orig: number): number {
20610                 if(!isWasmInitialized) {
20611                         throw new Error("initializeWasm() must be awaited first!");
20612                 }
20613                 const nativeResponseValue = wasm.TS_ChannelInfo_clone(orig);
20614                 return nativeResponseValue;
20615         }
20616         // struct LDKCVec_u8Z ChannelInfo_write(const struct LDKChannelInfo *NONNULL_PTR obj);
20617         export function ChannelInfo_write(obj: number): Uint8Array {
20618                 if(!isWasmInitialized) {
20619                         throw new Error("initializeWasm() must be awaited first!");
20620                 }
20621                 const nativeResponseValue = wasm.TS_ChannelInfo_write(obj);
20622                 return decodeUint8Array(nativeResponseValue);
20623         }
20624         // struct LDKCResult_ChannelInfoDecodeErrorZ ChannelInfo_read(struct LDKu8slice ser);
20625         export function ChannelInfo_read(ser: Uint8Array): number {
20626                 if(!isWasmInitialized) {
20627                         throw new Error("initializeWasm() must be awaited first!");
20628                 }
20629                 const nativeResponseValue = wasm.TS_ChannelInfo_read(encodeUint8Array(ser));
20630                 return nativeResponseValue;
20631         }
20632         // void RoutingFees_free(struct LDKRoutingFees this_obj);
20633         export function RoutingFees_free(this_obj: number): void {
20634                 if(!isWasmInitialized) {
20635                         throw new Error("initializeWasm() must be awaited first!");
20636                 }
20637                 const nativeResponseValue = wasm.TS_RoutingFees_free(this_obj);
20638                 // debug statements here
20639         }
20640         // uint32_t RoutingFees_get_base_msat(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
20641         export function RoutingFees_get_base_msat(this_ptr: number): number {
20642                 if(!isWasmInitialized) {
20643                         throw new Error("initializeWasm() must be awaited first!");
20644                 }
20645                 const nativeResponseValue = wasm.TS_RoutingFees_get_base_msat(this_ptr);
20646                 return nativeResponseValue;
20647         }
20648         // void RoutingFees_set_base_msat(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
20649         export function RoutingFees_set_base_msat(this_ptr: number, val: number): void {
20650                 if(!isWasmInitialized) {
20651                         throw new Error("initializeWasm() must be awaited first!");
20652                 }
20653                 const nativeResponseValue = wasm.TS_RoutingFees_set_base_msat(this_ptr, val);
20654                 // debug statements here
20655         }
20656         // uint32_t RoutingFees_get_proportional_millionths(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
20657         export function RoutingFees_get_proportional_millionths(this_ptr: number): number {
20658                 if(!isWasmInitialized) {
20659                         throw new Error("initializeWasm() must be awaited first!");
20660                 }
20661                 const nativeResponseValue = wasm.TS_RoutingFees_get_proportional_millionths(this_ptr);
20662                 return nativeResponseValue;
20663         }
20664         // void RoutingFees_set_proportional_millionths(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
20665         export function RoutingFees_set_proportional_millionths(this_ptr: number, val: number): void {
20666                 if(!isWasmInitialized) {
20667                         throw new Error("initializeWasm() must be awaited first!");
20668                 }
20669                 const nativeResponseValue = wasm.TS_RoutingFees_set_proportional_millionths(this_ptr, val);
20670                 // debug statements here
20671         }
20672         // MUST_USE_RES struct LDKRoutingFees RoutingFees_new(uint32_t base_msat_arg, uint32_t proportional_millionths_arg);
20673         export function RoutingFees_new(base_msat_arg: number, proportional_millionths_arg: number): number {
20674                 if(!isWasmInitialized) {
20675                         throw new Error("initializeWasm() must be awaited first!");
20676                 }
20677                 const nativeResponseValue = wasm.TS_RoutingFees_new(base_msat_arg, proportional_millionths_arg);
20678                 return nativeResponseValue;
20679         }
20680         // bool RoutingFees_eq(const struct LDKRoutingFees *NONNULL_PTR a, const struct LDKRoutingFees *NONNULL_PTR b);
20681         export function RoutingFees_eq(a: number, b: number): boolean {
20682                 if(!isWasmInitialized) {
20683                         throw new Error("initializeWasm() must be awaited first!");
20684                 }
20685                 const nativeResponseValue = wasm.TS_RoutingFees_eq(a, b);
20686                 return nativeResponseValue;
20687         }
20688         // uint64_t RoutingFees_clone_ptr(LDKRoutingFees *NONNULL_PTR arg);
20689         export function RoutingFees_clone_ptr(arg: number): number {
20690                 if(!isWasmInitialized) {
20691                         throw new Error("initializeWasm() must be awaited first!");
20692                 }
20693                 const nativeResponseValue = wasm.TS_RoutingFees_clone_ptr(arg);
20694                 return nativeResponseValue;
20695         }
20696         // struct LDKRoutingFees RoutingFees_clone(const struct LDKRoutingFees *NONNULL_PTR orig);
20697         export function RoutingFees_clone(orig: number): number {
20698                 if(!isWasmInitialized) {
20699                         throw new Error("initializeWasm() must be awaited first!");
20700                 }
20701                 const nativeResponseValue = wasm.TS_RoutingFees_clone(orig);
20702                 return nativeResponseValue;
20703         }
20704         // uint64_t RoutingFees_hash(const struct LDKRoutingFees *NONNULL_PTR o);
20705         export function RoutingFees_hash(o: number): number {
20706                 if(!isWasmInitialized) {
20707                         throw new Error("initializeWasm() must be awaited first!");
20708                 }
20709                 const nativeResponseValue = wasm.TS_RoutingFees_hash(o);
20710                 return nativeResponseValue;
20711         }
20712         // struct LDKCVec_u8Z RoutingFees_write(const struct LDKRoutingFees *NONNULL_PTR obj);
20713         export function RoutingFees_write(obj: number): Uint8Array {
20714                 if(!isWasmInitialized) {
20715                         throw new Error("initializeWasm() must be awaited first!");
20716                 }
20717                 const nativeResponseValue = wasm.TS_RoutingFees_write(obj);
20718                 return decodeUint8Array(nativeResponseValue);
20719         }
20720         // struct LDKCResult_RoutingFeesDecodeErrorZ RoutingFees_read(struct LDKu8slice ser);
20721         export function RoutingFees_read(ser: Uint8Array): number {
20722                 if(!isWasmInitialized) {
20723                         throw new Error("initializeWasm() must be awaited first!");
20724                 }
20725                 const nativeResponseValue = wasm.TS_RoutingFees_read(encodeUint8Array(ser));
20726                 return nativeResponseValue;
20727         }
20728         // void NodeAnnouncementInfo_free(struct LDKNodeAnnouncementInfo this_obj);
20729         export function NodeAnnouncementInfo_free(this_obj: number): void {
20730                 if(!isWasmInitialized) {
20731                         throw new Error("initializeWasm() must be awaited first!");
20732                 }
20733                 const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_free(this_obj);
20734                 // debug statements here
20735         }
20736         // struct LDKNodeFeatures NodeAnnouncementInfo_get_features(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
20737         export function NodeAnnouncementInfo_get_features(this_ptr: number): number {
20738                 if(!isWasmInitialized) {
20739                         throw new Error("initializeWasm() must be awaited first!");
20740                 }
20741                 const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_get_features(this_ptr);
20742                 return nativeResponseValue;
20743         }
20744         // void NodeAnnouncementInfo_set_features(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
20745         export function NodeAnnouncementInfo_set_features(this_ptr: number, val: number): void {
20746                 if(!isWasmInitialized) {
20747                         throw new Error("initializeWasm() must be awaited first!");
20748                 }
20749                 const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_set_features(this_ptr, val);
20750                 // debug statements here
20751         }
20752         // uint32_t NodeAnnouncementInfo_get_last_update(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
20753         export function NodeAnnouncementInfo_get_last_update(this_ptr: number): number {
20754                 if(!isWasmInitialized) {
20755                         throw new Error("initializeWasm() must be awaited first!");
20756                 }
20757                 const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_get_last_update(this_ptr);
20758                 return nativeResponseValue;
20759         }
20760         // void NodeAnnouncementInfo_set_last_update(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, uint32_t val);
20761         export function NodeAnnouncementInfo_set_last_update(this_ptr: number, val: number): void {
20762                 if(!isWasmInitialized) {
20763                         throw new Error("initializeWasm() must be awaited first!");
20764                 }
20765                 const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_set_last_update(this_ptr, val);
20766                 // debug statements here
20767         }
20768         // const uint8_t (*NodeAnnouncementInfo_get_rgb(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[3];
20769         export function NodeAnnouncementInfo_get_rgb(this_ptr: number): Uint8Array {
20770                 if(!isWasmInitialized) {
20771                         throw new Error("initializeWasm() must be awaited first!");
20772                 }
20773                 const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_get_rgb(this_ptr);
20774                 return decodeUint8Array(nativeResponseValue);
20775         }
20776         // void NodeAnnouncementInfo_set_rgb(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
20777         export function NodeAnnouncementInfo_set_rgb(this_ptr: number, val: Uint8Array): void {
20778                 if(!isWasmInitialized) {
20779                         throw new Error("initializeWasm() must be awaited first!");
20780                 }
20781                 const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_set_rgb(this_ptr, encodeUint8Array(val));
20782                 // debug statements here
20783         }
20784         // const uint8_t (*NodeAnnouncementInfo_get_alias(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[32];
20785         export function NodeAnnouncementInfo_get_alias(this_ptr: number): Uint8Array {
20786                 if(!isWasmInitialized) {
20787                         throw new Error("initializeWasm() must be awaited first!");
20788                 }
20789                 const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_get_alias(this_ptr);
20790                 return decodeUint8Array(nativeResponseValue);
20791         }
20792         // void NodeAnnouncementInfo_set_alias(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
20793         export function NodeAnnouncementInfo_set_alias(this_ptr: number, val: Uint8Array): void {
20794                 if(!isWasmInitialized) {
20795                         throw new Error("initializeWasm() must be awaited first!");
20796                 }
20797                 const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_set_alias(this_ptr, encodeUint8Array(val));
20798                 // debug statements here
20799         }
20800         // void NodeAnnouncementInfo_set_addresses(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
20801         export function NodeAnnouncementInfo_set_addresses(this_ptr: number, val: number[]): void {
20802                 if(!isWasmInitialized) {
20803                         throw new Error("initializeWasm() must be awaited first!");
20804                 }
20805                 const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_set_addresses(this_ptr, val);
20806                 // debug statements here
20807         }
20808         // struct LDKNodeAnnouncement NodeAnnouncementInfo_get_announcement_message(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
20809         export function NodeAnnouncementInfo_get_announcement_message(this_ptr: number): number {
20810                 if(!isWasmInitialized) {
20811                         throw new Error("initializeWasm() must be awaited first!");
20812                 }
20813                 const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_get_announcement_message(this_ptr);
20814                 return nativeResponseValue;
20815         }
20816         // void NodeAnnouncementInfo_set_announcement_message(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncement val);
20817         export function NodeAnnouncementInfo_set_announcement_message(this_ptr: number, val: number): void {
20818                 if(!isWasmInitialized) {
20819                         throw new Error("initializeWasm() must be awaited first!");
20820                 }
20821                 const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_set_announcement_message(this_ptr, val);
20822                 // debug statements here
20823         }
20824         // 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);
20825         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 {
20826                 if(!isWasmInitialized) {
20827                         throw new Error("initializeWasm() must be awaited first!");
20828                 }
20829                 const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_new(features_arg, last_update_arg, encodeUint8Array(rgb_arg), encodeUint8Array(alias_arg), addresses_arg, announcement_message_arg);
20830                 return nativeResponseValue;
20831         }
20832         // uint64_t NodeAnnouncementInfo_clone_ptr(LDKNodeAnnouncementInfo *NONNULL_PTR arg);
20833         export function NodeAnnouncementInfo_clone_ptr(arg: number): number {
20834                 if(!isWasmInitialized) {
20835                         throw new Error("initializeWasm() must be awaited first!");
20836                 }
20837                 const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_clone_ptr(arg);
20838                 return nativeResponseValue;
20839         }
20840         // struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_clone(const struct LDKNodeAnnouncementInfo *NONNULL_PTR orig);
20841         export function NodeAnnouncementInfo_clone(orig: number): number {
20842                 if(!isWasmInitialized) {
20843                         throw new Error("initializeWasm() must be awaited first!");
20844                 }
20845                 const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_clone(orig);
20846                 return nativeResponseValue;
20847         }
20848         // struct LDKCVec_u8Z NodeAnnouncementInfo_write(const struct LDKNodeAnnouncementInfo *NONNULL_PTR obj);
20849         export function NodeAnnouncementInfo_write(obj: number): Uint8Array {
20850                 if(!isWasmInitialized) {
20851                         throw new Error("initializeWasm() must be awaited first!");
20852                 }
20853                 const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_write(obj);
20854                 return decodeUint8Array(nativeResponseValue);
20855         }
20856         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ NodeAnnouncementInfo_read(struct LDKu8slice ser);
20857         export function NodeAnnouncementInfo_read(ser: Uint8Array): number {
20858                 if(!isWasmInitialized) {
20859                         throw new Error("initializeWasm() must be awaited first!");
20860                 }
20861                 const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_read(encodeUint8Array(ser));
20862                 return nativeResponseValue;
20863         }
20864         // void NodeInfo_free(struct LDKNodeInfo this_obj);
20865         export function NodeInfo_free(this_obj: number): void {
20866                 if(!isWasmInitialized) {
20867                         throw new Error("initializeWasm() must be awaited first!");
20868                 }
20869                 const nativeResponseValue = wasm.TS_NodeInfo_free(this_obj);
20870                 // debug statements here
20871         }
20872         // void NodeInfo_set_channels(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
20873         export function NodeInfo_set_channels(this_ptr: number, val: number[]): void {
20874                 if(!isWasmInitialized) {
20875                         throw new Error("initializeWasm() must be awaited first!");
20876                 }
20877                 const nativeResponseValue = wasm.TS_NodeInfo_set_channels(this_ptr, val);
20878                 // debug statements here
20879         }
20880         // struct LDKRoutingFees NodeInfo_get_lowest_inbound_channel_fees(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
20881         export function NodeInfo_get_lowest_inbound_channel_fees(this_ptr: number): number {
20882                 if(!isWasmInitialized) {
20883                         throw new Error("initializeWasm() must be awaited first!");
20884                 }
20885                 const nativeResponseValue = wasm.TS_NodeInfo_get_lowest_inbound_channel_fees(this_ptr);
20886                 return nativeResponseValue;
20887         }
20888         // void NodeInfo_set_lowest_inbound_channel_fees(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
20889         export function NodeInfo_set_lowest_inbound_channel_fees(this_ptr: number, val: number): void {
20890                 if(!isWasmInitialized) {
20891                         throw new Error("initializeWasm() must be awaited first!");
20892                 }
20893                 const nativeResponseValue = wasm.TS_NodeInfo_set_lowest_inbound_channel_fees(this_ptr, val);
20894                 // debug statements here
20895         }
20896         // struct LDKNodeAnnouncementInfo NodeInfo_get_announcement_info(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
20897         export function NodeInfo_get_announcement_info(this_ptr: number): number {
20898                 if(!isWasmInitialized) {
20899                         throw new Error("initializeWasm() must be awaited first!");
20900                 }
20901                 const nativeResponseValue = wasm.TS_NodeInfo_get_announcement_info(this_ptr);
20902                 return nativeResponseValue;
20903         }
20904         // void NodeInfo_set_announcement_info(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncementInfo val);
20905         export function NodeInfo_set_announcement_info(this_ptr: number, val: number): void {
20906                 if(!isWasmInitialized) {
20907                         throw new Error("initializeWasm() must be awaited first!");
20908                 }
20909                 const nativeResponseValue = wasm.TS_NodeInfo_set_announcement_info(this_ptr, val);
20910                 // debug statements here
20911         }
20912         // MUST_USE_RES struct LDKNodeInfo NodeInfo_new(struct LDKCVec_u64Z channels_arg, struct LDKRoutingFees lowest_inbound_channel_fees_arg, struct LDKNodeAnnouncementInfo announcement_info_arg);
20913         export function NodeInfo_new(channels_arg: number[], lowest_inbound_channel_fees_arg: number, announcement_info_arg: number): number {
20914                 if(!isWasmInitialized) {
20915                         throw new Error("initializeWasm() must be awaited first!");
20916                 }
20917                 const nativeResponseValue = wasm.TS_NodeInfo_new(channels_arg, lowest_inbound_channel_fees_arg, announcement_info_arg);
20918                 return nativeResponseValue;
20919         }
20920         // uint64_t NodeInfo_clone_ptr(LDKNodeInfo *NONNULL_PTR arg);
20921         export function NodeInfo_clone_ptr(arg: number): number {
20922                 if(!isWasmInitialized) {
20923                         throw new Error("initializeWasm() must be awaited first!");
20924                 }
20925                 const nativeResponseValue = wasm.TS_NodeInfo_clone_ptr(arg);
20926                 return nativeResponseValue;
20927         }
20928         // struct LDKNodeInfo NodeInfo_clone(const struct LDKNodeInfo *NONNULL_PTR orig);
20929         export function NodeInfo_clone(orig: number): number {
20930                 if(!isWasmInitialized) {
20931                         throw new Error("initializeWasm() must be awaited first!");
20932                 }
20933                 const nativeResponseValue = wasm.TS_NodeInfo_clone(orig);
20934                 return nativeResponseValue;
20935         }
20936         // struct LDKCVec_u8Z NodeInfo_write(const struct LDKNodeInfo *NONNULL_PTR obj);
20937         export function NodeInfo_write(obj: number): Uint8Array {
20938                 if(!isWasmInitialized) {
20939                         throw new Error("initializeWasm() must be awaited first!");
20940                 }
20941                 const nativeResponseValue = wasm.TS_NodeInfo_write(obj);
20942                 return decodeUint8Array(nativeResponseValue);
20943         }
20944         // struct LDKCResult_NodeInfoDecodeErrorZ NodeInfo_read(struct LDKu8slice ser);
20945         export function NodeInfo_read(ser: Uint8Array): number {
20946                 if(!isWasmInitialized) {
20947                         throw new Error("initializeWasm() must be awaited first!");
20948                 }
20949                 const nativeResponseValue = wasm.TS_NodeInfo_read(encodeUint8Array(ser));
20950                 return nativeResponseValue;
20951         }
20952         // struct LDKCVec_u8Z NetworkGraph_write(const struct LDKNetworkGraph *NONNULL_PTR obj);
20953         export function NetworkGraph_write(obj: number): Uint8Array {
20954                 if(!isWasmInitialized) {
20955                         throw new Error("initializeWasm() must be awaited first!");
20956                 }
20957                 const nativeResponseValue = wasm.TS_NetworkGraph_write(obj);
20958                 return decodeUint8Array(nativeResponseValue);
20959         }
20960         // struct LDKCResult_NetworkGraphDecodeErrorZ NetworkGraph_read(struct LDKu8slice ser);
20961         export function NetworkGraph_read(ser: Uint8Array): number {
20962                 if(!isWasmInitialized) {
20963                         throw new Error("initializeWasm() must be awaited first!");
20964                 }
20965                 const nativeResponseValue = wasm.TS_NetworkGraph_read(encodeUint8Array(ser));
20966                 return nativeResponseValue;
20967         }
20968         // MUST_USE_RES struct LDKNetworkGraph NetworkGraph_new(struct LDKThirtyTwoBytes genesis_hash);
20969         export function NetworkGraph_new(genesis_hash: Uint8Array): number {
20970                 if(!isWasmInitialized) {
20971                         throw new Error("initializeWasm() must be awaited first!");
20972                 }
20973                 const nativeResponseValue = wasm.TS_NetworkGraph_new(encodeUint8Array(genesis_hash));
20974                 return nativeResponseValue;
20975         }
20976         // MUST_USE_RES struct LDKReadOnlyNetworkGraph NetworkGraph_read_only(const struct LDKNetworkGraph *NONNULL_PTR this_arg);
20977         export function NetworkGraph_read_only(this_arg: number): number {
20978                 if(!isWasmInitialized) {
20979                         throw new Error("initializeWasm() must be awaited first!");
20980                 }
20981                 const nativeResponseValue = wasm.TS_NetworkGraph_read_only(this_arg);
20982                 return nativeResponseValue;
20983         }
20984         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg);
20985         export function NetworkGraph_update_node_from_announcement(this_arg: number, msg: number): number {
20986                 if(!isWasmInitialized) {
20987                         throw new Error("initializeWasm() must be awaited first!");
20988                 }
20989                 const nativeResponseValue = wasm.TS_NetworkGraph_update_node_from_announcement(this_arg, msg);
20990                 return nativeResponseValue;
20991         }
20992         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_unsigned_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR msg);
20993         export function NetworkGraph_update_node_from_unsigned_announcement(this_arg: number, msg: number): number {
20994                 if(!isWasmInitialized) {
20995                         throw new Error("initializeWasm() must be awaited first!");
20996                 }
20997                 const nativeResponseValue = wasm.TS_NetworkGraph_update_node_from_unsigned_announcement(this_arg, msg);
20998                 return nativeResponseValue;
20999         }
21000         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_from_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg, struct LDKCOption_AccessZ chain_access);
21001         export function NetworkGraph_update_channel_from_announcement(this_arg: number, msg: number, chain_access: number): number {
21002                 if(!isWasmInitialized) {
21003                         throw new Error("initializeWasm() must be awaited first!");
21004                 }
21005                 const nativeResponseValue = wasm.TS_NetworkGraph_update_channel_from_announcement(this_arg, msg, chain_access);
21006                 return nativeResponseValue;
21007         }
21008         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_from_unsigned_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg, struct LDKCOption_AccessZ chain_access);
21009         export function NetworkGraph_update_channel_from_unsigned_announcement(this_arg: number, msg: number, chain_access: number): number {
21010                 if(!isWasmInitialized) {
21011                         throw new Error("initializeWasm() must be awaited first!");
21012                 }
21013                 const nativeResponseValue = wasm.TS_NetworkGraph_update_channel_from_unsigned_announcement(this_arg, msg, chain_access);
21014                 return nativeResponseValue;
21015         }
21016         // void NetworkGraph_close_channel_from_update(const struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t short_channel_id, bool is_permanent);
21017         export function NetworkGraph_close_channel_from_update(this_arg: number, short_channel_id: number, is_permanent: boolean): void {
21018                 if(!isWasmInitialized) {
21019                         throw new Error("initializeWasm() must be awaited first!");
21020                 }
21021                 const nativeResponseValue = wasm.TS_NetworkGraph_close_channel_from_update(this_arg, short_channel_id, is_permanent);
21022                 // debug statements here
21023         }
21024         // void NetworkGraph_fail_node(const struct LDKNetworkGraph *NONNULL_PTR this_arg, struct LDKPublicKey _node_id, bool is_permanent);
21025         export function NetworkGraph_fail_node(this_arg: number, _node_id: Uint8Array, is_permanent: boolean): void {
21026                 if(!isWasmInitialized) {
21027                         throw new Error("initializeWasm() must be awaited first!");
21028                 }
21029                 const nativeResponseValue = wasm.TS_NetworkGraph_fail_node(this_arg, encodeUint8Array(_node_id), is_permanent);
21030                 // debug statements here
21031         }
21032         // void NetworkGraph_remove_stale_channels_with_time(const struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t current_time_unix);
21033         export function NetworkGraph_remove_stale_channels_with_time(this_arg: number, current_time_unix: number): void {
21034                 if(!isWasmInitialized) {
21035                         throw new Error("initializeWasm() must be awaited first!");
21036                 }
21037                 const nativeResponseValue = wasm.TS_NetworkGraph_remove_stale_channels_with_time(this_arg, current_time_unix);
21038                 // debug statements here
21039         }
21040         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg);
21041         export function NetworkGraph_update_channel(this_arg: number, msg: number): number {
21042                 if(!isWasmInitialized) {
21043                         throw new Error("initializeWasm() must be awaited first!");
21044                 }
21045                 const nativeResponseValue = wasm.TS_NetworkGraph_update_channel(this_arg, msg);
21046                 return nativeResponseValue;
21047         }
21048         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_unsigned(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelUpdate *NONNULL_PTR msg);
21049         export function NetworkGraph_update_channel_unsigned(this_arg: number, msg: number): number {
21050                 if(!isWasmInitialized) {
21051                         throw new Error("initializeWasm() must be awaited first!");
21052                 }
21053                 const nativeResponseValue = wasm.TS_NetworkGraph_update_channel_unsigned(this_arg, msg);
21054                 return nativeResponseValue;
21055         }
21056         // MUST_USE_RES struct LDKCOption_CVec_NetAddressZZ ReadOnlyNetworkGraph_get_addresses(const struct LDKReadOnlyNetworkGraph *NONNULL_PTR this_arg, struct LDKPublicKey pubkey);
21057         export function ReadOnlyNetworkGraph_get_addresses(this_arg: number, pubkey: Uint8Array): number {
21058                 if(!isWasmInitialized) {
21059                         throw new Error("initializeWasm() must be awaited first!");
21060                 }
21061                 const nativeResponseValue = wasm.TS_ReadOnlyNetworkGraph_get_addresses(this_arg, encodeUint8Array(pubkey));
21062                 return nativeResponseValue;
21063         }
21064         // void RouteHop_free(struct LDKRouteHop this_obj);
21065         export function RouteHop_free(this_obj: number): void {
21066                 if(!isWasmInitialized) {
21067                         throw new Error("initializeWasm() must be awaited first!");
21068                 }
21069                 const nativeResponseValue = wasm.TS_RouteHop_free(this_obj);
21070                 // debug statements here
21071         }
21072         // struct LDKPublicKey RouteHop_get_pubkey(const struct LDKRouteHop *NONNULL_PTR this_ptr);
21073         export function RouteHop_get_pubkey(this_ptr: number): Uint8Array {
21074                 if(!isWasmInitialized) {
21075                         throw new Error("initializeWasm() must be awaited first!");
21076                 }
21077                 const nativeResponseValue = wasm.TS_RouteHop_get_pubkey(this_ptr);
21078                 return decodeUint8Array(nativeResponseValue);
21079         }
21080         // void RouteHop_set_pubkey(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
21081         export function RouteHop_set_pubkey(this_ptr: number, val: Uint8Array): void {
21082                 if(!isWasmInitialized) {
21083                         throw new Error("initializeWasm() must be awaited first!");
21084                 }
21085                 const nativeResponseValue = wasm.TS_RouteHop_set_pubkey(this_ptr, encodeUint8Array(val));
21086                 // debug statements here
21087         }
21088         // struct LDKNodeFeatures RouteHop_get_node_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
21089         export function RouteHop_get_node_features(this_ptr: number): number {
21090                 if(!isWasmInitialized) {
21091                         throw new Error("initializeWasm() must be awaited first!");
21092                 }
21093                 const nativeResponseValue = wasm.TS_RouteHop_get_node_features(this_ptr);
21094                 return nativeResponseValue;
21095         }
21096         // void RouteHop_set_node_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
21097         export function RouteHop_set_node_features(this_ptr: number, val: number): void {
21098                 if(!isWasmInitialized) {
21099                         throw new Error("initializeWasm() must be awaited first!");
21100                 }
21101                 const nativeResponseValue = wasm.TS_RouteHop_set_node_features(this_ptr, val);
21102                 // debug statements here
21103         }
21104         // uint64_t RouteHop_get_short_channel_id(const struct LDKRouteHop *NONNULL_PTR this_ptr);
21105         export function RouteHop_get_short_channel_id(this_ptr: number): number {
21106                 if(!isWasmInitialized) {
21107                         throw new Error("initializeWasm() must be awaited first!");
21108                 }
21109                 const nativeResponseValue = wasm.TS_RouteHop_get_short_channel_id(this_ptr);
21110                 return nativeResponseValue;
21111         }
21112         // void RouteHop_set_short_channel_id(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
21113         export function RouteHop_set_short_channel_id(this_ptr: number, val: number): void {
21114                 if(!isWasmInitialized) {
21115                         throw new Error("initializeWasm() must be awaited first!");
21116                 }
21117                 const nativeResponseValue = wasm.TS_RouteHop_set_short_channel_id(this_ptr, val);
21118                 // debug statements here
21119         }
21120         // struct LDKChannelFeatures RouteHop_get_channel_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
21121         export function RouteHop_get_channel_features(this_ptr: number): number {
21122                 if(!isWasmInitialized) {
21123                         throw new Error("initializeWasm() must be awaited first!");
21124                 }
21125                 const nativeResponseValue = wasm.TS_RouteHop_get_channel_features(this_ptr);
21126                 return nativeResponseValue;
21127         }
21128         // void RouteHop_set_channel_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
21129         export function RouteHop_set_channel_features(this_ptr: number, val: number): void {
21130                 if(!isWasmInitialized) {
21131                         throw new Error("initializeWasm() must be awaited first!");
21132                 }
21133                 const nativeResponseValue = wasm.TS_RouteHop_set_channel_features(this_ptr, val);
21134                 // debug statements here
21135         }
21136         // uint64_t RouteHop_get_fee_msat(const struct LDKRouteHop *NONNULL_PTR this_ptr);
21137         export function RouteHop_get_fee_msat(this_ptr: number): number {
21138                 if(!isWasmInitialized) {
21139                         throw new Error("initializeWasm() must be awaited first!");
21140                 }
21141                 const nativeResponseValue = wasm.TS_RouteHop_get_fee_msat(this_ptr);
21142                 return nativeResponseValue;
21143         }
21144         // void RouteHop_set_fee_msat(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
21145         export function RouteHop_set_fee_msat(this_ptr: number, val: number): void {
21146                 if(!isWasmInitialized) {
21147                         throw new Error("initializeWasm() must be awaited first!");
21148                 }
21149                 const nativeResponseValue = wasm.TS_RouteHop_set_fee_msat(this_ptr, val);
21150                 // debug statements here
21151         }
21152         // uint32_t RouteHop_get_cltv_expiry_delta(const struct LDKRouteHop *NONNULL_PTR this_ptr);
21153         export function RouteHop_get_cltv_expiry_delta(this_ptr: number): number {
21154                 if(!isWasmInitialized) {
21155                         throw new Error("initializeWasm() must be awaited first!");
21156                 }
21157                 const nativeResponseValue = wasm.TS_RouteHop_get_cltv_expiry_delta(this_ptr);
21158                 return nativeResponseValue;
21159         }
21160         // void RouteHop_set_cltv_expiry_delta(struct LDKRouteHop *NONNULL_PTR this_ptr, uint32_t val);
21161         export function RouteHop_set_cltv_expiry_delta(this_ptr: number, val: number): void {
21162                 if(!isWasmInitialized) {
21163                         throw new Error("initializeWasm() must be awaited first!");
21164                 }
21165                 const nativeResponseValue = wasm.TS_RouteHop_set_cltv_expiry_delta(this_ptr, val);
21166                 // debug statements here
21167         }
21168         // 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);
21169         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 {
21170                 if(!isWasmInitialized) {
21171                         throw new Error("initializeWasm() must be awaited first!");
21172                 }
21173                 const nativeResponseValue = wasm.TS_RouteHop_new(encodeUint8Array(pubkey_arg), node_features_arg, short_channel_id_arg, channel_features_arg, fee_msat_arg, cltv_expiry_delta_arg);
21174                 return nativeResponseValue;
21175         }
21176         // uint64_t RouteHop_clone_ptr(LDKRouteHop *NONNULL_PTR arg);
21177         export function RouteHop_clone_ptr(arg: number): number {
21178                 if(!isWasmInitialized) {
21179                         throw new Error("initializeWasm() must be awaited first!");
21180                 }
21181                 const nativeResponseValue = wasm.TS_RouteHop_clone_ptr(arg);
21182                 return nativeResponseValue;
21183         }
21184         // struct LDKRouteHop RouteHop_clone(const struct LDKRouteHop *NONNULL_PTR orig);
21185         export function RouteHop_clone(orig: number): number {
21186                 if(!isWasmInitialized) {
21187                         throw new Error("initializeWasm() must be awaited first!");
21188                 }
21189                 const nativeResponseValue = wasm.TS_RouteHop_clone(orig);
21190                 return nativeResponseValue;
21191         }
21192         // uint64_t RouteHop_hash(const struct LDKRouteHop *NONNULL_PTR o);
21193         export function RouteHop_hash(o: number): number {
21194                 if(!isWasmInitialized) {
21195                         throw new Error("initializeWasm() must be awaited first!");
21196                 }
21197                 const nativeResponseValue = wasm.TS_RouteHop_hash(o);
21198                 return nativeResponseValue;
21199         }
21200         // bool RouteHop_eq(const struct LDKRouteHop *NONNULL_PTR a, const struct LDKRouteHop *NONNULL_PTR b);
21201         export function RouteHop_eq(a: number, b: number): boolean {
21202                 if(!isWasmInitialized) {
21203                         throw new Error("initializeWasm() must be awaited first!");
21204                 }
21205                 const nativeResponseValue = wasm.TS_RouteHop_eq(a, b);
21206                 return nativeResponseValue;
21207         }
21208         // struct LDKCVec_u8Z RouteHop_write(const struct LDKRouteHop *NONNULL_PTR obj);
21209         export function RouteHop_write(obj: number): Uint8Array {
21210                 if(!isWasmInitialized) {
21211                         throw new Error("initializeWasm() must be awaited first!");
21212                 }
21213                 const nativeResponseValue = wasm.TS_RouteHop_write(obj);
21214                 return decodeUint8Array(nativeResponseValue);
21215         }
21216         // struct LDKCResult_RouteHopDecodeErrorZ RouteHop_read(struct LDKu8slice ser);
21217         export function RouteHop_read(ser: Uint8Array): number {
21218                 if(!isWasmInitialized) {
21219                         throw new Error("initializeWasm() must be awaited first!");
21220                 }
21221                 const nativeResponseValue = wasm.TS_RouteHop_read(encodeUint8Array(ser));
21222                 return nativeResponseValue;
21223         }
21224         // void Route_free(struct LDKRoute this_obj);
21225         export function Route_free(this_obj: number): void {
21226                 if(!isWasmInitialized) {
21227                         throw new Error("initializeWasm() must be awaited first!");
21228                 }
21229                 const nativeResponseValue = wasm.TS_Route_free(this_obj);
21230                 // debug statements here
21231         }
21232         // struct LDKCVec_CVec_RouteHopZZ Route_get_paths(const struct LDKRoute *NONNULL_PTR this_ptr);
21233         export function Route_get_paths(this_ptr: number): number[][] {
21234                 if(!isWasmInitialized) {
21235                         throw new Error("initializeWasm() must be awaited first!");
21236                 }
21237                 const nativeResponseValue = wasm.TS_Route_get_paths(this_ptr);
21238                 return nativeResponseValue;
21239         }
21240         // void Route_set_paths(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKCVec_CVec_RouteHopZZ val);
21241         export function Route_set_paths(this_ptr: number, val: number[][]): void {
21242                 if(!isWasmInitialized) {
21243                         throw new Error("initializeWasm() must be awaited first!");
21244                 }
21245                 const nativeResponseValue = wasm.TS_Route_set_paths(this_ptr, val);
21246                 // debug statements here
21247         }
21248         // struct LDKPayee Route_get_payee(const struct LDKRoute *NONNULL_PTR this_ptr);
21249         export function Route_get_payee(this_ptr: number): number {
21250                 if(!isWasmInitialized) {
21251                         throw new Error("initializeWasm() must be awaited first!");
21252                 }
21253                 const nativeResponseValue = wasm.TS_Route_get_payee(this_ptr);
21254                 return nativeResponseValue;
21255         }
21256         // void Route_set_payee(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKPayee val);
21257         export function Route_set_payee(this_ptr: number, val: number): void {
21258                 if(!isWasmInitialized) {
21259                         throw new Error("initializeWasm() must be awaited first!");
21260                 }
21261                 const nativeResponseValue = wasm.TS_Route_set_payee(this_ptr, val);
21262                 // debug statements here
21263         }
21264         // MUST_USE_RES struct LDKRoute Route_new(struct LDKCVec_CVec_RouteHopZZ paths_arg, struct LDKPayee payee_arg);
21265         export function Route_new(paths_arg: number[][], payee_arg: number): number {
21266                 if(!isWasmInitialized) {
21267                         throw new Error("initializeWasm() must be awaited first!");
21268                 }
21269                 const nativeResponseValue = wasm.TS_Route_new(paths_arg, payee_arg);
21270                 return nativeResponseValue;
21271         }
21272         // uint64_t Route_clone_ptr(LDKRoute *NONNULL_PTR arg);
21273         export function Route_clone_ptr(arg: number): number {
21274                 if(!isWasmInitialized) {
21275                         throw new Error("initializeWasm() must be awaited first!");
21276                 }
21277                 const nativeResponseValue = wasm.TS_Route_clone_ptr(arg);
21278                 return nativeResponseValue;
21279         }
21280         // struct LDKRoute Route_clone(const struct LDKRoute *NONNULL_PTR orig);
21281         export function Route_clone(orig: number): number {
21282                 if(!isWasmInitialized) {
21283                         throw new Error("initializeWasm() must be awaited first!");
21284                 }
21285                 const nativeResponseValue = wasm.TS_Route_clone(orig);
21286                 return nativeResponseValue;
21287         }
21288         // uint64_t Route_hash(const struct LDKRoute *NONNULL_PTR o);
21289         export function Route_hash(o: number): number {
21290                 if(!isWasmInitialized) {
21291                         throw new Error("initializeWasm() must be awaited first!");
21292                 }
21293                 const nativeResponseValue = wasm.TS_Route_hash(o);
21294                 return nativeResponseValue;
21295         }
21296         // bool Route_eq(const struct LDKRoute *NONNULL_PTR a, const struct LDKRoute *NONNULL_PTR b);
21297         export function Route_eq(a: number, b: number): boolean {
21298                 if(!isWasmInitialized) {
21299                         throw new Error("initializeWasm() must be awaited first!");
21300                 }
21301                 const nativeResponseValue = wasm.TS_Route_eq(a, b);
21302                 return nativeResponseValue;
21303         }
21304         // MUST_USE_RES uint64_t Route_get_total_fees(const struct LDKRoute *NONNULL_PTR this_arg);
21305         export function Route_get_total_fees(this_arg: number): number {
21306                 if(!isWasmInitialized) {
21307                         throw new Error("initializeWasm() must be awaited first!");
21308                 }
21309                 const nativeResponseValue = wasm.TS_Route_get_total_fees(this_arg);
21310                 return nativeResponseValue;
21311         }
21312         // MUST_USE_RES uint64_t Route_get_total_amount(const struct LDKRoute *NONNULL_PTR this_arg);
21313         export function Route_get_total_amount(this_arg: number): number {
21314                 if(!isWasmInitialized) {
21315                         throw new Error("initializeWasm() must be awaited first!");
21316                 }
21317                 const nativeResponseValue = wasm.TS_Route_get_total_amount(this_arg);
21318                 return nativeResponseValue;
21319         }
21320         // struct LDKCVec_u8Z Route_write(const struct LDKRoute *NONNULL_PTR obj);
21321         export function Route_write(obj: number): Uint8Array {
21322                 if(!isWasmInitialized) {
21323                         throw new Error("initializeWasm() must be awaited first!");
21324                 }
21325                 const nativeResponseValue = wasm.TS_Route_write(obj);
21326                 return decodeUint8Array(nativeResponseValue);
21327         }
21328         // struct LDKCResult_RouteDecodeErrorZ Route_read(struct LDKu8slice ser);
21329         export function Route_read(ser: Uint8Array): number {
21330                 if(!isWasmInitialized) {
21331                         throw new Error("initializeWasm() must be awaited first!");
21332                 }
21333                 const nativeResponseValue = wasm.TS_Route_read(encodeUint8Array(ser));
21334                 return nativeResponseValue;
21335         }
21336         // void RouteParameters_free(struct LDKRouteParameters this_obj);
21337         export function RouteParameters_free(this_obj: number): void {
21338                 if(!isWasmInitialized) {
21339                         throw new Error("initializeWasm() must be awaited first!");
21340                 }
21341                 const nativeResponseValue = wasm.TS_RouteParameters_free(this_obj);
21342                 // debug statements here
21343         }
21344         // struct LDKPayee RouteParameters_get_payee(const struct LDKRouteParameters *NONNULL_PTR this_ptr);
21345         export function RouteParameters_get_payee(this_ptr: number): number {
21346                 if(!isWasmInitialized) {
21347                         throw new Error("initializeWasm() must be awaited first!");
21348                 }
21349                 const nativeResponseValue = wasm.TS_RouteParameters_get_payee(this_ptr);
21350                 return nativeResponseValue;
21351         }
21352         // void RouteParameters_set_payee(struct LDKRouteParameters *NONNULL_PTR this_ptr, struct LDKPayee val);
21353         export function RouteParameters_set_payee(this_ptr: number, val: number): void {
21354                 if(!isWasmInitialized) {
21355                         throw new Error("initializeWasm() must be awaited first!");
21356                 }
21357                 const nativeResponseValue = wasm.TS_RouteParameters_set_payee(this_ptr, val);
21358                 // debug statements here
21359         }
21360         // uint64_t RouteParameters_get_final_value_msat(const struct LDKRouteParameters *NONNULL_PTR this_ptr);
21361         export function RouteParameters_get_final_value_msat(this_ptr: number): number {
21362                 if(!isWasmInitialized) {
21363                         throw new Error("initializeWasm() must be awaited first!");
21364                 }
21365                 const nativeResponseValue = wasm.TS_RouteParameters_get_final_value_msat(this_ptr);
21366                 return nativeResponseValue;
21367         }
21368         // void RouteParameters_set_final_value_msat(struct LDKRouteParameters *NONNULL_PTR this_ptr, uint64_t val);
21369         export function RouteParameters_set_final_value_msat(this_ptr: number, val: number): void {
21370                 if(!isWasmInitialized) {
21371                         throw new Error("initializeWasm() must be awaited first!");
21372                 }
21373                 const nativeResponseValue = wasm.TS_RouteParameters_set_final_value_msat(this_ptr, val);
21374                 // debug statements here
21375         }
21376         // uint32_t RouteParameters_get_final_cltv_expiry_delta(const struct LDKRouteParameters *NONNULL_PTR this_ptr);
21377         export function RouteParameters_get_final_cltv_expiry_delta(this_ptr: number): number {
21378                 if(!isWasmInitialized) {
21379                         throw new Error("initializeWasm() must be awaited first!");
21380                 }
21381                 const nativeResponseValue = wasm.TS_RouteParameters_get_final_cltv_expiry_delta(this_ptr);
21382                 return nativeResponseValue;
21383         }
21384         // void RouteParameters_set_final_cltv_expiry_delta(struct LDKRouteParameters *NONNULL_PTR this_ptr, uint32_t val);
21385         export function RouteParameters_set_final_cltv_expiry_delta(this_ptr: number, val: number): void {
21386                 if(!isWasmInitialized) {
21387                         throw new Error("initializeWasm() must be awaited first!");
21388                 }
21389                 const nativeResponseValue = wasm.TS_RouteParameters_set_final_cltv_expiry_delta(this_ptr, val);
21390                 // debug statements here
21391         }
21392         // MUST_USE_RES struct LDKRouteParameters RouteParameters_new(struct LDKPayee payee_arg, uint64_t final_value_msat_arg, uint32_t final_cltv_expiry_delta_arg);
21393         export function RouteParameters_new(payee_arg: number, final_value_msat_arg: number, final_cltv_expiry_delta_arg: number): number {
21394                 if(!isWasmInitialized) {
21395                         throw new Error("initializeWasm() must be awaited first!");
21396                 }
21397                 const nativeResponseValue = wasm.TS_RouteParameters_new(payee_arg, final_value_msat_arg, final_cltv_expiry_delta_arg);
21398                 return nativeResponseValue;
21399         }
21400         // uint64_t RouteParameters_clone_ptr(LDKRouteParameters *NONNULL_PTR arg);
21401         export function RouteParameters_clone_ptr(arg: number): number {
21402                 if(!isWasmInitialized) {
21403                         throw new Error("initializeWasm() must be awaited first!");
21404                 }
21405                 const nativeResponseValue = wasm.TS_RouteParameters_clone_ptr(arg);
21406                 return nativeResponseValue;
21407         }
21408         // struct LDKRouteParameters RouteParameters_clone(const struct LDKRouteParameters *NONNULL_PTR orig);
21409         export function RouteParameters_clone(orig: number): number {
21410                 if(!isWasmInitialized) {
21411                         throw new Error("initializeWasm() must be awaited first!");
21412                 }
21413                 const nativeResponseValue = wasm.TS_RouteParameters_clone(orig);
21414                 return nativeResponseValue;
21415         }
21416         // struct LDKCVec_u8Z RouteParameters_write(const struct LDKRouteParameters *NONNULL_PTR obj);
21417         export function RouteParameters_write(obj: number): Uint8Array {
21418                 if(!isWasmInitialized) {
21419                         throw new Error("initializeWasm() must be awaited first!");
21420                 }
21421                 const nativeResponseValue = wasm.TS_RouteParameters_write(obj);
21422                 return decodeUint8Array(nativeResponseValue);
21423         }
21424         // struct LDKCResult_RouteParametersDecodeErrorZ RouteParameters_read(struct LDKu8slice ser);
21425         export function RouteParameters_read(ser: Uint8Array): number {
21426                 if(!isWasmInitialized) {
21427                         throw new Error("initializeWasm() must be awaited first!");
21428                 }
21429                 const nativeResponseValue = wasm.TS_RouteParameters_read(encodeUint8Array(ser));
21430                 return nativeResponseValue;
21431         }
21432         // void Payee_free(struct LDKPayee this_obj);
21433         export function Payee_free(this_obj: number): void {
21434                 if(!isWasmInitialized) {
21435                         throw new Error("initializeWasm() must be awaited first!");
21436                 }
21437                 const nativeResponseValue = wasm.TS_Payee_free(this_obj);
21438                 // debug statements here
21439         }
21440         // struct LDKPublicKey Payee_get_pubkey(const struct LDKPayee *NONNULL_PTR this_ptr);
21441         export function Payee_get_pubkey(this_ptr: number): Uint8Array {
21442                 if(!isWasmInitialized) {
21443                         throw new Error("initializeWasm() must be awaited first!");
21444                 }
21445                 const nativeResponseValue = wasm.TS_Payee_get_pubkey(this_ptr);
21446                 return decodeUint8Array(nativeResponseValue);
21447         }
21448         // void Payee_set_pubkey(struct LDKPayee *NONNULL_PTR this_ptr, struct LDKPublicKey val);
21449         export function Payee_set_pubkey(this_ptr: number, val: Uint8Array): void {
21450                 if(!isWasmInitialized) {
21451                         throw new Error("initializeWasm() must be awaited first!");
21452                 }
21453                 const nativeResponseValue = wasm.TS_Payee_set_pubkey(this_ptr, encodeUint8Array(val));
21454                 // debug statements here
21455         }
21456         // struct LDKInvoiceFeatures Payee_get_features(const struct LDKPayee *NONNULL_PTR this_ptr);
21457         export function Payee_get_features(this_ptr: number): number {
21458                 if(!isWasmInitialized) {
21459                         throw new Error("initializeWasm() must be awaited first!");
21460                 }
21461                 const nativeResponseValue = wasm.TS_Payee_get_features(this_ptr);
21462                 return nativeResponseValue;
21463         }
21464         // void Payee_set_features(struct LDKPayee *NONNULL_PTR this_ptr, struct LDKInvoiceFeatures val);
21465         export function Payee_set_features(this_ptr: number, val: number): void {
21466                 if(!isWasmInitialized) {
21467                         throw new Error("initializeWasm() must be awaited first!");
21468                 }
21469                 const nativeResponseValue = wasm.TS_Payee_set_features(this_ptr, val);
21470                 // debug statements here
21471         }
21472         // struct LDKCVec_RouteHintZ Payee_get_route_hints(const struct LDKPayee *NONNULL_PTR this_ptr);
21473         export function Payee_get_route_hints(this_ptr: number): number[] {
21474                 if(!isWasmInitialized) {
21475                         throw new Error("initializeWasm() must be awaited first!");
21476                 }
21477                 const nativeResponseValue = wasm.TS_Payee_get_route_hints(this_ptr);
21478                 return nativeResponseValue;
21479         }
21480         // void Payee_set_route_hints(struct LDKPayee *NONNULL_PTR this_ptr, struct LDKCVec_RouteHintZ val);
21481         export function Payee_set_route_hints(this_ptr: number, val: number[]): void {
21482                 if(!isWasmInitialized) {
21483                         throw new Error("initializeWasm() must be awaited first!");
21484                 }
21485                 const nativeResponseValue = wasm.TS_Payee_set_route_hints(this_ptr, val);
21486                 // debug statements here
21487         }
21488         // struct LDKCOption_u64Z Payee_get_expiry_time(const struct LDKPayee *NONNULL_PTR this_ptr);
21489         export function Payee_get_expiry_time(this_ptr: number): number {
21490                 if(!isWasmInitialized) {
21491                         throw new Error("initializeWasm() must be awaited first!");
21492                 }
21493                 const nativeResponseValue = wasm.TS_Payee_get_expiry_time(this_ptr);
21494                 return nativeResponseValue;
21495         }
21496         // void Payee_set_expiry_time(struct LDKPayee *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
21497         export function Payee_set_expiry_time(this_ptr: number, val: number): void {
21498                 if(!isWasmInitialized) {
21499                         throw new Error("initializeWasm() must be awaited first!");
21500                 }
21501                 const nativeResponseValue = wasm.TS_Payee_set_expiry_time(this_ptr, val);
21502                 // debug statements here
21503         }
21504         // MUST_USE_RES struct LDKPayee Payee_new(struct LDKPublicKey pubkey_arg, struct LDKInvoiceFeatures features_arg, struct LDKCVec_RouteHintZ route_hints_arg, struct LDKCOption_u64Z expiry_time_arg);
21505         export function Payee_new(pubkey_arg: Uint8Array, features_arg: number, route_hints_arg: number[], expiry_time_arg: number): number {
21506                 if(!isWasmInitialized) {
21507                         throw new Error("initializeWasm() must be awaited first!");
21508                 }
21509                 const nativeResponseValue = wasm.TS_Payee_new(encodeUint8Array(pubkey_arg), features_arg, route_hints_arg, expiry_time_arg);
21510                 return nativeResponseValue;
21511         }
21512         // uint64_t Payee_clone_ptr(LDKPayee *NONNULL_PTR arg);
21513         export function Payee_clone_ptr(arg: number): number {
21514                 if(!isWasmInitialized) {
21515                         throw new Error("initializeWasm() must be awaited first!");
21516                 }
21517                 const nativeResponseValue = wasm.TS_Payee_clone_ptr(arg);
21518                 return nativeResponseValue;
21519         }
21520         // struct LDKPayee Payee_clone(const struct LDKPayee *NONNULL_PTR orig);
21521         export function Payee_clone(orig: number): number {
21522                 if(!isWasmInitialized) {
21523                         throw new Error("initializeWasm() must be awaited first!");
21524                 }
21525                 const nativeResponseValue = wasm.TS_Payee_clone(orig);
21526                 return nativeResponseValue;
21527         }
21528         // uint64_t Payee_hash(const struct LDKPayee *NONNULL_PTR o);
21529         export function Payee_hash(o: number): number {
21530                 if(!isWasmInitialized) {
21531                         throw new Error("initializeWasm() must be awaited first!");
21532                 }
21533                 const nativeResponseValue = wasm.TS_Payee_hash(o);
21534                 return nativeResponseValue;
21535         }
21536         // bool Payee_eq(const struct LDKPayee *NONNULL_PTR a, const struct LDKPayee *NONNULL_PTR b);
21537         export function Payee_eq(a: number, b: number): boolean {
21538                 if(!isWasmInitialized) {
21539                         throw new Error("initializeWasm() must be awaited first!");
21540                 }
21541                 const nativeResponseValue = wasm.TS_Payee_eq(a, b);
21542                 return nativeResponseValue;
21543         }
21544         // struct LDKCVec_u8Z Payee_write(const struct LDKPayee *NONNULL_PTR obj);
21545         export function Payee_write(obj: number): Uint8Array {
21546                 if(!isWasmInitialized) {
21547                         throw new Error("initializeWasm() must be awaited first!");
21548                 }
21549                 const nativeResponseValue = wasm.TS_Payee_write(obj);
21550                 return decodeUint8Array(nativeResponseValue);
21551         }
21552         // struct LDKCResult_PayeeDecodeErrorZ Payee_read(struct LDKu8slice ser);
21553         export function Payee_read(ser: Uint8Array): number {
21554                 if(!isWasmInitialized) {
21555                         throw new Error("initializeWasm() must be awaited first!");
21556                 }
21557                 const nativeResponseValue = wasm.TS_Payee_read(encodeUint8Array(ser));
21558                 return nativeResponseValue;
21559         }
21560         // MUST_USE_RES struct LDKPayee Payee_from_node_id(struct LDKPublicKey pubkey);
21561         export function Payee_from_node_id(pubkey: Uint8Array): number {
21562                 if(!isWasmInitialized) {
21563                         throw new Error("initializeWasm() must be awaited first!");
21564                 }
21565                 const nativeResponseValue = wasm.TS_Payee_from_node_id(encodeUint8Array(pubkey));
21566                 return nativeResponseValue;
21567         }
21568         // MUST_USE_RES struct LDKPayee Payee_for_keysend(struct LDKPublicKey pubkey);
21569         export function Payee_for_keysend(pubkey: Uint8Array): number {
21570                 if(!isWasmInitialized) {
21571                         throw new Error("initializeWasm() must be awaited first!");
21572                 }
21573                 const nativeResponseValue = wasm.TS_Payee_for_keysend(encodeUint8Array(pubkey));
21574                 return nativeResponseValue;
21575         }
21576         // void RouteHint_free(struct LDKRouteHint this_obj);
21577         export function RouteHint_free(this_obj: number): void {
21578                 if(!isWasmInitialized) {
21579                         throw new Error("initializeWasm() must be awaited first!");
21580                 }
21581                 const nativeResponseValue = wasm.TS_RouteHint_free(this_obj);
21582                 // debug statements here
21583         }
21584         // struct LDKCVec_RouteHintHopZ RouteHint_get_a(const struct LDKRouteHint *NONNULL_PTR this_ptr);
21585         export function RouteHint_get_a(this_ptr: number): number[] {
21586                 if(!isWasmInitialized) {
21587                         throw new Error("initializeWasm() must be awaited first!");
21588                 }
21589                 const nativeResponseValue = wasm.TS_RouteHint_get_a(this_ptr);
21590                 return nativeResponseValue;
21591         }
21592         // void RouteHint_set_a(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKCVec_RouteHintHopZ val);
21593         export function RouteHint_set_a(this_ptr: number, val: number[]): void {
21594                 if(!isWasmInitialized) {
21595                         throw new Error("initializeWasm() must be awaited first!");
21596                 }
21597                 const nativeResponseValue = wasm.TS_RouteHint_set_a(this_ptr, val);
21598                 // debug statements here
21599         }
21600         // MUST_USE_RES struct LDKRouteHint RouteHint_new(struct LDKCVec_RouteHintHopZ a_arg);
21601         export function RouteHint_new(a_arg: number[]): number {
21602                 if(!isWasmInitialized) {
21603                         throw new Error("initializeWasm() must be awaited first!");
21604                 }
21605                 const nativeResponseValue = wasm.TS_RouteHint_new(a_arg);
21606                 return nativeResponseValue;
21607         }
21608         // uint64_t RouteHint_clone_ptr(LDKRouteHint *NONNULL_PTR arg);
21609         export function RouteHint_clone_ptr(arg: number): number {
21610                 if(!isWasmInitialized) {
21611                         throw new Error("initializeWasm() must be awaited first!");
21612                 }
21613                 const nativeResponseValue = wasm.TS_RouteHint_clone_ptr(arg);
21614                 return nativeResponseValue;
21615         }
21616         // struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
21617         export function RouteHint_clone(orig: number): number {
21618                 if(!isWasmInitialized) {
21619                         throw new Error("initializeWasm() must be awaited first!");
21620                 }
21621                 const nativeResponseValue = wasm.TS_RouteHint_clone(orig);
21622                 return nativeResponseValue;
21623         }
21624         // uint64_t RouteHint_hash(const struct LDKRouteHint *NONNULL_PTR o);
21625         export function RouteHint_hash(o: number): number {
21626                 if(!isWasmInitialized) {
21627                         throw new Error("initializeWasm() must be awaited first!");
21628                 }
21629                 const nativeResponseValue = wasm.TS_RouteHint_hash(o);
21630                 return nativeResponseValue;
21631         }
21632         // bool RouteHint_eq(const struct LDKRouteHint *NONNULL_PTR a, const struct LDKRouteHint *NONNULL_PTR b);
21633         export function RouteHint_eq(a: number, b: number): boolean {
21634                 if(!isWasmInitialized) {
21635                         throw new Error("initializeWasm() must be awaited first!");
21636                 }
21637                 const nativeResponseValue = wasm.TS_RouteHint_eq(a, b);
21638                 return nativeResponseValue;
21639         }
21640         // struct LDKCVec_u8Z RouteHint_write(const struct LDKRouteHint *NONNULL_PTR obj);
21641         export function RouteHint_write(obj: number): Uint8Array {
21642                 if(!isWasmInitialized) {
21643                         throw new Error("initializeWasm() must be awaited first!");
21644                 }
21645                 const nativeResponseValue = wasm.TS_RouteHint_write(obj);
21646                 return decodeUint8Array(nativeResponseValue);
21647         }
21648         // struct LDKCResult_RouteHintDecodeErrorZ RouteHint_read(struct LDKu8slice ser);
21649         export function RouteHint_read(ser: Uint8Array): number {
21650                 if(!isWasmInitialized) {
21651                         throw new Error("initializeWasm() must be awaited first!");
21652                 }
21653                 const nativeResponseValue = wasm.TS_RouteHint_read(encodeUint8Array(ser));
21654                 return nativeResponseValue;
21655         }
21656         // void RouteHintHop_free(struct LDKRouteHintHop this_obj);
21657         export function RouteHintHop_free(this_obj: number): void {
21658                 if(!isWasmInitialized) {
21659                         throw new Error("initializeWasm() must be awaited first!");
21660                 }
21661                 const nativeResponseValue = wasm.TS_RouteHintHop_free(this_obj);
21662                 // debug statements here
21663         }
21664         // struct LDKPublicKey RouteHintHop_get_src_node_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
21665         export function RouteHintHop_get_src_node_id(this_ptr: number): Uint8Array {
21666                 if(!isWasmInitialized) {
21667                         throw new Error("initializeWasm() must be awaited first!");
21668                 }
21669                 const nativeResponseValue = wasm.TS_RouteHintHop_get_src_node_id(this_ptr);
21670                 return decodeUint8Array(nativeResponseValue);
21671         }
21672         // void RouteHintHop_set_src_node_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
21673         export function RouteHintHop_set_src_node_id(this_ptr: number, val: Uint8Array): void {
21674                 if(!isWasmInitialized) {
21675                         throw new Error("initializeWasm() must be awaited first!");
21676                 }
21677                 const nativeResponseValue = wasm.TS_RouteHintHop_set_src_node_id(this_ptr, encodeUint8Array(val));
21678                 // debug statements here
21679         }
21680         // uint64_t RouteHintHop_get_short_channel_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
21681         export function RouteHintHop_get_short_channel_id(this_ptr: number): number {
21682                 if(!isWasmInitialized) {
21683                         throw new Error("initializeWasm() must be awaited first!");
21684                 }
21685                 const nativeResponseValue = wasm.TS_RouteHintHop_get_short_channel_id(this_ptr);
21686                 return nativeResponseValue;
21687         }
21688         // void RouteHintHop_set_short_channel_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint64_t val);
21689         export function RouteHintHop_set_short_channel_id(this_ptr: number, val: number): void {
21690                 if(!isWasmInitialized) {
21691                         throw new Error("initializeWasm() must be awaited first!");
21692                 }
21693                 const nativeResponseValue = wasm.TS_RouteHintHop_set_short_channel_id(this_ptr, val);
21694                 // debug statements here
21695         }
21696         // struct LDKRoutingFees RouteHintHop_get_fees(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
21697         export function RouteHintHop_get_fees(this_ptr: number): number {
21698                 if(!isWasmInitialized) {
21699                         throw new Error("initializeWasm() must be awaited first!");
21700                 }
21701                 const nativeResponseValue = wasm.TS_RouteHintHop_get_fees(this_ptr);
21702                 return nativeResponseValue;
21703         }
21704         // void RouteHintHop_set_fees(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
21705         export function RouteHintHop_set_fees(this_ptr: number, val: number): void {
21706                 if(!isWasmInitialized) {
21707                         throw new Error("initializeWasm() must be awaited first!");
21708                 }
21709                 const nativeResponseValue = wasm.TS_RouteHintHop_set_fees(this_ptr, val);
21710                 // debug statements here
21711         }
21712         // uint16_t RouteHintHop_get_cltv_expiry_delta(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
21713         export function RouteHintHop_get_cltv_expiry_delta(this_ptr: number): number {
21714                 if(!isWasmInitialized) {
21715                         throw new Error("initializeWasm() must be awaited first!");
21716                 }
21717                 const nativeResponseValue = wasm.TS_RouteHintHop_get_cltv_expiry_delta(this_ptr);
21718                 return nativeResponseValue;
21719         }
21720         // void RouteHintHop_set_cltv_expiry_delta(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint16_t val);
21721         export function RouteHintHop_set_cltv_expiry_delta(this_ptr: number, val: number): void {
21722                 if(!isWasmInitialized) {
21723                         throw new Error("initializeWasm() must be awaited first!");
21724                 }
21725                 const nativeResponseValue = wasm.TS_RouteHintHop_set_cltv_expiry_delta(this_ptr, val);
21726                 // debug statements here
21727         }
21728         // struct LDKCOption_u64Z RouteHintHop_get_htlc_minimum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
21729         export function RouteHintHop_get_htlc_minimum_msat(this_ptr: number): number {
21730                 if(!isWasmInitialized) {
21731                         throw new Error("initializeWasm() must be awaited first!");
21732                 }
21733                 const nativeResponseValue = wasm.TS_RouteHintHop_get_htlc_minimum_msat(this_ptr);
21734                 return nativeResponseValue;
21735         }
21736         // void RouteHintHop_set_htlc_minimum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
21737         export function RouteHintHop_set_htlc_minimum_msat(this_ptr: number, val: number): void {
21738                 if(!isWasmInitialized) {
21739                         throw new Error("initializeWasm() must be awaited first!");
21740                 }
21741                 const nativeResponseValue = wasm.TS_RouteHintHop_set_htlc_minimum_msat(this_ptr, val);
21742                 // debug statements here
21743         }
21744         // struct LDKCOption_u64Z RouteHintHop_get_htlc_maximum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
21745         export function RouteHintHop_get_htlc_maximum_msat(this_ptr: number): number {
21746                 if(!isWasmInitialized) {
21747                         throw new Error("initializeWasm() must be awaited first!");
21748                 }
21749                 const nativeResponseValue = wasm.TS_RouteHintHop_get_htlc_maximum_msat(this_ptr);
21750                 return nativeResponseValue;
21751         }
21752         // void RouteHintHop_set_htlc_maximum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
21753         export function RouteHintHop_set_htlc_maximum_msat(this_ptr: number, val: number): void {
21754                 if(!isWasmInitialized) {
21755                         throw new Error("initializeWasm() must be awaited first!");
21756                 }
21757                 const nativeResponseValue = wasm.TS_RouteHintHop_set_htlc_maximum_msat(this_ptr, val);
21758                 // debug statements here
21759         }
21760         // MUST_USE_RES struct LDKRouteHintHop RouteHintHop_new(struct LDKPublicKey src_node_id_arg, uint64_t short_channel_id_arg, struct LDKRoutingFees fees_arg, uint16_t cltv_expiry_delta_arg, struct LDKCOption_u64Z htlc_minimum_msat_arg, struct LDKCOption_u64Z htlc_maximum_msat_arg);
21761         export function RouteHintHop_new(src_node_id_arg: Uint8Array, short_channel_id_arg: number, fees_arg: number, cltv_expiry_delta_arg: number, htlc_minimum_msat_arg: number, htlc_maximum_msat_arg: number): number {
21762                 if(!isWasmInitialized) {
21763                         throw new Error("initializeWasm() must be awaited first!");
21764                 }
21765                 const nativeResponseValue = wasm.TS_RouteHintHop_new(encodeUint8Array(src_node_id_arg), short_channel_id_arg, fees_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg);
21766                 return nativeResponseValue;
21767         }
21768         // uint64_t RouteHintHop_clone_ptr(LDKRouteHintHop *NONNULL_PTR arg);
21769         export function RouteHintHop_clone_ptr(arg: number): number {
21770                 if(!isWasmInitialized) {
21771                         throw new Error("initializeWasm() must be awaited first!");
21772                 }
21773                 const nativeResponseValue = wasm.TS_RouteHintHop_clone_ptr(arg);
21774                 return nativeResponseValue;
21775         }
21776         // struct LDKRouteHintHop RouteHintHop_clone(const struct LDKRouteHintHop *NONNULL_PTR orig);
21777         export function RouteHintHop_clone(orig: number): number {
21778                 if(!isWasmInitialized) {
21779                         throw new Error("initializeWasm() must be awaited first!");
21780                 }
21781                 const nativeResponseValue = wasm.TS_RouteHintHop_clone(orig);
21782                 return nativeResponseValue;
21783         }
21784         // uint64_t RouteHintHop_hash(const struct LDKRouteHintHop *NONNULL_PTR o);
21785         export function RouteHintHop_hash(o: number): number {
21786                 if(!isWasmInitialized) {
21787                         throw new Error("initializeWasm() must be awaited first!");
21788                 }
21789                 const nativeResponseValue = wasm.TS_RouteHintHop_hash(o);
21790                 return nativeResponseValue;
21791         }
21792         // bool RouteHintHop_eq(const struct LDKRouteHintHop *NONNULL_PTR a, const struct LDKRouteHintHop *NONNULL_PTR b);
21793         export function RouteHintHop_eq(a: number, b: number): boolean {
21794                 if(!isWasmInitialized) {
21795                         throw new Error("initializeWasm() must be awaited first!");
21796                 }
21797                 const nativeResponseValue = wasm.TS_RouteHintHop_eq(a, b);
21798                 return nativeResponseValue;
21799         }
21800         // struct LDKCVec_u8Z RouteHintHop_write(const struct LDKRouteHintHop *NONNULL_PTR obj);
21801         export function RouteHintHop_write(obj: number): Uint8Array {
21802                 if(!isWasmInitialized) {
21803                         throw new Error("initializeWasm() must be awaited first!");
21804                 }
21805                 const nativeResponseValue = wasm.TS_RouteHintHop_write(obj);
21806                 return decodeUint8Array(nativeResponseValue);
21807         }
21808         // struct LDKCResult_RouteHintHopDecodeErrorZ RouteHintHop_read(struct LDKu8slice ser);
21809         export function RouteHintHop_read(ser: Uint8Array): number {
21810                 if(!isWasmInitialized) {
21811                         throw new Error("initializeWasm() must be awaited first!");
21812                 }
21813                 const nativeResponseValue = wasm.TS_RouteHintHop_read(encodeUint8Array(ser));
21814                 return nativeResponseValue;
21815         }
21816         // struct LDKCResult_RouteLightningErrorZ find_route(struct LDKPublicKey our_node_pubkey, const struct LDKRouteParameters *NONNULL_PTR params, const struct LDKNetworkGraph *NONNULL_PTR network, struct LDKCVec_ChannelDetailsZ *first_hops, struct LDKLogger logger, const struct LDKScore *NONNULL_PTR scorer);
21817         export function find_route(our_node_pubkey: Uint8Array, params: number, network: number, first_hops: number[], logger: number, scorer: number): number {
21818                 if(!isWasmInitialized) {
21819                         throw new Error("initializeWasm() must be awaited first!");
21820                 }
21821                 const nativeResponseValue = wasm.TS_find_route(encodeUint8Array(our_node_pubkey), params, network, first_hops, logger, scorer);
21822                 return nativeResponseValue;
21823         }
21824         // void Score_free(struct LDKScore this_ptr);
21825         export function Score_free(this_ptr: number): void {
21826                 if(!isWasmInitialized) {
21827                         throw new Error("initializeWasm() must be awaited first!");
21828                 }
21829                 const nativeResponseValue = wasm.TS_Score_free(this_ptr);
21830                 // debug statements here
21831         }
21832         // void LockableScore_free(struct LDKLockableScore this_ptr);
21833         export function LockableScore_free(this_ptr: number): void {
21834                 if(!isWasmInitialized) {
21835                         throw new Error("initializeWasm() must be awaited first!");
21836                 }
21837                 const nativeResponseValue = wasm.TS_LockableScore_free(this_ptr);
21838                 // debug statements here
21839         }
21840         // void MultiThreadedLockableScore_free(struct LDKMultiThreadedLockableScore this_obj);
21841         export function MultiThreadedLockableScore_free(this_obj: number): void {
21842                 if(!isWasmInitialized) {
21843                         throw new Error("initializeWasm() must be awaited first!");
21844                 }
21845                 const nativeResponseValue = wasm.TS_MultiThreadedLockableScore_free(this_obj);
21846                 // debug statements here
21847         }
21848         // MUST_USE_RES struct LDKMultiThreadedLockableScore MultiThreadedLockableScore_new(struct LDKScore score);
21849         export function MultiThreadedLockableScore_new(score: number): number {
21850                 if(!isWasmInitialized) {
21851                         throw new Error("initializeWasm() must be awaited first!");
21852                 }
21853                 const nativeResponseValue = wasm.TS_MultiThreadedLockableScore_new(score);
21854                 return nativeResponseValue;
21855         }
21856         // void ScoringParameters_free(struct LDKScoringParameters this_obj);
21857         export function ScoringParameters_free(this_obj: number): void {
21858                 if(!isWasmInitialized) {
21859                         throw new Error("initializeWasm() must be awaited first!");
21860                 }
21861                 const nativeResponseValue = wasm.TS_ScoringParameters_free(this_obj);
21862                 // debug statements here
21863         }
21864         // uint64_t ScoringParameters_get_base_penalty_msat(const struct LDKScoringParameters *NONNULL_PTR this_ptr);
21865         export function ScoringParameters_get_base_penalty_msat(this_ptr: number): number {
21866                 if(!isWasmInitialized) {
21867                         throw new Error("initializeWasm() must be awaited first!");
21868                 }
21869                 const nativeResponseValue = wasm.TS_ScoringParameters_get_base_penalty_msat(this_ptr);
21870                 return nativeResponseValue;
21871         }
21872         // void ScoringParameters_set_base_penalty_msat(struct LDKScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
21873         export function ScoringParameters_set_base_penalty_msat(this_ptr: number, val: number): void {
21874                 if(!isWasmInitialized) {
21875                         throw new Error("initializeWasm() must be awaited first!");
21876                 }
21877                 const nativeResponseValue = wasm.TS_ScoringParameters_set_base_penalty_msat(this_ptr, val);
21878                 // debug statements here
21879         }
21880         // uint64_t ScoringParameters_get_failure_penalty_msat(const struct LDKScoringParameters *NONNULL_PTR this_ptr);
21881         export function ScoringParameters_get_failure_penalty_msat(this_ptr: number): number {
21882                 if(!isWasmInitialized) {
21883                         throw new Error("initializeWasm() must be awaited first!");
21884                 }
21885                 const nativeResponseValue = wasm.TS_ScoringParameters_get_failure_penalty_msat(this_ptr);
21886                 return nativeResponseValue;
21887         }
21888         // void ScoringParameters_set_failure_penalty_msat(struct LDKScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
21889         export function ScoringParameters_set_failure_penalty_msat(this_ptr: number, val: number): void {
21890                 if(!isWasmInitialized) {
21891                         throw new Error("initializeWasm() must be awaited first!");
21892                 }
21893                 const nativeResponseValue = wasm.TS_ScoringParameters_set_failure_penalty_msat(this_ptr, val);
21894                 // debug statements here
21895         }
21896         // uint16_t ScoringParameters_get_overuse_penalty_start_1024th(const struct LDKScoringParameters *NONNULL_PTR this_ptr);
21897         export function ScoringParameters_get_overuse_penalty_start_1024th(this_ptr: number): number {
21898                 if(!isWasmInitialized) {
21899                         throw new Error("initializeWasm() must be awaited first!");
21900                 }
21901                 const nativeResponseValue = wasm.TS_ScoringParameters_get_overuse_penalty_start_1024th(this_ptr);
21902                 return nativeResponseValue;
21903         }
21904         // void ScoringParameters_set_overuse_penalty_start_1024th(struct LDKScoringParameters *NONNULL_PTR this_ptr, uint16_t val);
21905         export function ScoringParameters_set_overuse_penalty_start_1024th(this_ptr: number, val: number): void {
21906                 if(!isWasmInitialized) {
21907                         throw new Error("initializeWasm() must be awaited first!");
21908                 }
21909                 const nativeResponseValue = wasm.TS_ScoringParameters_set_overuse_penalty_start_1024th(this_ptr, val);
21910                 // debug statements here
21911         }
21912         // uint64_t ScoringParameters_get_overuse_penalty_msat_per_1024th(const struct LDKScoringParameters *NONNULL_PTR this_ptr);
21913         export function ScoringParameters_get_overuse_penalty_msat_per_1024th(this_ptr: number): number {
21914                 if(!isWasmInitialized) {
21915                         throw new Error("initializeWasm() must be awaited first!");
21916                 }
21917                 const nativeResponseValue = wasm.TS_ScoringParameters_get_overuse_penalty_msat_per_1024th(this_ptr);
21918                 return nativeResponseValue;
21919         }
21920         // void ScoringParameters_set_overuse_penalty_msat_per_1024th(struct LDKScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
21921         export function ScoringParameters_set_overuse_penalty_msat_per_1024th(this_ptr: number, val: number): void {
21922                 if(!isWasmInitialized) {
21923                         throw new Error("initializeWasm() must be awaited first!");
21924                 }
21925                 const nativeResponseValue = wasm.TS_ScoringParameters_set_overuse_penalty_msat_per_1024th(this_ptr, val);
21926                 // debug statements here
21927         }
21928         // uint64_t ScoringParameters_get_failure_penalty_half_life(const struct LDKScoringParameters *NONNULL_PTR this_ptr);
21929         export function ScoringParameters_get_failure_penalty_half_life(this_ptr: number): number {
21930                 if(!isWasmInitialized) {
21931                         throw new Error("initializeWasm() must be awaited first!");
21932                 }
21933                 const nativeResponseValue = wasm.TS_ScoringParameters_get_failure_penalty_half_life(this_ptr);
21934                 return nativeResponseValue;
21935         }
21936         // void ScoringParameters_set_failure_penalty_half_life(struct LDKScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
21937         export function ScoringParameters_set_failure_penalty_half_life(this_ptr: number, val: number): void {
21938                 if(!isWasmInitialized) {
21939                         throw new Error("initializeWasm() must be awaited first!");
21940                 }
21941                 const nativeResponseValue = wasm.TS_ScoringParameters_set_failure_penalty_half_life(this_ptr, val);
21942                 // debug statements here
21943         }
21944         // MUST_USE_RES struct LDKScoringParameters ScoringParameters_new(uint64_t base_penalty_msat_arg, uint64_t failure_penalty_msat_arg, uint16_t overuse_penalty_start_1024th_arg, uint64_t overuse_penalty_msat_per_1024th_arg, uint64_t failure_penalty_half_life_arg);
21945         export function ScoringParameters_new(base_penalty_msat_arg: number, failure_penalty_msat_arg: number, overuse_penalty_start_1024th_arg: number, overuse_penalty_msat_per_1024th_arg: number, failure_penalty_half_life_arg: number): number {
21946                 if(!isWasmInitialized) {
21947                         throw new Error("initializeWasm() must be awaited first!");
21948                 }
21949                 const nativeResponseValue = wasm.TS_ScoringParameters_new(base_penalty_msat_arg, failure_penalty_msat_arg, overuse_penalty_start_1024th_arg, overuse_penalty_msat_per_1024th_arg, failure_penalty_half_life_arg);
21950                 return nativeResponseValue;
21951         }
21952         // struct LDKCVec_u8Z ScoringParameters_write(const struct LDKScoringParameters *NONNULL_PTR obj);
21953         export function ScoringParameters_write(obj: number): Uint8Array {
21954                 if(!isWasmInitialized) {
21955                         throw new Error("initializeWasm() must be awaited first!");
21956                 }
21957                 const nativeResponseValue = wasm.TS_ScoringParameters_write(obj);
21958                 return decodeUint8Array(nativeResponseValue);
21959         }
21960         // struct LDKCResult_ScoringParametersDecodeErrorZ ScoringParameters_read(struct LDKu8slice ser);
21961         export function ScoringParameters_read(ser: Uint8Array): number {
21962                 if(!isWasmInitialized) {
21963                         throw new Error("initializeWasm() must be awaited first!");
21964                 }
21965                 const nativeResponseValue = wasm.TS_ScoringParameters_read(encodeUint8Array(ser));
21966                 return nativeResponseValue;
21967         }
21968         // MUST_USE_RES struct LDKScoringParameters ScoringParameters_default(void);
21969         export function ScoringParameters_default(): number {
21970                 if(!isWasmInitialized) {
21971                         throw new Error("initializeWasm() must be awaited first!");
21972                 }
21973                 const nativeResponseValue = wasm.TS_ScoringParameters_default();
21974                 return nativeResponseValue;
21975         }